using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using GThinking.N_MODEL.Page; using GThinking.N_MODEL.Dialog; using GThinking.N_PUBLIC; using GThinking.N_MISPRO.Utility; using GThinking.N_MISPRO.Data; namespace GThinking.N_XLXSBJ { public partial class XSYBJSQQuery : SingleQueryBase { XSYBJSQ_M queryentity = new XSYBJSQ_M(); #region 页面初始化 protected void Page_Load(object sender, EventArgs e) { this.UMID = 100860061; this.UMName = "查询"; this.CurMaster = Master; this.CurQueryTable = QueryTalbe; this.CurQueryEntity = queryentity; if (!IsPostBack) { InitControl(); } base.InitPage(); } #endregion #region 私有函数 private void InitControl() { WorkFlowUtils.SetCombox_WFSW(this.UMID, tSession, cbxSW); TRYXX.SetComboBox_GH(cbxDCLR, "", true, true); WorkFlowUtils.SetCheckedDropDownList_WFPROC("XLXSBJ_BJD", cbxWFState); TDatabase dberp = TContextDatabases.GetDatabase("DBERP"); TSQL sql = new TSQL(dberp); sql.Clear(); sql.Add("select XSY_TXY,XSY_ZJM from XSY where 1=1 order by XSY_ZJM"); DataSet ds = dberp.OpenDataSet(sql); cbxTXY.ClearItems(); if (ds.Tables[0].Rows.Count > 0) { cbxTXY.Items.Add(new ListItem("", "")); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string sTXY = ds.Tables[0].Rows[i][0].ToString().Trim(); string sZJM = ds.Tables[0].Rows[i][1].ToString().Trim(); if (sZJM.Equals("")) sZJM = CMISproConvert.ConvertZJM(sTXY).Trim(); cbxTXY.Items.Add(new ListItem(sZJM + "|" + sTXY, sTXY)); } } sql.Clear(); ds.Clear(); sql.Add(" SELECT BM_BMID,BM_MC FROM BM where 1=1 "); if (!string.IsNullOrEmpty(GetOption("HJU006").Trim())) { sql.Add(" and " + CMISproDataBase.GetWhereEqual("BM_BMID", GetOption("HJU006").Trim())); } sql.Add(" order by BM_BMID "); ds = dberp.OpenDataSet(sql); cbxXSBM.ClearItems(); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { string sID = ds.Tables[0].Rows[i]["BM_BMID"].ToString().Trim(); string sName = ds.Tables[0].Rows[i]["BM_MC"].ToString().Trim(); cbxXSBM.Items.Add(new ListItem(sName, sID)); } } #endregion #region 控件事件 #endregion } }