protected void Page_Load(object sender, EventArgs e) { strID = Request.QueryString["ID"] + ""; if (!IsPostBack) { BindDropDownList(); if (strID != "") { DataTable dt = bll.FillDataTable("Cmd.SelectProductCategory", new DataParameter[] { new DataParameter("{0}", string.Format("CategoryCode='{0}'", strID)) }); BindData(dt); SetTextReadOnly(this.txtID); } else { this.txtID.Text = bll.GetNewID("CMD_ProductCategory", "CategoryCode", "1=1"); this.txtCreator.Text = Session["EmployeeCode"].ToString(); this.txtUpdater.Text = Session["EmployeeCode"].ToString(); this.txtCreatDate.Text = ToYMD(DateTime.Now); this.txtUpdateDate.Text = ToYMD(DateTime.Now); } writeJsvar(FormID, SqlCmd, strID); SetTextReadOnly(this.txtCreator, this.txtCreatDate, this.txtUpdater, this.txtUpdateDate); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["CMD_WH_AREA_ID"] != null) { dtArea = bll.FillDataTable("Cmd.SelectArea", new DataParameter[] { new DataParameter("{0}", "AreaCode='" + Request.QueryString["CMD_WH_AREA_ID"] + "'") }); if (this.dtArea.Rows.Count > 0) { this.txtWHID.Text = dtArea.Rows[0]["WarehouseCode"].ToString(); this.txtAreaID.Text = dtArea.Rows[0]["AreaCode"].ToString(); this.txtWhName.Text = bll.GetFieldValue("CMD_Warehouse", "WarehouseName", "WarehouseCode='" + this.txtWHID.Text + "'"); this.txtAreaCode.Text = dtArea.Rows[0]["AreaCode"].ToString(); this.txtAreaName.Text = dtArea.Rows[0]["AreaName"].ToString(); this.txtMemo.Text = dtArea.Rows[0]["MEMO"].ToString(); } } else if (Request.QueryString["WHCODE"] != null) { this.txtWHID.Text = Request.QueryString["WHCODE"]; this.txtWhName.Text = bll.GetFieldValue("CMD_Warehouse", "WarehouseName", "WarehouseCode='" + this.txtWHID.Text + "'"); this.txtAreaID.Text = ""; this.txtAreaCode.Text = bll.GetNewID("CMD_Area", "AreaCode", "1=1"); } SetTextReadOnly(this.txtAreaCode, this.txtWhName, this.txtWHID); } else { } }
protected void Page_Load(object sender, EventArgs e) { strID = Request.QueryString["ID"] + ""; if (!IsPostBack) { BindDropDownList(); if (strID != "") { DataTable dt = bll.FillDataTable("Cmd.SelectCar", new DataParameter[] { new DataParameter("{0}", string.Format("CarNo='{0}'", strID)) }); BindData(dt); SetTextReadOnly(this.txtID); } else { this.txtID.Text = bll.GetNewID("CMD_Car", "CarNo", "1=1"); } writeJsvar(FormID, SqlCmd, strID); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["WAREHOUSE_CODE"] != null) { dtHouse = bll.FillDataTable("Cmd.SelectWarehouse", new DataParameter[] { new DataParameter("{0}", "WarehouseCode='" + Request.QueryString["WAREHOUSE_CODE"] + "'") }); this.txtWHID.Text = dtHouse.Rows[0]["WarehouseCode"].ToString(); this.txtWhCode.Text = dtHouse.Rows[0]["WarehouseCode"].ToString(); this.txtWhName.Text = dtHouse.Rows[0]["WarehouseName"].ToString(); this.txtMemo.Text = dtHouse.Rows[0]["MEMO"].ToString(); SetTextReadOnly(this.txtWhCode); } else { this.txtWHID.Text = ""; this.txtWhCode.Text = bll.GetNewID("CMD_WAREHOUSE", "WarehouseCode", "1=1"); } } }