protected void Page_Load(object sender, EventArgs e) { //SYS_BILL_EXD bill = new SYS_BILL_EXD(int.Parse(Request["BillID"])); //litView.Text = bill.HtmlEditForm(); //litList.Text = bill.HtmlList(); int billid = 0; if (Request["BillID"] != null) { billid = int.Parse(Request["BillID"]); List <SYS_BILL_COL> list = BLLTable <SYS_BILL_COL> .Factory(conn).Select(SYS_BILL_COL.Attribute.BILL_ID, billid); repBillCol.DataSource = list; repBillCol.DataBind(); if (list.Count > 0) { SYS_BILL_BLL bill = new SYS_BILL_BLL(billid); litList.Text = bill.HtmlList(null); //litView.Text = bill.HtmlEditForm(); for (int i = 0; i < 8; i++) { litView.Text += "<tr id='tr_" + i + "'><td class='label' id='tr_" + i + "_1'> " + i + "</td><td> </td><td class='label' id='tr_" + i + "_2'> </td><td> a" + i + "</td></tr>"; } } } }
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"])); //litView.Text = bill.HtmlEditForm(); //litList.Text = bill.HtmlList(); int billid = 0; if (Request["BillID"] != null) { billid = int.Parse(Request["BillID"]); List<SYS_BILL_COL> list = BLLTable<SYS_BILL_COL>.Factory(conn).Select(SYS_BILL_COL.Attribute.BILL_ID, billid); repBillCol.DataSource = list; repBillCol.DataBind(); if (list.Count > 0) { SYS_BILL_BLL bill = new SYS_BILL_BLL(billid); litList.Text = bill.HtmlList(null); //litView.Text = bill.HtmlEditForm(); for (int i = 0; i < 8; i++) { litView.Text += "<tr id='tr_" + i + "'><td class='label' id='tr_" + i + "_1'> "+i+"</td><td> </td><td class='label' id='tr_" + i + "_2'> </td><td> a"+i+"</td></tr>"; } } } }
protected void btnFind_Click(object sender, EventArgs e) { if (BillID > 0) { SYS_BILL_BLL billExd = new SYS_BILL_BLL(BillID); SYS_BILL_OBJ condBill = billExd.GetBillObjByFindForm(); //Response.Write(billExd.GetFindColsObjectString()); litFind.Text = billExd.HtmlFindForm(condBill); litList.Text = billExd.HtmlList(condBill); } }
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) { if (!IsPostBack) { hidAppPath.Value = WebHelper.GetAppPath(); if (BillID > 0) { SYS_BILL_BLL billExd = new SYS_BILL_BLL(BillID); //此查询区可缓存 litFind.Text = billExd.HtmlFindForm(new SYS_BILL_OBJ()); //表体只可部分缓存 litList.Text = billExd.HtmlList(new SYS_BILL_OBJ()); } } }
protected void btnOK_Click(object sender, EventArgs e) { SYS_BILL_BLL billExd = new SYS_BILL_BLL(BillID); int re = 0; if (KeyID > 0) { SYS_BILL_OBJ valBill = billExd.GetBillObjByEditForm(); //valBill.SetValue( //if (billExd.HadSubBill() && hidDetailRows.Value != "") //{ // re = billExd.UpdateRecord(KeyID, int.Parse(hidDetailRows.Value)); //} //else //{ re = billExd.Update(valBill, KeyID.ToString());//requ //} } else { //if (billExd.HadSubBill() && hidDetailRows.Value != "") //{ // re = billExd.InsertRecord(int.Parse(hidDetailRows.Value)); //} //else //{ SYS_BILL_OBJ valBill = billExd.GetBillObjByEditForm(); re = billExd.Insert(new SYS_BILL_OBJ()); //} } if (re > 0) { if (Request["modlg"] != null) { AgileFrame.Core.ScriptHelper.CloseMe(Page); } else { Response.Redirect("BillList.aspx?BillID=" + BillID); } } else { litWarn.Text = "提交失败!"; } }
protected void Page_Load(object sender, EventArgs e) { if (Request["DelByKeyID"] != null) { int kid = int.Parse(Request["DelByKeyID"]); int billid = int.Parse(Request["BillID"]); SYS_BILL_BLL bll = new SYS_BILL_BLL(billid); int re=bll.Delete(kid.ToString()); if (re > 0) { Response.Write("{re:1,msg:'删除单据成功!'}"); } else { Response.Write("{re:0,msg:'删除单据失败!'}"); } } Response.End(); }
protected void Page_Load(object sender, EventArgs e) { if (Request["DelByKeyID"] != null) { int kid = int.Parse(Request["DelByKeyID"]); int billid = int.Parse(Request["BillID"]); SYS_BILL_BLL bll = new SYS_BILL_BLL(billid); int re = bll.Delete(kid.ToString()); if (re > 0) { Response.Write("{re:1,msg:'删除单据成功!'}"); } else { Response.Write("{re:0,msg:'删除单据失败!'}"); } } 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.HtmlShowForm(KeyID.ToString()); hidDetailRows.Value = billExd.GetSubNum().ToString(); } } } }
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) { title = valObj._ZhName + "编辑"; Page.Title = title; if (!string.IsNullOrEmpty(Request["COL_ID"])) { keyid = Request["COL_ID"]; } if (!string.IsNullOrEmpty(Request["KeyID"])) { keyid = Request["KeyID"]; } if (!string.IsNullOrEmpty(Request["edit"])) { keyid = Request["id"]; billid = int.Parse(Request["pid"]); } else { if (!string.IsNullOrEmpty(Request["id"])) { billid = int.Parse(Request["id"]); } } if (!string.IsNullOrEmpty(Request["billid"])) { billid = int.Parse(Request["billid"]); } if (ViewState["KEYID"] != null) { keyid = ViewState["KEYID"].ToString(); } if (!IsPostBack) { foreach (string s in Enum.GetNames(typeof(DataBaseDataType))) { string nnn = s.Replace("_", ""); txtDATA_TYPE.Items.Add(new ListItem(nnn, nnn)); } if (billid > 0) { //txtSEL_KEY.Items.Add(new ListItem("默认主键ID", "BILL_ID")); SYS_BILL_BLL bllexd = new SYS_BILL_BLL(billid); if (bllexd.PKeyColSyn != null) { string name = bllexd.PKeyColSyn.Base._COL_NOTE; if (name == "") { name = bllexd.PKeyColSyn.COL_NAME; } txtSEL_KEY.Items.Add(new ListItem(name, bllexd.PKeyColSyn.COL_NAME)); } SYS_BILL_COL ccc = new SYS_BILL_COL(); ccc.BILL_ID = billid; ccc.FORM_SHOW = "1"; ccc.IS_AUTO = "0"; ccc.ISPK = "0"; List <SYS_BILL_COL> lstCol = BLLTable <SYS_BILL_COL> .Factory(conn).Select(new SYS_BILL_COL(), ccc); if (lstCol != null) { for (int i = 0; i < lstCol.Count; i++) { //txtCOL_SYN_TO.Items.Add(new ListItem(lstCol[i].COL_NOTE, lstCol[i].COL_NAME)); if (lstCol[i].ISPK == "1") { txtSEL_KEY.Items.Add(new ListItem(lstCol[i].COL_NOTE, lstCol[i].COL_NAME)); } if (!lstCol[i].IsNumber()) { txtSEL_NAME.Items.Add(new ListItem(lstCol[i].COL_NOTE, lstCol[i].COL_NAME)); } } } } //try //{ ViewState["FORM_CTRL_ID"] = "0"; SYS_BILL billObj = BLLTable <SYS_BILL> .Factory(conn).GetRowData(SYS_BILL.Attribute.BILL_ID, billid); hidTABLE_NAME.Value = billObj.TABLE_NAME; if (keyid != "") { valObj = BLLTable <SYS_BILL_COL> .Factory(conn).GetRowData(SYS_BILL_COL.Attribute.COL_ID, keyid); if (valObj == null) { return; } txtISPK.Value = valObj.ISPK; txtCOL_ID.Value = Convert.ToString(valObj.COL_ID); //Convert.ToInt32 txtBILL_ID.Value = Convert.ToString(valObj.BILL_ID); //Convert.ToInt32 txtTABLE_NAME.Value = Convert.ToString(valObj.TABLE_NAME); //Convert.ToString txtCOL_NAME.Value = Convert.ToString(valObj.COL_NAME); //Convert.ToString ViewState["txtCOL_NAME"] = txtCOL_NAME.Value; hidFK_NAME.Value = valObj.FK_NAME; txtCOL_NOTE.Value = Convert.ToString(valObj.COL_NOTE); //Convert.ToString txtDATA_TYPE.Value = Convert.ToString(valObj.DATA_TYPE); //Convert.ToString txtDATA_LEN.Value = Convert.ToString(valObj.DATA_LEN); //Convert.ToInt32 txtDATA_ACC.Value = Convert.ToString(valObj.DATA_ACC); //Convert.ToInt32 txtIS_AUTO.Value = Convert.ToString(valObj.IS_AUTO); //Convert.ToString txtSORT_NO.Value = Convert.ToString(valObj.SORT_NO); //Convert.ToInt32 txtCOL_SHOW.Value = Convert.ToString(valObj.FK_SHOW); //Convert.ToString txtDISPLAY_NAME.Value = Convert.ToString(valObj.DISPLAY_NAME); //Convert.ToString txtTITLE.Value = Convert.ToString(valObj.TITLE); //Convert.ToString txtDVAL.Value = Convert.ToString(valObj.DVAL); //Convert.ToString txtBILL_ROW_FORMULAR.Value = Convert.ToString(valObj.BILL_ROW_FORMULAR); //Convert.ToString txtBILL_COL_FORMULAR.Value = Convert.ToString(valObj.BILL_COL_FORMULAR); //Convert.ToString txtBILL_ISHEADER.Value = Convert.ToString(valObj.BILL_ISHEADER); //Convert.ToString txtBILL_HERDERWIDTH.Value = Convert.ToString(valObj.BILL_HERDERWIDTH); //Convert.ToInt32 txtFORM_CHECKTYPE.Value = Convert.ToString(valObj.FORM_CHECKTYPE); //Convert.ToString //txtFORM_CTRL_ID.Value = Convert.ToString(valObj.FORM_CTRL_ID);//Convert.ToInt32 ViewState["FORM_CTRL_ID"] = valObj.FORM_CTRL_ID; txtFORM_SHOW.Value = Convert.ToString(valObj.FORM_SHOW); //Convert.ToString txtFORM_NEED.Value = Convert.ToString(valObj.FORM_NEED); //Convert.ToString txtFORM_MIN.Value = Convert.ToString(valObj.FORM_MIN); //Convert.ToString txtFORM_MAX.Value = Convert.ToString(valObj.FORM_MAX); //Convert.ToString txtFORM_ONEROW.Value = Convert.ToString(valObj.FORM_ONEROW); //Convert.ToString txtFORM_CTRLWIDTH.Value = Convert.ToString(valObj.FORM_CTRLWIDTH); //Convert.ToInt32 txtSEARCH_INBILL.Value = Convert.ToString(valObj.SEARCH_INBILL); //Convert.ToString txtSEARCH_TYPE.Value = Convert.ToString(valObj.SEARCH_TYPE); //Convert.ToString txtSEARCH_FORMULAR.Value = Convert.ToString(valObj.SEARCH_FORMULAR); //Convert.ToString //hidIsFK.Value = valObj.ISFK; txtBILL_AFTREDTL.Value = valObj.BILL_AFTREDTL; //txtTAVLE_EXISTS.Checked = valObj.TABLE_EXISTS == "1"; //txtCOL_SYN_TO.Value = valObj.COL_SYN_TO; // txtCONN_SOURCE.Value = valObj.CONN_SOURCE; if (!string.IsNullOrEmpty(valObj.SEL_TB_COL)) { string[] arr = valObj.SEL_TB_COL.Split(','); txtSEL_TBNAME.Value = arr[0]; // + "," + txtSEL_KEY.Value = arr[1]; // + "," + txtSEL_NAME.Value = arr[2]; } txtPK_VALCODE.Value = valObj.PK_VALCODE; if ("31,32,33".IndexOf(valObj.FORM_CTRL_ID.ToString()) != -1) { liSetItems.Visible = true; } if (billObj.P_BILL_ID > 0) { dl_BILL_COL_FORMULAR.Visible = true; dl_BILL_ROW_FORMULAR.Visible = true; } else { dl_BILL_COL_FORMULAR.Visible = true; } txtSEL_TBNAME.Value = valObj.TABLE_NAME; if (valObj.IS_COL_EXISTS == "1") { txtCOL_NAME.Disabled = true; txtDATA_TYPE.Disabled = true; txtDATA_LEN.Disabled = true; txtDATA_ACC.Disabled = true; txtTABLE_NAME.Disabled = true; txtIS_AUTO.Disabled = true; txtISPK.Disabled = true; btnSelCol.Visible = false; } } else { txtBILL_ID.Value = billid.ToString(); txtTABLE_NAME.Value = billObj.TABLE_NAME; txtSEL_TBNAME.Value = billObj.TABLE_NAME; SYS_BILL_COL cccmax = new SYS_BILL_COL(); cccmax.BILL_ID = billid; string sort = BLLTable <SYS_BILL_COL> .Max(SYS_BILL_COL.Attribute.SORT_NO, cccmax); if (!string.IsNullOrEmpty(sort)) { txtSORT_NO.Value = (int.Parse(sort) + 1).ToString(); } } #region //初始化控件类型 SYS_BILL_CTRL ctrlCond = new SYS_BILL_CTRL(); ctrlCond.OrderBy(TF_CTRL_TYPE.Attribute.SORT_NO, Order.Asc); DataTable dtCtrl = BLLTable <SYS_BILL_CTRL> .SelectForDataTable(new SYS_BILL_CTRL(), ctrlCond); //ViewState["CTRL_TYPE"] = txtFORM_CTRL_ID.Value; DataView dv1 = new DataView(); dv1.Table = dtCtrl; dv1.RowFilter = "P_CTRL_ID='0'"; dv1.Sort = "SORT_NO asc"; for (int i = 0; i < dv1.Count; i++) { litCTRL_TYPE.Text += "<optgroup label='" + dv1[i]["CTRL_NAME"].ToString() + "'>"; DataView dv2 = new DataView(); dv2.Table = dtCtrl; dv2.RowFilter = "P_CTRL_ID='" + dv1[i]["CTRL_ID"].ToString() + "'"; dv2.Sort = "SORT_NO asc"; for (int a = 0; a < dv2.Count; a++) { if (valObj != null && ViewState["FORM_CTRL_ID"].ToString() == dv2[a]["CTRL_ID"].ToString()) { litCTRL_TYPE.Text += "<option value='" + dv2[a]["CTRL_ID"].ToString() + "' selected='selected'>" + dv2[a]["CTRL_NAME"].ToString() + "</option>"; } else { litCTRL_TYPE.Text += "<option value='" + dv2[a]["CTRL_ID"].ToString() + "'>" + dv2[a]["CTRL_NAME"].ToString() + "</option>"; } } litCTRL_TYPE.Text += "</optgroup>"; } #endregion //} //catch (Exception ex) //{ // litWarn.Text = ex.Message; //} } }
protected void Page_Load(object sender, EventArgs e) { title = valObj._ZhName + "�༭"; Page.Title = title; if (!string.IsNullOrEmpty(Request["COL_ID"])) { keyid = Request["COL_ID"]; } if (!string.IsNullOrEmpty(Request["KeyID"])) { keyid = Request["KeyID"]; } if (!string.IsNullOrEmpty(Request["edit"])) { keyid = Request["id"]; billid = int.Parse(Request["pid"]); } else { if (!string.IsNullOrEmpty(Request["id"])) { billid = int.Parse(Request["id"]); } } if (!string.IsNullOrEmpty(Request["billid"])) { billid = int.Parse(Request["billid"]); } if (ViewState["KEYID"] != null) { keyid = ViewState["KEYID"].ToString(); } if (!IsPostBack) { foreach (string s in Enum.GetNames(typeof(DataBaseDataType))) { string nnn = s.Replace("_", ""); txtDATA_TYPE.Items.Add(new ListItem(nnn, nnn)); } if (billid > 0) { //txtSEL_KEY.Items.Add(new ListItem("Ĭ������ID", "BILL_ID")); SYS_BILL_BLL bllexd = new SYS_BILL_BLL(billid); if (bllexd.PKeyColSyn != null) { string name = bllexd.PKeyColSyn.Base._COL_NOTE; if (name == "") { name = bllexd.PKeyColSyn.COL_NAME; } txtSEL_KEY.Items.Add(new ListItem(name, bllexd.PKeyColSyn.COL_NAME)); } SYS_BILL_COL ccc = new SYS_BILL_COL(); ccc.BILL_ID = billid; ccc.FORM_SHOW = "1"; ccc.IS_AUTO = "0"; ccc.ISPK = "0"; List<SYS_BILL_COL> lstCol = BLLTable<SYS_BILL_COL>.Factory(conn).Select(new SYS_BILL_COL(), ccc); if (lstCol != null) { for (int i = 0; i < lstCol.Count; i++) { //txtCOL_SYN_TO.Items.Add(new ListItem(lstCol[i].COL_NOTE, lstCol[i].COL_NAME)); if (lstCol[i].ISPK == "1") { txtSEL_KEY.Items.Add(new ListItem(lstCol[i].COL_NOTE, lstCol[i].COL_NAME)); } if (!lstCol[i].IsNumber()) { txtSEL_NAME.Items.Add(new ListItem(lstCol[i].COL_NOTE, lstCol[i].COL_NAME)); } } } } //try //{ ViewState["FORM_CTRL_ID"] = "0"; SYS_BILL billObj = BLLTable<SYS_BILL>.Factory(conn).GetRowData(SYS_BILL.Attribute.BILL_ID, billid); hidTABLE_NAME.Value = billObj.TABLE_NAME; if (keyid != "") { valObj = BLLTable<SYS_BILL_COL>.Factory(conn).GetRowData(SYS_BILL_COL.Attribute.COL_ID, keyid); if (valObj == null) return; txtISPK.Value = valObj.ISPK; txtCOL_ID.Value = Convert.ToString(valObj.COL_ID);//Convert.ToInt32 txtBILL_ID.Value = Convert.ToString(valObj.BILL_ID);//Convert.ToInt32 txtTABLE_NAME.Value = Convert.ToString(valObj.TABLE_NAME);//Convert.ToString txtCOL_NAME.Value = Convert.ToString(valObj.COL_NAME);//Convert.ToString ViewState["txtCOL_NAME"] = txtCOL_NAME.Value; hidFK_NAME.Value = valObj.FK_NAME; txtCOL_NOTE.Value = Convert.ToString(valObj.COL_NOTE);//Convert.ToString txtDATA_TYPE.Value = Convert.ToString(valObj.DATA_TYPE);//Convert.ToString txtDATA_LEN.Value = Convert.ToString(valObj.DATA_LEN);//Convert.ToInt32 txtDATA_ACC.Value = Convert.ToString(valObj.DATA_ACC);//Convert.ToInt32 txtIS_AUTO.Value = Convert.ToString(valObj.IS_AUTO);//Convert.ToString txtSORT_NO.Value = Convert.ToString(valObj.SORT_NO);//Convert.ToInt32 txtCOL_SHOW.Value = Convert.ToString(valObj.FK_SHOW);//Convert.ToString txtDISPLAY_NAME.Value = Convert.ToString(valObj.DISPLAY_NAME);//Convert.ToString txtTITLE.Value = Convert.ToString(valObj.TITLE);//Convert.ToString txtDVAL.Value = Convert.ToString(valObj.DVAL);//Convert.ToString txtBILL_ROW_FORMULAR.Value = Convert.ToString(valObj.BILL_ROW_FORMULAR);//Convert.ToString txtBILL_COL_FORMULAR.Value = Convert.ToString(valObj.BILL_COL_FORMULAR);//Convert.ToString txtBILL_ISHEADER.Value = Convert.ToString(valObj.BILL_ISHEADER);//Convert.ToString txtBILL_HERDERWIDTH.Value = Convert.ToString(valObj.BILL_HERDERWIDTH);//Convert.ToInt32 txtFORM_CHECKTYPE.Value = Convert.ToString(valObj.FORM_CHECKTYPE);//Convert.ToString //txtFORM_CTRL_ID.Value = Convert.ToString(valObj.FORM_CTRL_ID);//Convert.ToInt32 ViewState["FORM_CTRL_ID"] = valObj.FORM_CTRL_ID; txtFORM_SHOW.Value = Convert.ToString(valObj.FORM_SHOW);//Convert.ToString txtFORM_NEED.Value = Convert.ToString(valObj.FORM_NEED);//Convert.ToString txtFORM_MIN.Value = Convert.ToString(valObj.FORM_MIN);//Convert.ToString txtFORM_MAX.Value = Convert.ToString(valObj.FORM_MAX);//Convert.ToString txtFORM_ONEROW.Value = Convert.ToString(valObj.FORM_ONEROW);//Convert.ToString txtFORM_CTRLWIDTH.Value = Convert.ToString(valObj.FORM_CTRLWIDTH);//Convert.ToInt32 txtSEARCH_INBILL.Value = Convert.ToString(valObj.SEARCH_INBILL);//Convert.ToString txtSEARCH_TYPE.Value = Convert.ToString(valObj.SEARCH_TYPE);//Convert.ToString txtSEARCH_FORMULAR.Value = Convert.ToString(valObj.SEARCH_FORMULAR);//Convert.ToString //hidIsFK.Value = valObj.ISFK; txtBILL_AFTREDTL.Value = valObj.BILL_AFTREDTL; //txtTAVLE_EXISTS.Checked = valObj.TABLE_EXISTS == "1"; //txtCOL_SYN_TO.Value = valObj.COL_SYN_TO; // txtCONN_SOURCE.Value = valObj.CONN_SOURCE; if (!string.IsNullOrEmpty(valObj.SEL_TB_COL)) { string[] arr = valObj.SEL_TB_COL.Split(','); txtSEL_TBNAME.Value = arr[0];// + "," + txtSEL_KEY.Value = arr[1];// + "," + txtSEL_NAME.Value = arr[2]; } txtPK_VALCODE.Value = valObj.PK_VALCODE; if ("31,32,33".IndexOf(valObj.FORM_CTRL_ID.ToString()) != -1) { liSetItems.Visible = true; } if (billObj.P_BILL_ID > 0) { dl_BILL_COL_FORMULAR.Visible = true; dl_BILL_ROW_FORMULAR.Visible = true; } else { dl_BILL_COL_FORMULAR.Visible = true; } txtSEL_TBNAME.Value = valObj.TABLE_NAME; if (valObj.IS_COL_EXISTS == "1") { txtCOL_NAME.Disabled = true; txtDATA_TYPE.Disabled = true; txtDATA_LEN.Disabled = true; txtDATA_ACC.Disabled = true; txtTABLE_NAME.Disabled = true; txtIS_AUTO.Disabled = true; txtISPK.Disabled = true; btnSelCol.Visible = false; } } else { txtBILL_ID.Value = billid.ToString(); txtTABLE_NAME.Value = billObj.TABLE_NAME; txtSEL_TBNAME.Value = billObj.TABLE_NAME; SYS_BILL_COL cccmax = new SYS_BILL_COL(); cccmax.BILL_ID = billid; string sort = BLLTable<SYS_BILL_COL>.Max(SYS_BILL_COL.Attribute.SORT_NO, cccmax); if (!string.IsNullOrEmpty(sort)) { txtSORT_NO.Value = (int.Parse(sort)+1).ToString(); } } #region//��ʼ���ؼ����� SYS_BILL_CTRL ctrlCond = new SYS_BILL_CTRL(); ctrlCond.OrderBy(TF_CTRL_TYPE.Attribute.SORT_NO, Order.Asc); DataTable dtCtrl = BLLTable<SYS_BILL_CTRL>.SelectForDataTable(new SYS_BILL_CTRL(), ctrlCond); //ViewState["CTRL_TYPE"] = txtFORM_CTRL_ID.Value; DataView dv1 = new DataView(); dv1.Table = dtCtrl; dv1.RowFilter = "P_CTRL_ID='0'"; dv1.Sort = "SORT_NO asc"; for (int i = 0; i < dv1.Count; i++) { litCTRL_TYPE.Text += "<optgroup label='" + dv1[i]["CTRL_NAME"].ToString() + "'>"; DataView dv2 = new DataView(); dv2.Table = dtCtrl; dv2.RowFilter = "P_CTRL_ID='" + dv1[i]["CTRL_ID"].ToString() + "'"; dv2.Sort = "SORT_NO asc"; for (int a = 0; a < dv2.Count; a++) { if (valObj != null && ViewState["FORM_CTRL_ID"].ToString() == dv2[a]["CTRL_ID"].ToString()) { litCTRL_TYPE.Text += "<option value='" + dv2[a]["CTRL_ID"].ToString() + "' selected='selected'>" + dv2[a]["CTRL_NAME"].ToString() + "</option>"; } else { litCTRL_TYPE.Text += "<option value='" + dv2[a]["CTRL_ID"].ToString() + "'>" + dv2[a]["CTRL_NAME"].ToString() + "</option>"; } } litCTRL_TYPE.Text += "</optgroup>"; } #endregion //} //catch (Exception ex) //{ // litWarn.Text = ex.Message; //} } }