protected void Page_Load(object sender, EventArgs e) { if (Request.Cookies["adminid"] != null && Request.Cookies["adminid"].Value != "") { intProfile = Int32.Parse(Request.Cookies["adminid"].Value); } else { Reload(); } oWorkstation = new Workstations(intProfile, dsn); oOperatingSystems = new OperatingSystems(intProfile, dsn); btnClose.Attributes.Add("onclick", "return HidePanel();"); if (Request.QueryString["id"] != null && Request.QueryString["id"] != "") { intComponent = Int32.Parse(Request.QueryString["id"]); } if (!IsPostBack) { Load(null); if (intComponent > 0) { lblName.Text = oWorkstation.GetComponent(intComponent, "name"); } } }
protected void Page_Load(object sender, EventArgs e) { Response.Cookies["loginreferrer"].Value = "/admin/workstation_components_scripts.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"); } oWorkstation = new Workstations(intProfile, dsn); if (Request.QueryString["id"] == null) { if (Request.QueryString["parent"] == null) { LoadComponents(); } else { panAdd.Visible = true; int intParent = Int32.Parse(Request.QueryString["parent"]); hdnParent.Value = intParent.ToString(); lblParent.Text = oWorkstation.GetComponent(intParent, "name"); } } else { panAdd.Visible = true; intID = Int32.Parse(Request.QueryString["id"]); if (!IsPostBack) { DataSet ds = oWorkstation.GetComponentScript(intID); int intParent = Int32.Parse(ds.Tables[0].Rows[0]["componentid"].ToString()); hdnParent.Value = intParent.ToString(); lblParent.Text = oWorkstation.GetComponent(intParent, "name"); txtName.Text = ds.Tables[0].Rows[0]["name"].ToString(); txtScript.Text = ds.Tables[0].Rows[0]["script"].ToString(); chkEnabled.Checked = (ds.Tables[0].Rows[0]["enabled"].ToString() == "1"); } } btnOrder.Attributes.Add("onclick", "return OpenWindow('SUPPORTORDER','" + hdnParent.ClientID + "','" + hdnOrder.ClientID + "&type=COMPONENT_SCRIPTS" + "',false,400,400);"); btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item?');"); }
protected void Page_Load(object sender, EventArgs e) { Response.Cookies["loginreferrer"].Value = "/admin/workstation_components.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"); } oWorkstation = new Workstations(intProfile, dsn); if (Request.QueryString["id"] == null) { if (Request.QueryString["add"] == null) { LoopRepeater(); } else { panAdd.Visible = true; } } else { panAdd.Visible = true; intID = Int32.Parse(Request.QueryString["id"]); if (intID > 0 && !IsPostBack) { DataSet ds = oWorkstation.GetComponent(intID); txtName.Text = ds.Tables[0].Rows[0]["name"].ToString(); txtZEUSBuildType.Text = ds.Tables[0].Rows[0]["zeus_build_type"].ToString(); txtADMoveLocation.Text = ds.Tables[0].Rows[0]["ad_move_location"].ToString(); chkSMSInstall.Checked = (ds.Tables[0].Rows[0]["sms_install"].ToString() == "1"); txtScript.Text = ds.Tables[0].Rows[0]["script"].ToString(); txtWorkstationGroup.Text = ds.Tables[0].Rows[0]["workstation_group"].ToString(); txtUserGroup.Text = ds.Tables[0].Rows[0]["user_group"].ToString(); txtNotifications.Text = ds.Tables[0].Rows[0]["notifications"].ToString(); chkEnabled.Checked = (ds.Tables[0].Rows[0]["enabled"].ToString() == "1"); } } btnOrder.Attributes.Add("onclick", "return OpenWindow('SUPPORTORDER','" + hdnId.ClientID + "','" + hdnOrder.ClientID + "&type=WORKSTATION_C" + "',false,400,400);"); btnDelete.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item?');"); btnOS.Attributes.Add("onclick", "return OpenWindow('WORKSTATION_COMPONENTS','" + hdnId.ClientID + "','',false,'500',300);"); }