private bool CheckDayClose() { bool result = false; ErrorMsgLabel.Text = ""; //判斷是否關帳 VGIModel.CheckVendorAccountClose dbo = new PIC.VDS2G.LGT.VGI.CheckVendorAccountClose(ConntionDB); string Sys_Date = DateTime.Now.ToString("yyyyMMdd"); string IsClosed = dbo.CheckVendorCloseStaus(Sys_Date); if (IsClosed == "1") { result = true; } return result; }
protected void btnNew_Click(object sender, EventArgs e) { ErrorMsgLabel.Text = ""; //判斷是否關帳 VGIModel.CheckVendorAccountClose dbo = new PIC.VDS2G.LGT.VGI.CheckVendorAccountClose(ConntionDB); string Sys_Date = DateTime.Now.ToString("yyyyMMdd"); string IsClosed = dbo.CheckVendorCloseStaus(Sys_Date); if (IsClosed == "1") { ErrorMsgLabel.Text = "供應商帳務已完成日結,不可新增驗收單"; return; } //todo:PageMode must Fill Response.Redirect("VGI012.aspx?Code=VGI01&PageMode=1"); }