protected void Page_Load(object sender, EventArgs e) { backUrl = "BillList.aspx?BillID=" + BillID; if (!IsPostBack) { hidAppPath.Value = WebHelper.GetAppPath(); if (BillID > 0) { SYS_BILL_BLL billExd = new SYS_BILL_BLL(BillID); billExd.SetDefaultValue("DEPT_ID", userBase.DeptID); billExd.SetDefaultValue("STAFF_ID", userBase.StaffID.ToString()); billExd.SetDefaultValue("STAFF_ID_ZD", userBase.StaffID.ToString()); billExd.SetDefaultValue("ZDSJ", DateTime.Now.ToString("yyyy-MM-dd")); if (KeyID > 0) { litBillForm.Text = billExd.HtmlEditForm(KeyID); hidDetailRows.Value = billExd.GetSubNum().ToString(); } else { litBillForm.Text = billExd.HtmlEditForm(); hidDetailRows.Value = "1"; } } } }
protected void Page_Load(object sender, EventArgs e) { SYS_BILL_EXD bill = new SYS_BILL_EXD(int.Parse(Request["BillID"])); SYS_BILL_BLL billExd = new SYS_BILL_BLL(int.Parse(Request["BillID"])); litView.Text = billExd.HtmlEditForm(); hidAppPath.Value = WebHelper.GetAppPath(); List <SYS_BILL_COL> cols = bill.GetColList(); Dictionary <string, int> tbkeynum = new Dictionary <string, int>(); if (cols != null) { for (int i = 0; i < cols.Count; i++) { if (!tbkeynum.ContainsKey(cols[i].TABLE_NAME)) { tbkeynum.Add(cols[i].TABLE_NAME, 0); } if (cols[i].ISPK == "1") { tbkeynum[cols[i].TABLE_NAME] += 1; } } } //foreach (KeyValuePair<string, int> key in tbkeynum) { // //Response.Write(key.Key); // if (key.Value == 0) // { // if (key.Key != bill.Base.TABLE_NAME) // { // litWarn.Text += "主表单里未配置外部关联表" + key.Key + "的主键,无法与外部表信息同步。"; // } // else { // litWarn.Text += key.Key + "未配置主键。"; // } // } // else if (key.Value > 1) // { // if (key.Key != bill.Base.TABLE_NAME) // { // litWarn.Text += "主表单里配置了多个外部关联表"+key.Key + "的主键,可能导致信息同步异常。"; // } // } //} litList.Text = billExd.HtmlList(null); }
protected void Page_Load(object sender, EventArgs e) { SYS_BILL_EXD bill = new SYS_BILL_EXD(int.Parse(Request["BillID"])); SYS_BILL_BLL billExd = new SYS_BILL_BLL(int.Parse(Request["BillID"])); litView.Text = billExd.HtmlEditForm(); hidAppPath.Value = WebHelper.GetAppPath(); List<SYS_BILL_COL> cols = bill.GetColList(); Dictionary<string, int> tbkeynum = new Dictionary<string, int>(); if (cols != null) { for (int i = 0; i < cols.Count; i++) { if (!tbkeynum.ContainsKey(cols[i].TABLE_NAME)) { tbkeynum.Add(cols[i].TABLE_NAME, 0); } if (cols[i].ISPK == "1") { tbkeynum[cols[i].TABLE_NAME] += 1; } } } //foreach (KeyValuePair<string, int> key in tbkeynum) { // //Response.Write(key.Key); // if (key.Value == 0) // { // if (key.Key != bill.Base.TABLE_NAME) // { // litWarn.Text += "主表单里未配置外部关联表" + key.Key + "的主键,无法与外部表信息同步。"; // } // else { // litWarn.Text += key.Key + "未配置主键。"; // } // } // else if (key.Value > 1) // { // if (key.Key != bill.Base.TABLE_NAME) // { // litWarn.Text += "主表单里配置了多个外部关联表"+key.Key + "的主键,可能导致信息同步异常。"; // } // } //} litList.Text = billExd.HtmlList(null); }
protected void Page_Load(object sender, EventArgs e) { #region//导入字段 if (Request["showInHead"] != null) { string colid = Request["id"]; string billid = Request["pid"]; SYS_BILL_COL ccc = new SYS_BILL_COL(); ccc.COL_ID = int.Parse(colid); ccc.BILL_ID = int.Parse(billid); SYS_BILL_COL vvv = new SYS_BILL_COL(); vvv.BILL_ISHEADER = "1"; int re = BLLTable <SYS_BILL_COL> .Factory(conn).Update(vvv, ccc); if (re > 0) { Response.Write("{re:1,msg:'设置成功!'}"); } else { Response.Write("{re:0,msg:'设置失败!'}"); } } #endregion #region//导入字段 if (Request["getBillHtml"] != null) { SYS_BILL_BLL bill = new SYS_BILL_BLL(int.Parse(Request["billid"])); Response.Write(bill.HtmlList(null) + "`" + bill.HtmlEditForm()); } #endregion Response.End(); }
protected void Page_Load(object sender, EventArgs e) { #region//导入字段 if (Request["showInHead"] != null) { string colid = Request["id"]; string billid = Request["pid"]; SYS_BILL_COL ccc = new SYS_BILL_COL(); ccc.COL_ID = int.Parse(colid); ccc.BILL_ID = int.Parse(billid); SYS_BILL_COL vvv = new SYS_BILL_COL(); vvv.BILL_ISHEADER = "1"; int re = BLLTable<SYS_BILL_COL>.Factory(conn).Update(vvv, ccc); if (re > 0) { Response.Write("{re:1,msg:'设置成功!'}"); } else { Response.Write("{re:0,msg:'设置失败!'}"); } } #endregion #region//导入字段 if (Request["getBillHtml"] != null) { SYS_BILL_BLL bill = new SYS_BILL_BLL(int.Parse(Request["billid"])); Response.Write(bill.HtmlList(null) + "`"+bill.HtmlEditForm()); } #endregion Response.End(); }
protected void Page_Load(object sender, EventArgs e) { backUrl = "BillList.aspx?BillID=" + BillID; if (!IsPostBack) { hidAppPath.Value = WebHelper.GetAppPath(); if (BillID > 0) { SYS_BILL_BLL billExd = new SYS_BILL_BLL(BillID); billExd.SetDefaultValue("DEPT_ID", userBase.DeptID); billExd.SetDefaultValue("STAFF_ID", userBase.StaffID.ToString()); billExd.SetDefaultValue("STAFF_ID_ZD", userBase.StaffID.ToString()); billExd.SetDefaultValue("ZDSJ", DateTime.Now.ToString("yyyy-MM-dd")); if (KeyID > 0) { litBillForm.Text = billExd.HtmlEditForm(KeyID); hidDetailRows.Value = billExd.GetSubNum().ToString(); } else { litBillForm.Text = billExd.HtmlEditForm(); hidDetailRows.Value = "1"; } } } }