private void Databind() { BCO.MaintainStockTakeFreeze bco = new BCO.MaintainStockTakeFreeze(ConntionDB); DataTable Dt = null; Dt = bco.QueryLocateSection(this.SLP_CodeFile1.Text); this.ddlS.DataSource = Dt; this.ddlS.DataTextField = "LOCATE_SECTION"; this.ddlS.DataValueField = "LOCATE_SECTION"; this.ddlS.DataBind(); this.ddlS.Items.Insert(0, " "); this.ddlE.DataSource = Dt; this.ddlE.DataTextField = "LOCATE_SECTION"; this.ddlE.DataValueField = "LOCATE_SECTION"; this.ddlE.DataBind(); this.ddlE.Items.Insert(0, " "); if (ViewState["SLP_CodeFile1"] == null) { ViewState["ddlS"] = 0; ViewState["ddlE"] = 0; } else { if (ViewState["SLP_CodeFile1"].ToString() != this.SLP_CodeFile1.Text) { ViewState["ddlS"] = 0; ViewState["ddlE"] = 0; } } ViewState["SLP_CodeFile1"] = this.SLP_CodeFile1.Text; }
private void Databind() { BCO.MaintainStockTakeFreeze bco = new BCO.MaintainStockTakeFreeze(ConntionDB); DataTable Dt = null; Dt = bco.QueryLocateSection(this.SLP_CodeFile1.Text); this.ddlS.DataSource = Dt; this.ddlS.DataTextField = "LOCATE_SECTION"; this.ddlS.DataValueField = "LOCATE_SECTION"; this.ddlS.DataBind(); this.ddlS.Items.Insert(0, " "); this.ddlE.DataSource = Dt; this.ddlE.DataTextField = "LOCATE_SECTION"; this.ddlE.DataValueField = "LOCATE_SECTION"; this.ddlE.DataBind(); this.ddlE.Items.Insert(0, " "); }
private void GetLOCATE_SECTION() { BCO.MaintainStockTakeFreeze bco = new BCO.MaintainStockTakeFreeze(ConntionDB); DataTable dt = bco.QueryLocateSection(this.SLP_CodeFile1.Text); DataTable TempTable = new DataTable(); TempTable.Columns.Add(new DataColumn("LOCATE_SECTION")); for (int i = 0; i < dt.Rows.Count; i++) { if (((String.Compare(dt.Rows[i]["LOCATE_SECTION"].ToString().Trim(), txtS.Text, true) > 0) && (String.Compare(dt.Rows[i]["LOCATE_SECTION"].ToString().Trim(), txtE.Text, true) < 0)) || (dt.Rows[i]["LOCATE_SECTION"].ToString().Trim().ToUpper() == txtS.Text.ToUpper()) || (dt.Rows[i]["LOCATE_SECTION"].ToString().Trim().ToUpper() == txtE.Text.ToUpper())) { DataRow dr = TempTable.NewRow(); dr["LOCATE_SECTION"] = dt.Rows[i]["LOCATE_SECTION"].ToString(); TempTable.Rows.Add(dr); } } TempTable.AcceptChanges(); Session["IVM043_SECTION_" + PageTimeStamp.Value] = TempTable; }