protected void Page_Load(object sender, EventArgs e) { Response.Cookies["loginreferrer"].Value = "/admin/mnemonics.aspx"; Response.Cookies["loginreferrer"].Expires = DateTime.Now.AddDays(30); if (Request.Cookies["adminid"] != null && Request.Cookies["adminid"].Value != "") { intProfile = Int32.Parse(Request.Cookies["adminid"].Value); } else { Response.Redirect("/admin/login.aspx"); } oMnemonic = new Mnemonic(intProfile, dsn); bool boolView = false; if (Request.QueryString["import"] != null) { panImport.Visible = true; int intImport = Int32.Parse(Request.QueryString["import"]); if (intImport > 0) { btnImport.Enabled = false; txtImport.Text = oMnemonic.GetImport(intImport, "results"); } rptImport.DataSource = oMnemonic.GetImports(); rptImport.DataBind(); } else if (Request.QueryString["id"] == null) { if (!IsPostBack) { if (Request.QueryString["parent"] == null) { boolView = true; } else { panAdd.Visible = true; } } } else { intID = Int32.Parse(Request.QueryString["id"]); if (!IsPostBack) { panAdd.Visible = true; DataSet ds = oMnemonic.Get(intID); if (ds.Tables[0].Rows.Count > 0) { DataRow dr = ds.Tables[0].Rows[0]; txtName.Text = dr["name"].ToString(); txtFactoryCode.Text = dr["factory_code"].ToString(); Status.Text = dr["Status"].ToString(); ResRating.Text = dr["ResRating"].ToString(); DRRating.Text = dr["DRRating"].ToString(); Infrastructure.Text = dr["Infrastructure"].ToString(); CriticalityFactor.Text = dr["CriticalityFactor"].ToString(); Platform.Text = dr["Platform"].ToString(); CICS.Text = dr["CICS"].ToString(); PagerLevel.Text = dr["PagerLevel"].ToString(); ATLName.Text = dr["ATLName"].ToString(); PMName.Text = dr["PMName"].ToString(); FMName.Text = dr["FMName"].ToString(); DMName.Text = dr["DMName"].ToString(); CIO.Text = dr["CIO"].ToString(); AppOwner.Text = dr["AppOwner"].ToString(); AppLOBName.Text = dr["AppLOBName"].ToString(); Segment1.Text = dr["Segment1"].ToString(); RiskManager.Text = dr["RiskManager"].ToString(); BRContact.Text = dr["BRContact"].ToString(); AppRating.Text = dr["AppRating"].ToString(); Source.Text = dr["Source"].ToString(); OriginalApp.Text = dr["OriginalApp"].ToString(); chkEnabled.Checked = (dr["enabled"].ToString() == "1"); } else { boolView = true; } } } if (boolView == true) { panView.Visible = true; LoopRepeater(); } btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item?');"); btnImport.Attributes.Add("onclick", "return confirm('WARNING: This import will modify production data and CANNOT be undone!\\n\\nAre you sure you want to continue?')&& ProcessButton(this) && WaitDDL('" + divWait.ClientID + "');;"); }