private void get退貨記錄() { string l_str業代員編 = iv_txt業代員編.Text.Trim().ToUpper(); string l_str請購單號 = iv_txt請購單號.Text.Trim().ToUpper(); string l_str起始日期 = _txtBDate.Text.Trim(); string l_str結束日期 = _txtEDate.Text.Trim(); CUser l_user = Session[SealedGlobalPage.SESSIONKEY_LOGIN_USER_DATA] as CUser; if (l_user == null) { ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "OK", "alert('閒置過久,請重新登入')", true); return; } string l_str助理員編 = l_user.f_userid帳號;//"F9446";// CKGPartOrderDetailOutFactory l_factory = _context.CFactoryManager. CKGPartOrderDetailOutFactory; CKGPartOrderDetailOut[] l_codes = l_factory.getAll退貨資料By條件(l_str助理員編, l_str請購單號, "", l_str業代員編, "False", l_str起始日期, l_str結束日期); if (l_codes == null) { iv_pnl查詢結果.Visible = false; ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "OK", "alert('無退貨記錄')", true); } else { iv_pnl查詢結果.Visible = true; display退貨記錄(l_codes); } }
private void get退貨記錄(string p_type) { string l_str請購單號 = iv_txt請購單號.Text.Trim().ToUpper(); string l_str退貨所別 = iv_cbo退貨所別.SelectedValue; string l_str退貨日期起 = _txtBDate.Text.Trim(); string l_str退貨日期止 = _txtEDate.Text.Trim(); CKGPartOrderDetailOutFactory l_factory = _context.CFactoryManager.CKGPartOrderDetailOutFactory; CKGPartOrderDetailOut[] l_codes = null; if ("NonCheck".Equals(p_type)) { l_codes = l_factory.getAll退貨資料By條件("", l_str請購單號, l_str退貨所別, "", "False", l_str退貨日期起, l_str退貨日期止); if (l_codes == null) { iv_pnl查詢結果.Visible = false; iv_lblErrorMessage.Text = "無退貨記錄!!"; } else { iv_pnl查詢結果.Visible = true; display退貨記錄(l_codes); } } else { l_codes = l_factory.getAll退貨資料By條件("", l_str請購單號, l_str退貨所別, "", "True", l_str退貨日期起, l_str退貨日期止); if (l_codes == null) { iv_lblErrorMessage.Text = "無退貨歷史記錄!!"; } else { display退貨歷史記錄(l_codes); } } }
private void 查詢資料() { //iv_lblShow訂購單號.Text = ""; //iv_lblShow請購單號.Text = ""; string l_str所別 = iv_cbo所別.SelectedValue; string l_str廠商 = iv_cbo廠商.SelectedValue; string l_str起始日 = _txtBDate.Text.Trim(); string l_str結束日 = _txtEDate.Text.Trim(); CKGPartOrder[] l_codes = _context.CFactoryManager.CKGPartOrderFactory. get小百貨對帳單資訊(l_str起始日, l_str結束日, l_str所別, l_str廠商); if (l_codes == null) { ScriptManager.RegisterClientScriptBlock(UpdatePanel1, typeof(UpdatePanel), "OK", "alert('查無訂購資料');", true); } else { display訂購清單(l_codes); } //退貨資料 CKGPartOrderDetailOutFactory l_factory退貨 = _context.CFactoryManager.CKGPartOrderDetailOutFactory; CKGPartOrderDetailOut[] l_codes退貨 = l_factory退貨.getAll退貨資料By條件("", "", l_str所別, "", "True", l_str起始日, l_str結束日); if (l_codes退貨 == null) { iv_lbl退貨明細.Text = "查詢區間內無退貨記錄"; } else { iv_lbl退貨明細.Text = "退貨明細:"; display退貨歷史記錄(l_codes退貨); } }