protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack) { dsAuxCost = ContextBase.GetCacheData(); if (dsAuxCost == null) { Response.Redirect("~"); } else if (dsAuxCost.DataSetName != "ConAuxCost") { Response.Redirect("~"); } } else { ContextBase.RemoveCacheData(); //remove anything left in cache dsAuxCost = new DataSet("ConAuxCost"); DataCommand().Param("CostType", "All").MapSchema().FillDataSet(dsAuxCost, "dbo.AuxCost_Select", "AuxCost"); ContextBase.SetCacheData(dsAuxCost); BindGrids(); } }
protected override void Back() { ContextBase.RemoveCacheData(); //remove anything left in cache if (string.IsNullOrEmpty(Convert.ToString(Session["Exp"]))) { Response.Redirect("~"); } else { Response.Redirect("~/MscExp.aspx"); } }
protected void Nav_Command(object sender, CommandEventArgs e) { string arg = e.CommandArgument.ToString(); if (!string.IsNullOrEmpty(arg)) { if (e.CommandName == "exit") { ContextBase.RemoveCacheData(); ContextBase.Session.Abandon(); } HttpContext.Current.Response.Redirect(arg); } }
protected void Page_Load(object sender, EventArgs e) { lblWarning.Text = string.Empty; lblWarning.Visible = false; if (Page.IsPostBack) { dsReport = ContextBase.GetCacheData(); if (dsReport == null) { Response.Redirect("~"); } else if (dsReport.DataSetName != "DatHistorical") { Response.Redirect("~"); } } else { ContextBase.RemoveCacheData(); //remove anything left in cache dsReport = new DataSet("DatHistorical"); DataCommand().Param("Action", "All").Param("sDate", DateTime.Parse("1/1/2000")).FillDataSet(dsReport, "dbo.Client_Select", "Client"); dsReport.Tables["Client"].PrimaryKey = new[] { dsReport.Tables["Client"].Columns["ClientID"] }; using (var reader = DataCommand().Param("Action", "All").ExecuteReader("dbo.Org_Select")) { ddlOrg.DataSource = reader; ddlOrg.DataValueField = "OrgID"; ddlOrg.DataTextField = "OrgName"; ddlOrg.DataBind(); ddlOrg.Items.Insert(0, new ListItem("-- Select --", "0")); ddlOrg.ClearSelection(); reader.Close(); } ContextBase.SetCacheData(dsReport); // populate site dropdown - preselect using site linked in from } }
protected void Page_Load(object sender, EventArgs e) { lblError.Visible = false; txtFormula.Attributes.Add("spellcheck", "false"); if (Page.IsPostBack) { dsFormula = ContextBase.GetCacheData(); if (dsFormula == null) { Response.Redirect("~"); } else if (dsFormula.DataSetName != "ConFormula") { Response.Redirect("~"); } } else { ContextBase.RemoveCacheData(); //remove anything left in cache Session["ItemType"] = Request.QueryString["ItemType"]; Session["Exp"] = Request.QueryString["Exp"]; string exp = Convert.ToString(Session["Exp"]); if (!string.IsNullOrEmpty(exp)) { tableNamePrefix = exp; btnBack.Text = "Return to Experimental Cost Config"; } litHeader.Text = string.Format("Configure {0} costing fomulas", tableNamePrefix); dsFormula = new DataSet("ConFormula"); DataCommand().Param("sDate", DateTime.Now).MapSchema().FillDataSet(dsFormula, $"dbo.{tableNamePrefix}CostFormula_Select", "Formula"); ContextBase.SetCacheData(dsFormula); } }
protected void BackButton_Click(object sender, EventArgs e) { ContextBase.Session.Remove("Updated"); ContextBase.RemoveCacheData(); // remove anything left in cache Response.Redirect("~"); }
protected void BtnLogout_Click(object sender, EventArgs e) { ContextBase.RemoveCacheData(); Session.Abandon(); Response.Redirect(ServiceProvider.Current.LoginUrl() + "?Action=Blank"); }
protected void BtnLogout_Click(object sender, EventArgs e) { ContextBase.RemoveCacheData(); //remove anything left in cache Session.Abandon(); Response.Redirect("/sselonline/Blank.aspx"); }
protected virtual void Back() { ContextBase.RemoveCacheData(); //remove anything left in cache Response.Redirect("~", !IsAsync); }