protected void Page_Load(object sender, EventArgs e) { Response.Cookies["loginreferrer"].Value = Request.Path; 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"); } oEnhancement = new Enhancements(intProfile, dsn); if (!IsPostBack) { LoadLists(); } if (Request.QueryString["id"] == null) { if (Request.QueryString["add"] == null) { LoopRepeater(); } else { panAdd.Visible = true; btnDelete.Enabled = false; } } else { panAdd.Visible = true; intID = Int32.Parse(Request.QueryString["id"]); if (intID > 0 && !IsPostBack) { DataSet ds = oEnhancement.GetModule(intID); hdnId.Value = intID.ToString(); txtName.Text = ds.Tables[0].Rows[0]["name"].ToString(); chkEnabled.Checked = (ds.Tables[0].Rows[0]["enabled"].ToString() == "1"); btnAdd.Text = "Update"; } } // Modify "/admin/frame/frame_support_order.aspx" with the "&type=xxx" value. btnOrder.Attributes.Add("onclick", "return OpenWindow('SUPPORTORDER','" + hdnId.ClientID + "','" + hdnOrder.ClientID + "&type=ENHANCEMENT_MODULES" + "',false,400,400);"); btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item?');"); }