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; } }
//檢查是否為合理的進貨日 private void IsAcceptDate(string strAcceptDate, out string result) { CGRModel.MaintainAcceptDate BCO = new PIC.VDS2G.LGT.CGR.MaintainAcceptDate(ConntionDB); ParameterList.Clear(); ParameterList.Add(strAcceptDate); result = BCO.IsAcceptDate(ParameterList); }
private void GetPageDefault() { try { string LocateSec = ""; string NextAcceptDate = ""; //取得下次門市進貨日 //Pending IVMModel.MaintainPickData BCO = new IVMModel.MaintainPickData(ConntionDB); LocateSec = BCO.GetDefaultLocateSecByUse("A"); this.SLP_BLocate.Text = LocateSec; this.SLP_BLocate.ReadOnly = true; LocateSec = BCO.GetDefaultLocateSecByUse("C"); this.SLP_ELocate.Text = LocateSec; this.SLP_ELocate.ReadOnly = true; CGRModel.MaintainAcceptDate BCOCGR = new CGRModel.MaintainAcceptDate(ConntionDB); ParameterList.Clear(); ParameterList.Add(DateTime.Now.ToString("yyyy/MM/dd")); NextAcceptDate = BCOCGR.GetNextAcceptDate(ParameterList); hid_NextAcceptDate.Value = NextAcceptDate; SLP_Date.Text = NextAcceptDate; //SLP_Date.ReadOnly = true; } catch (Exception ex) { throw ex; } }
//解除設定鈕 protected void btnCancel_Click(object sender, EventArgs e) { try { if (VerifyFormData(SLP_AcceptDate_C.Text)) { int result = 0; //凍結畫面上的控制項 SetPageStatus(false); CGRModel.MaintainAcceptDate BCO = new PIC.VDS2G.LGT.CGR.MaintainAcceptDate(ConntionDB); ParameterList.Clear(); ParameterList.Add(this.SLP_AcceptDate_C.Text); result = BCO.CGR04_ClearReAcceptDate(ParameterList, DBT); if (result == 1) { ScriptManager.RegisterStartupScript(Page, this.GetType(), "CGR041.aspx", "alert('所指定之進貨日期無資料');", true); } else { ScriptManager.RegisterStartupScript(Page, this.GetType(), "CancelComplete", "alert('解除完成');", true); } //畫面上的控制項解凍 SetPageStatus(true); } } catch (Exception ex) { Label2.Text = ex.Message; } }
//設定鈕 protected void btnSetup_Click(object sender, EventArgs e) { try { if (VerifyFormData(SLP_AcceptDate.Text)) { int result = 0; //凍結畫面上的控制項 SetPageStatus(false); CGRModel.MaintainAcceptDate BCO = new PIC.VDS2G.LGT.CGR.MaintainAcceptDate(ConntionDB); ParameterList.Clear(); ParameterList.Add(this.SLP_P_Date.StartDate); if (this.SLP_P_Date.EndDate.Length == 0) { ParameterList.Add(this.SLP_P_Date.StartDate); } else { ParameterList.Add(this.SLP_P_Date.EndDate); } ParameterList.Add(this.SLP_AcceptDate.Text); result = BCO.CGR04_SetReAcceptDate(ParameterList, DBT); if (result != 0) { switch (result) { case 1: ScriptManager.RegisterStartupScript(Page, this.GetType(), "CGR041.aspx", "alert('所指定之處理日期區間無資料');", true); break; case 2: ScriptManager.RegisterStartupScript(Page, this.GetType(), "CGR041.aspx", "alert('所指定區間內之資料有部份已被設定');", true); break; case 3: ScriptManager.RegisterStartupScript(Page, this.GetType(), "CGR041.aspx", "alert('此門市進貨日已被設定過,請先解除再重新設定');", true); break; } } else { ScriptManager.RegisterStartupScript(Page, this.GetType(), "SetupComplete", "alert('設定完成');", true); } //畫面上的控制項解凍 SetPageStatus(true); } } catch (Exception ex) { ErrorMsgLabel.Text = ex.Message; } }
private void SetControlValue() { string strAcceptDate = string.Empty; SLP_P_Date.StartDate = DateTime.Today.ToShortDateString(); SLP_P_Date.EndDate = DateTime.Today.ToShortDateString(); CGRModel.MaintainAcceptDate BCO = new PIC.VDS2G.LGT.CGR.MaintainAcceptDate(ConntionDB); ParameterList.Clear(); ParameterList.Add(DateTime.Today.ToString("yyyy/MM/dd")); strAcceptDate = BCO.GetNextAcceptDate(ParameterList); SLP_AcceptDate_C.Text = strAcceptDate; SLP_AcceptDate.Text = strAcceptDate; }
public void GetPageDefault() { CGRModel.MaintainAcceptDate BCOCGR = new CGRModel.MaintainAcceptDate(ConntionDB); ParameterList.Clear(); ParameterList.Add(DateTime.Now.ToString("yyyy/MM/dd")); string NextAcceptDate = BCOCGR.GetNextAcceptDate(ParameterList); //SLP_Date.Text = NextAcceptDate; SLP_CustDate.Text = DateTime.Now.ToString("yyyy/MM/dd"); }
public void GetPageDefault() { CGRModel.MaintainAcceptDate BCOCGR = new CGRModel.MaintainAcceptDate(ConntionDB); ParameterList.Clear(); ParameterList.Add(DateTime.Now.ToString("yyyy/MM/dd")); string NextAcceptDate = BCOCGR.GetNextAcceptDate(ParameterList); SLP_AccDate.Text = NextAcceptDate; //this.btnRePrint.Enabled = false; this.btnMaintain.Enabled = false; }