private void Page_Load(object sender, System.EventArgs e) { string sUID = "", sPassword; try { sUID = Session["UID"].ToString(); } catch { Response.Redirect("welcome.aspx?Source=timeout", true); } sPassword = Session["UserPass"].ToString(); PassGen oPassGen = new PassGen(); string sProcID = Session["ProcID"].ToString(); string sProcPassword = oPassGen.generatePassword(DateTime.Today); DBConnection oDB = new DBConnection(sProcID, sProcPassword, Context); oCONTROL = new CONTROL(oDB); oSQL = new SQLHelper(oDB, sUID); oSQL.OpenConnection(); curUser = new User(oCONTROL, sUID, oSQL); sTransID = Request.QueryString["Trans"]; sType = Request.QueryString["Type"]; sAction = Request.QueryString["Action"]; sSendEmail = Request.QueryString["Email"]; if (sSendEmail == "No") { lbEmailMe.Visible = true; } lblEmails.Visible = false; lbCloseWin.Attributes.Add("onclick", "window.close();"); oSQL.SQL = "select keyid_0, meas_val_1, meas_val_2, meas_val_3, meas_val_4, meas_val_5, meas_val_6, meas_val_7, meas_val_8, meas_val_9, meas_val_10, meas_val_11, meas_val_12, meas_val_13, meas_val_14, meas_val_15, meas_val_16, meas_val_17 from " + oCONTROL.GTP_TRAN_CONTROLER + " where trim(keyid_0) = '" + sTransID + "'"; dsMaster = oSQL.GetDataSet(); if (dsMaster.Tables[0].Rows.Count > 0) { oSQL.SQL = "select meas_val_1 from " + oCONTROL.GTP_SW + " where keyid_0 = '" + dsMaster.Tables[0].Rows[0]["meas_val_6"].ToString().Trim() + "'"; dsLookup = oSQL.GetDataSet(); switch (sType) { case "A": oSQL.SQL = "select keyid_0, meas_val_1, meas_val_2, meas_val_3, meas_val_4, meas_val_5, meas_val_6, meas_val_7, meas_val_8, meas_val_9, meas_val_10, meas_val_11, meas_val_12, meas_val_13, meas_val_14, meas_val_15, meas_val_16, meas_val_17, meas_val_18, meas_val_19, meas_val_20, meas_val_21, meas_val_22, meas_val_23, meas_val_24, meas_val_25, meas_val_26, meas_val_27, meas_val_28, meas_val_29, meas_val_30, meas_val_31, meas_val_32, meas_val_33, meas_val_34, meas_val_35 from " + oCONTROL.GTP_ASGT_TRAN_DETAIL + " where trim(keyid_0) = '" + sTransID + "'"; dsAsgtDetail = oSQL.GetDataSet(); if (dsAsgtDetail.Tables[0].Rows.Count > 0) { oSQL.SQL = "select keyid_0, keyid_1, keyid_2, meas_val_1, meas_val_2, meas_val_3, meas_val_4, meas_val_5, meas_val_6, meas_val_7, meas_val_8 from " + oCONTROL.GTP_DCU + " where keyid_0 = '" + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim() + "' and keyid_1 = '" + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_24"].ToString().Trim() + "' and keyid_2 = '" + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_26"].ToString().Trim() + "'"; dsDCU = oSQL.GetDataSet(); } oSQL.SQL = "select keyid_0, keyid_1, keyid_2, meas_val_1 from " + oCONTROL.GTP_CH_UNIT + " where keyid_0 = '" + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim() + "' and keyid_1 = '" + dsMaster.Tables[0].Rows[0]["MEAS_VAL_17"].ToString().Trim() + "' order by keyid_0, keyid_1, (keyid_2 (int))"; dsPairs = oSQL.GetDataSet(); if (sAction != "D" && sAction != "C") { oSQL.SQL = "select keyid_0, keyid_1, keyid_2, keyid_3 from " + oCONTROL.GTP_PORT_ASGT_DETAIL + " where trim(keyid_0) = '" + sTransID + "' order by keyid_0, keyid_3, keyid_1, keyid_2"; dsPortAsgt = oSQL.GetDataSet(); oSQL.SQL = "select keyid_0, meas_val_1, meas_val_2, meas_val_3 from " + oCONTROL.GTP_PUB_ASGT_DETAIL + " where trim(keyid_0) = '" + sTransID + "'"; dsPubAsgt = oSQL.GetDataSet(); } else if (sAction == "C") { oSQL.SQL = "select keyid_0, keyid_1, keyid_2, keyid_3 from " + oCONTROL.GTP_PORT_ASGT_DETAIL + " where trim(keyid_0) = '" + sTransID + "' and keyid_2 = 'A' order by keyid_0, keyid_3, keyid_1, keyid_2"; dsPortAsgt = oSQL.GetDataSet(); } break; case "P": oSQL.SQL = "select keyid_0, meas_val_1, meas_val_2, meas_val_3 from " + oCONTROL.GTP_PUB_ASGT_DETAIL + " where trim(keyid_0) = '" + sTransID + "'"; dsPubAsgt = oSQL.GetDataSet(); break; case "R": oSQL.SQL = "select keyid_0, meas_val_1, meas_val_2, meas_val_3, meas_val_4, meas_val_5, meas_val_6, meas_val_7, meas_val_8, meas_val_9, meas_val_10, meas_val_11, meas_val_12, meas_val_13, meas_val_14, meas_val_15, meas_val_16, meas_val_17, meas_val_18 from " + oCONTROL.GTP_INV_MOVE_DETAIL + " where trim(keyid_0) = '" + sTransID + "'"; dsINVMove = oSQL.GetDataSet(); if (dsINVMove.Tables[0].Rows.Count > 0) { oSQL.SQL = "select keyid_0, keyid_1, keyid_2, meas_val_1, meas_val_2, meas_val_3, meas_val_4, meas_val_5, meas_val_6, meas_val_7, meas_val_8 from " + oCONTROL.GTP_DCU + " where keyid_0 = '" + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim() + "' and keyid_1 = '" + dsINVMove.Tables[0].Rows[0]["MEAS_VAL_4"].ToString().Trim() + "' and keyid_2 = '" + dsINVMove.Tables[0].Rows[0]["MEAS_VAL_5"].ToString().Trim() + "'"; dsDCU = oSQL.GetDataSet(); oSQL.SQL = "select keyid_0, keyid_1, keyid_2, meas_val_1, meas_val_2, meas_val_3, meas_val_4, meas_val_5, meas_val_6, meas_val_7, meas_val_8 from " + oCONTROL.GTP_DCU + " where keyid_0 = '" + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim() + "' and keyid_1 = '" + dsINVMove.Tables[0].Rows[0]["MEAS_VAL_7"].ToString().Trim() + "' and keyid_2 = '" + dsINVMove.Tables[0].Rows[0]["MEAS_VAL_8"].ToString().Trim() + "'"; dsDCU2 = oSQL.GetDataSet(); } if (sAction == "A") { oSQL.SQL = "select * from (select keyid_0, keyid_1, keyid_2, keyid_3 from " + oCONTROL.GTP_PORT_ASGT_DETAIL + " where trim(keyid_0) = '" + sTransID + "' and keyid_2 = 'R') a left join (select keyid_0, keyid_1, keyid_2, keyid_3 from " + oCONTROL.GTP_PORT_ASGT_DETAIL + " where trim(keyid_0) = '" + sTransID + "' and keyid_2 = 'A') b on a.keyid_3 = b.keyid_3 order by a.keyid_3"; dsPortAsgt = oSQL.GetDataSet(); oSQL.SQL = "select keyid_0, meas_val_1, meas_val_2, meas_val_3 from " + oCONTROL.GTP_PUB_ASGT_DETAIL + " where trim(keyid_0) = '" + sTransID + "'"; dsPubAsgt = oSQL.GetDataSet(); oSQL.SQL = "select keyid_0, keyid_1, keyid_2, meas_val_1 from " + oCONTROL.GTP_CH_UNIT + " where keyid_0 = '" + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim() + "' and keyid_1 = '" + dsMaster.Tables[0].Rows[0]["MEAS_VAL_17"].ToString().Trim() + "' order by keyid_0, keyid_1, (keyid_2 (int))"; dsPairs = oSQL.GetDataSet(); } break; case "S": break; default: break; } } if (dsMaster.Tables[0].Rows.Count > 0) { HtmlTable htNew; HtmlTableRow htrNew; HtmlTableCell htcNew; htNew = new HtmlTable(); htNew.Width = "600"; htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Align = "center"; htcNew.InnerHtml = "GTP Report"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Align = "center"; htcNew.InnerHtml = "General Transaction Processing"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Align = "center"; htcNew.InnerHtml = "Printed: " + DateTime.Now.ToString("yyyy-MM-dd hh:mm"); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Align = "center"; htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Align = "center"; htcNew.InnerHtml = "The Status of this Transaction is " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_2"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Align = "left"; switch (sType + sAction) { case "AA": htcNew.InnerHtml = "Transaction Type: Mechanical/Manual Add"; break; case "AU": htcNew.InnerHtml = "Transaction Type: Mechanical/Manual Cut"; break; case "AC": htcNew.InnerHtml = "Transaction Type: Change"; break; case "AD": htcNew.InnerHtml = "Transaction Type: Delete"; break; case "AR": htcNew.InnerHtml = "Transaction Type: Reverse Cut"; break; case "AX": htcNew.InnerHtml = "Transaction Type: Reconcile"; break; case "PA": htcNew.InnerHtml = "Transaction Type: PUB Add"; break; case "PD": htcNew.InnerHtml = "Transaction Type: PUB Delete"; break; case "RA": htcNew.InnerHtml = "Transaction Type: INV Move"; break; case "RM": htcNew.InnerHtml = "Transaction Type: INV Move"; break; case "SA": htcNew.InnerHtml = "Transaction Type: Pseudo INV Add"; break; case "SD": htcNew.InnerHtml = "Transaction Type: Pseudo INV Delete"; break; default: htcNew.InnerHtml = "Transaction Type: Undefined"; break; } if (dsLookup.Tables.Count > 0 && dsLookup.Tables[0].Rows.Count > 0 && dsLookup.Tables[0].Rows[0]["meas_val_1"].ToString().Trim() != "5ESS") { htcNew.InnerHtml += " for Non-5ESS"; } htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); if (dsAsgtDetail.Tables.Count > 0 && dsAsgtDetail.Tables[0].Rows.Count > 0) { htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "SWITCH Identifier: "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Region: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim().Substring(0,4); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "State: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim().Substring(4,2); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "User ID: "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_5"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Date: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_4"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Originator: "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_1"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Contact No.: " + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_3"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Job No.:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_12"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "System No.:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_17"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Service ECD:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_7"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "CSA:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_5"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "DLC Type:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_20"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Test Method:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_7"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "ALM Bit Rate:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_8"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Protect:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_16"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Line Code:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_9"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); if (dsMaster.Tables[0].Rows[0]["meas_val_9"].ToString().Trim() == "TR008") { htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Mode:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_18"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); } phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "PG Cable Range: " + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_10"].ToString().Trim() + "   ;" + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_11"].ToString().Trim() + "-" + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_12"].ToString().Trim() + "   %ISDN: " + Convert.ToInt32(dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_21"].ToString().Trim()) + "%   %Bus.: " + Convert.ToInt32(dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_22"].ToString().Trim()) + "%   %Res.: " + Convert.ToInt32(dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_23"].ToString().Trim()) + "%"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Side-Door/Hairpin Reqd: " + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_14"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Universal Sys. In CSA: " + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Number of DS1s: " + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_19"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "More than 10 INVs/CSA: " + dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_4"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); if ((sAction == "A" || sAction == "U" || sAction == "C")) { string sSwitchType = ""; oSQL.SQL = "select meas_val_1 from " + oCONTROL.GTP_SW + " where keyid_0 = '" + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim() + "'"; oSQL.OpenReader(); if (oSQL.ReaderOpen && oSQL.Reader.HasRows) { oSQL.Reader.Read(); sSwitchType = oSQL.Reader.GetString(0).Trim(); } oSQL.CloseReader(); if (sSwitchType == "5ESS") { htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.ColSpan = 2; htcNew.Align = "center"; htcNew.InnerHtml = "TR008 Assignment Details"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.ColSpan = 2; htcNew.InnerHtml = "
"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Width = "25%"; htcNew.InnerHtml = "SM:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_24"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Width = "25%"; htcNew.InnerHtml = "Unit Type:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); if (dsDCU.Tables[0].Rows.Count > 0) { htcNew.InnerHtml = dsDCU.Tables[0].Rows[0]["MEAS_VAL_1"].ToString().Trim(); } else { htcNew.InnerHtml = " "; } htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Width = "25%"; htcNew.InnerHtml = "Unit No.:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_26"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.Width = "25%"; htcNew.InnerHtml = "INV No.:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsAsgtDetail.Tables[0].Rows[0]["MEAS_VAL_25"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Shelf  "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.Align = "right"; htcNew.InnerHtml = "DS1"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.ColSpan = 2; htcNew.InnerHtml = "
"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); if (dsPortAsgt.Tables.Count > 0 && dsPortAsgt.Tables[0].Rows.Count > 0) { for (int p = 0; p < dsPortAsgt.Tables[0].Rows.Count; p++) { htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsPortAsgt.Tables[0].Rows[p]["KEYID_3"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.Align = "right"; htcNew.InnerHtml = dsPortAsgt.Tables[0].Rows[p]["KEYID_1"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); } } else { } phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.ColSpan = 2; htcNew.InnerHtml = "PUB Assignments"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "
"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); if (dsPubAsgt.Tables.Count > 0 && dsPubAsgt.Tables[0].Rows.Count > 0) { htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "SM: " + dsPubAsgt.Tables[0].Rows[0]["MEAS_VAL_1"].ToString().Trim() + "   DCU: " + dsPubAsgt.Tables[0].Rows[0]["MEAS_VAL_2"].ToString().Trim() + "   DS1 Port: " + dsPubAsgt.Tables[0].Rows[0]["MEAS_VAL_3"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); } phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); } if (dsMaster.Tables[0].Rows[0]["MEAS_VAL_9"].ToString().Trim() == "TR008") { htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.ColSpan = 8; htcNew.Align = "center"; htcNew.InnerHtml = "TR008 CHANNEL UNIT ASSIGNMENT"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "POS"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "GRP A"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "POS"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "GRP B"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "POS"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "GRP C"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "POS"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "GRP D"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.ColSpan = 8; htcNew.InnerHtml = "
"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); int iPairHigh = 0; string sPairHigh = ""; if (dsPairs.Tables[0].Rows.Count > 0) { HtmlTableRow htrNew01 = new HtmlTableRow(); HtmlTableRow htrNew02 = new HtmlTableRow(); HtmlTableRow htrNew03 = new HtmlTableRow(); HtmlTableRow htrNew04 = new HtmlTableRow(); HtmlTableRow htrNew05 = new HtmlTableRow(); HtmlTableRow htrNew06 = new HtmlTableRow(); HtmlTableRow htrNew07 = new HtmlTableRow(); HtmlTableRow htrNew08 = new HtmlTableRow(); HtmlTableRow htrNew09 = new HtmlTableRow(); HtmlTableRow htrNew10 = new HtmlTableRow(); HtmlTableRow htrNew11 = new HtmlTableRow(); HtmlTableRow htrNew12 = new HtmlTableRow(); HtmlTableCell htcNew01; HtmlTableCell htcNew02; for (int p = 0; p < dsPairs.Tables[0].Rows.Count; p++) { int iRow = p%12; htcNew01 = new HtmlTableCell(); iPairHigh = Convert.ToInt32(dsPairs.Tables[0].Rows[p]["KEYID_2"].ToString()) + 1; if (iPairHigh < 10) { sPairHigh = "0" + iPairHigh.ToString(); } else { sPairHigh = iPairHigh.ToString(); } htcNew01.InnerHtml = dsPairs.Tables[0].Rows[p]["KEYID_2"].ToString() + "/" + sPairHigh; htcNew02 = new HtmlTableCell(); htcNew02.InnerHtml = dsPairs.Tables[0].Rows[p]["MEAS_VAL_1"].ToString(); htrNew.Cells.Add(htcNew01); htrNew.Cells.Add(htcNew02); switch (iRow) { case 0: htrNew01.Cells.Add(htcNew01); htrNew01.Cells.Add(htcNew02); break; case 1: htrNew02.Cells.Add(htcNew01); htrNew02.Cells.Add(htcNew02); break; case 2: htrNew03.Cells.Add(htcNew01); htrNew03.Cells.Add(htcNew02); break; case 3: htrNew04.Cells.Add(htcNew01); htrNew04.Cells.Add(htcNew02); break; case 4: htrNew05.Cells.Add(htcNew01); htrNew05.Cells.Add(htcNew02); break; case 5: htrNew06.Cells.Add(htcNew01); htrNew06.Cells.Add(htcNew02); break; case 6: htrNew07.Cells.Add(htcNew01); htrNew07.Cells.Add(htcNew02); break; case 7: htrNew08.Cells.Add(htcNew01); htrNew08.Cells.Add(htcNew02); break; case 8: htrNew09.Cells.Add(htcNew01); htrNew09.Cells.Add(htcNew02); break; case 9: htrNew10.Cells.Add(htcNew01); htrNew10.Cells.Add(htcNew02); break; case 10: htrNew11.Cells.Add(htcNew01); htrNew11.Cells.Add(htcNew02); break; case 11: htrNew12.Cells.Add(htcNew01); htrNew12.Cells.Add(htcNew02); break; default: break; } } htNew.Rows.Add(htrNew01); htNew.Rows.Add(htrNew02); htNew.Rows.Add(htrNew03); htNew.Rows.Add(htrNew04); htNew.Rows.Add(htrNew05); htNew.Rows.Add(htrNew06); htNew.Rows.Add(htrNew07); htNew.Rows.Add(htrNew08); htNew.Rows.Add(htrNew09); htNew.Rows.Add(htrNew10); htNew.Rows.Add(htrNew11); htNew.Rows.Add(htrNew12); } phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); } } } else if (dsINVMove.Tables.Count > 0 && dsINVMove.Tables[0].Rows.Count > 0) { htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "SWITCH Identifier: "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Region: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim().Substring(0,4); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "State: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim().Substring(4,2); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "User ID: "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_5"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Date: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_4"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Job No.:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_12"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "System No.:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_17"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Due Date:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_7"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "PG Cable Range: " + dsINVMove.Tables[0].Rows[0]["MEAS_VAL_1"].ToString().Trim() + "   ;" + dsINVMove.Tables[0].Rows[0]["MEAS_VAL_2"].ToString().Trim() + "-" + dsINVMove.Tables[0].Rows[0]["MEAS_VAL_3"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "300"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "FROM"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "TO"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "SWITCH MODULE:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsINVMove.Tables[0].Rows[0]["MEAS_VAL_4"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsINVMove.Tables[0].Rows[0]["MEAS_VAL_7"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "UNIT TYPE:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); if (dsDCU.Tables[0].Rows.Count > 0) { htcNew.InnerHtml = dsDCU.Tables[0].Rows[0]["MEAS_VAL_1"].ToString().Trim(); } else { htcNew.InnerHtml = " "; } htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); if (dsDCU2.Tables[0].Rows.Count > 0) { htcNew.InnerHtml = dsDCU2.Tables[0].Rows[0]["MEAS_VAL_1"].ToString().Trim(); } else { htcNew.InnerHtml = " "; } htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "UNIT NO:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsINVMove.Tables[0].Rows[0]["MEAS_VAL_5"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsINVMove.Tables[0].Rows[0]["MEAS_VAL_8"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "INV EX:"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsINVMove.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsINVMove.Tables[0].Rows[0]["MEAS_VAL_9"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); if (dsPortAsgt.Tables.Count > 0 && dsPortAsgt.Tables[0].Rows.Count > 0) { htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Shelf"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "FROM"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "TO"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); for (int r = 0; r < dsPortAsgt.Tables[0].Rows.Count; r++) { htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsPortAsgt.Tables[0].Rows[r][3].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsPortAsgt.Tables[0].Rows[r][1].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsPortAsgt.Tables[0].Rows[r][5].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); } phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); } if (dsPairs.Tables.Count > 0 && dsPairs.Tables[0].Rows.Count > 0) { htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.ColSpan = 8; htcNew.Align = "center"; htcNew.InnerHtml = "*** CHANNEL UNIT ASSIGNMENT ***"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "POS"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "GRP A"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "POS"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "GRP B"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "POS"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "GRP C"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "POS"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "GRP D"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.ColSpan = 8; htcNew.InnerHtml = "
"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); int iPairHigh = 0; string sPairHigh = ""; if (dsPairs.Tables[0].Rows.Count > 0) { HtmlTableRow htrNew01 = new HtmlTableRow(); HtmlTableRow htrNew02 = new HtmlTableRow(); HtmlTableRow htrNew03 = new HtmlTableRow(); HtmlTableRow htrNew04 = new HtmlTableRow(); HtmlTableRow htrNew05 = new HtmlTableRow(); HtmlTableRow htrNew06 = new HtmlTableRow(); HtmlTableRow htrNew07 = new HtmlTableRow(); HtmlTableRow htrNew08 = new HtmlTableRow(); HtmlTableRow htrNew09 = new HtmlTableRow(); HtmlTableRow htrNew10 = new HtmlTableRow(); HtmlTableRow htrNew11 = new HtmlTableRow(); HtmlTableRow htrNew12 = new HtmlTableRow(); HtmlTableCell htcNew01; HtmlTableCell htcNew02; for (int p = 0; p < dsPairs.Tables[0].Rows.Count; p++) { int iRow = p%12; htcNew01 = new HtmlTableCell(); iPairHigh = Convert.ToInt32(dsPairs.Tables[0].Rows[p]["KEYID_2"].ToString()) + 1; if (iPairHigh < 10) { sPairHigh = "0" + iPairHigh.ToString(); } else { sPairHigh = iPairHigh.ToString(); } htcNew01.InnerHtml = dsPairs.Tables[0].Rows[p]["KEYID_2"].ToString() + "/" + sPairHigh; htcNew02 = new HtmlTableCell(); htcNew02.InnerHtml = dsPairs.Tables[0].Rows[p]["MEAS_VAL_1"].ToString(); htrNew.Cells.Add(htcNew01); htrNew.Cells.Add(htcNew02); switch (iRow) { case 0: htrNew01.Cells.Add(htcNew01); htrNew01.Cells.Add(htcNew02); break; case 1: htrNew02.Cells.Add(htcNew01); htrNew02.Cells.Add(htcNew02); break; case 2: htrNew03.Cells.Add(htcNew01); htrNew03.Cells.Add(htcNew02); break; case 3: htrNew04.Cells.Add(htcNew01); htrNew04.Cells.Add(htcNew02); break; case 4: htrNew05.Cells.Add(htcNew01); htrNew05.Cells.Add(htcNew02); break; case 5: htrNew06.Cells.Add(htcNew01); htrNew06.Cells.Add(htcNew02); break; case 6: htrNew07.Cells.Add(htcNew01); htrNew07.Cells.Add(htcNew02); break; case 7: htrNew08.Cells.Add(htcNew01); htrNew08.Cells.Add(htcNew02); break; case 8: htrNew09.Cells.Add(htcNew01); htrNew09.Cells.Add(htcNew02); break; case 9: htrNew10.Cells.Add(htcNew01); htrNew10.Cells.Add(htcNew02); break; case 10: htrNew11.Cells.Add(htcNew01); htrNew11.Cells.Add(htcNew02); break; case 11: htrNew12.Cells.Add(htcNew01); htrNew12.Cells.Add(htcNew02); break; default: break; } } htNew.Rows.Add(htrNew01); htNew.Rows.Add(htrNew02); htNew.Rows.Add(htrNew03); htNew.Rows.Add(htrNew04); htNew.Rows.Add(htrNew05); htNew.Rows.Add(htrNew06); htNew.Rows.Add(htrNew07); htNew.Rows.Add(htrNew08); htNew.Rows.Add(htrNew09); htNew.Rows.Add(htrNew10); htNew.Rows.Add(htrNew11); htNew.Rows.Add(htrNew12); } phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); } } else if (dsPubAsgt.Tables.Count > 0 && dsPubAsgt.Tables[0].Rows.Count > 0) { htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "600"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "SWITCH Identifier: "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Region: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim().Substring(0,4); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "State: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim().Substring(4,2); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "User ID: "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_5"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "Date: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_4"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); htNew = new HtmlTable(); htNew.Attributes.Add("style","FONT-SIZE: 12px; FONT-WEIGHT: bold; FONT-FAMILY: 'Courier New', Monospace"); htNew.Width = "400"; htNew.Border = 0; htNew.CellPadding = 0; htNew.CellSpacing = 0; htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.ColSpan = 2; htcNew.InnerHtml = "*** PUB ***"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = " "; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "ACT"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "SM"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "IDCU"; htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = "NUM"; htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); htrNew = new HtmlTableRow(); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsMaster.Tables[0].Rows[0]["MEAS_VAL_3"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsPubAsgt.Tables[0].Rows[0]["MEAS_VAL_1"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsPubAsgt.Tables[0].Rows[0]["MEAS_VAL_2"].ToString().Trim(); htrNew.Cells.Add(htcNew); htcNew = new HtmlTableCell(); htcNew.InnerHtml = dsPubAsgt.Tables[0].Rows[0]["MEAS_VAL_3"].ToString().Trim(); htrNew.Cells.Add(htcNew); htNew.Rows.Add(htrNew); phTransDetail.Controls.Add(new LiteralControl("

")); phTransDetail.Controls.Add(htNew); phTransDetail.Controls.Add(new LiteralControl("

")); } if (sSendEmail == "Yes" && !this.IsPostBack) { User thatUser = new User(oCONTROL, dsMaster.Tables[0].Rows[0]["MEAS_VAL_5"].ToString().Trim(), oSQL); oSQL.SQL = "select a.meas_val_12 as turf, b.meas_val_1 as elist from " + oCONTROL.WSMTablePrefix + oCONTROL.IdentifierWSMNumber + " a left join " + oCONTROL.WSMTablePrefix + oCONTROL.NotificationWSMNumber + " b on a.meas_val_12 = b.keyid_1 and b.keyid_0 = 'GTP' where a.meas_val_8 = '" + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim() + "' order by a.meas_val_12 desc"; DataSet dsNotification = oSQL.GetDataSet(); string sEmailTo = ""; if (thatUser.UID != curUser.UID) { sEmailTo = thatUser.EMail.Trim() + ";" + curUser.EMail.Trim(); } else { sEmailTo = thatUser.EMail.Trim(); } if (dsNotification.Tables[0].Rows.Count > 0) { sEmailTo += ";" + dsNotification.Tables[0].Rows[0]["elist"].ToString().Trim(); } StringWriter sw = new StringWriter(); HtmlTextWriter writer = new HtmlTextWriter(sw) ; string contents = null; try{ phTransDetail.RenderControl(writer); contents = sw.GetStringBuilder().ToString(); }finally{ sw.Close(); writer.Close(); } MailMessage lMessage = new MailMessage(); lMessage.From = "CONTROL-Application@no-reply.com"; lMessage.To = sEmailTo; lMessage.Subject = "GTP Transaction: " + sTransID + ", Identifier: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_6"].ToString().Trim() + ", Status: " + dsMaster.Tables[0].Rows[0]["MEAS_VAL_2"].ToString().Trim() + " (" + oCONTROL.DBEnviron + ")"; lMessage.BodyFormat = MailFormat.Html; lMessage.Body = contents; try { if (oCONTROL.SMTPServerName != String.Empty) { SmtpMail.SmtpServer = oCONTROL.SMTPServerName; } SmtpMail.Send(lMessage); } catch { } lblEmails.Visible = true; lblEmails.Text = "This has been emailed to: " + sEmailTo; } } else { phTransDetail.Controls.Add(new LiteralControl("Invalid Transaction Number")); } oSQL.CloseConnection(); }