public void GetPageDefault() { IVMModel.MaintainPickData DBO = new IVMModel.MaintainPickData(ConntionDB); ParameterList.Clear(); string BDefaultSec = DBO.GetDefaultLocateSecByUse("A"); SLP_BLocate.Text = BDefaultSec; TextBox txtBlocaeNo = (TextBox)SLP_BLocate.FindControl("TextBoxCode"); TextBox txtBlocaeSec = (TextBox)SLP_BLocate.FindControl("TextBoxCode2"); txtBlocaeNo.Enabled = false; txtBlocaeSec.Enabled = false; string EDefaultSec = DBO.GetMinStockLocateIn(); SLP_ELocate.Text = EDefaultSec; hid_ESec.Value = EDefaultSec; TextBox txtElocaeSec = (TextBox)SLP_ELocate.FindControl("TextBoxCode2"); txtElocaeSec.Enabled = false; //this.btnRePrint.Enabled = false; this.btnMaintain.Enabled = false; ScriptManager.RegisterStartupScript(this.UpdatePanel1, typeof(UpdatePanel), "IVM155", "ImageDisabled();", true); }
private void GetPageDefault() { try { //抓下次門市進貨日 CGRModel.MaintainAcceptDate BCOCGR = new CGRModel.MaintainAcceptDate(ConntionDB); ParameterList.Clear(); ParameterList.Add(DateTime.Now.ToString("yyyy/MM/dd")); string NextAcceptDate = BCOCGR.GetNextAcceptDate(ParameterList); hid_NextAcceptDate.Value = NextAcceptDate; SLP_Date.Text = NextAcceptDate; IVMModel.MaintainPickData DBO = new IVMModel.MaintainPickData(ConntionDB); string BLocateSec = ""; //取得下架儲位預設值 BLocateSec = DBO.GetDefaultLocateSecByUse("A"); this.SLP_BLocateSec.Text = BLocateSec; TextBox txtBLocateNo = (TextBox)this.SLP_BLocateSec.FindControl("TextBoxCode"); txtBLocateNo.Enabled = false; TextBox txtBLocateSec = (TextBox)this.SLP_BLocateSec.FindControl("TextBoxCode2"); txtBLocateSec.Enabled = false; //上架儲區預設[儲區]與[下架儲位]的[儲區]預設值相同 //預設[儲格] = 00A11 //可改 string ELocateSec = ""; ELocateSec = DBO.GetMinStockLocateIn(); this.SLP_ELocateSec.Text = ELocateSec; TextBox txtELocateNo = (TextBox)this.SLP_ELocateSec.FindControl("TextBoxCode"); txtELocateNo.Enabled = false; TextBox txtELocateSec = (TextBox)this.SLP_ELocateSec.FindControl("TextBoxCode2"); txtELocateSec.Enabled = false; //this.btnRePrint.Enabled = false; this.btnMaintain.Enabled = false; } catch (Exception ex) { ErrorMsgLabel.Text = ex.Message; } }