2026821
This commit is contained in:
@@ -0,0 +1,116 @@
|
||||
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.Data;
|
||||
using GThinking.N_MISPRO.Utility;
|
||||
|
||||
namespace GThinking.N_XLXSBJ
|
||||
{
|
||||
public partial class CLYLQuery : SingleQueryBase
|
||||
{
|
||||
CLYL_M queryentity = new CLYL_M();
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UMID = 100860014;
|
||||
this.UMName = "线缆销售报价材料用量";
|
||||
this.CurMaster = Master;
|
||||
this.CurQueryTable = QueryTable;
|
||||
this.CurQueryEntity = queryentity;
|
||||
base.InitPage();
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InitControl();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPreRender(EventArgs e)
|
||||
{
|
||||
if (!txtDYBJDH.Text.Trim().Equals(""))
|
||||
{
|
||||
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
||||
TSQL sql = new TSQL(dberp);
|
||||
sql.Add("select XLJGCZBML_JGCZBID,XLJGCZBML_JGCZBMC,XLJGCZBML_JGCZBBBID ");
|
||||
sql.Add(" from XLJGCZBML ");
|
||||
sql.Add(" where 1=1 ");
|
||||
sql.Add(" and exists(select 1 from XLXSBJYLZDMX ");
|
||||
sql.Add(" left join XLXSBJYLZD on XLXSBJYLZD_SQDH = XLXSBJYLZDMX_SQDH ");
|
||||
sql.Add(" left join XLXSCLQD on XLXSCLQD_XLXHID=XLXSBJYLZDMX_XLXHID and XLXSCLQD_XLGGID = XLXSBJYLZDMX_XLGGID and XLXSCLQD_XLBZID=XLXSBJYLZDMX_XLBZID and XLXSCLQD_DYDJID = XLXSBJYLZDMX_DYDJID ");
|
||||
sql.Add(" where XLXSCLQD_JGCZBID =XLJGCZBML_JGCZBID and XLXSCLQD_JGCZBBBID = XLJGCZBML_JGCZBBBID and XLXSBJYLZD_BJDID=:pBJDID) ");
|
||||
sql.Add(" order by XLJGCZBML_JGCZBID");
|
||||
sql.ParamByName("pBJDID").Value = txtDYBJDH.Text.Trim();
|
||||
DataSet ds = dberp.OpenDataSet(sql);
|
||||
cbxJGCZB.ClearItems();
|
||||
cbxJGCZB.Items.Add(new ListItem("", ""));
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
string sJGCZBBBID = ds.Tables[0].Rows[i]["XLJGCZBML_JGCZBBBID"].ToString().Trim();
|
||||
cbxJGCZB.Items.Add(new ListItem(ds.Tables[0].Rows[i]["XLJGCZBML_JGCZBID"].ToString().Trim() + "|" + ds.Tables[0].Rows[i]["XLJGCZBML_JGCZBMC"].ToString().Trim() + "|" + sJGCZBBBID
|
||||
, ds.Tables[0].Rows[i]["XLJGCZBML_JGCZBID"].ToString().Trim() + "|" + sJGCZBBBID));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
||||
TSQL sql = new TSQL(dberp);
|
||||
sql.Add("select distinct XLJGCZBML_JGCZBID,XLJGCZBML_JGCZBMC,XLJGCZBML_JGCZBBBID ");
|
||||
sql.Add(" from XLJGCZBML ");
|
||||
sql.Add(" where XLJGCZBML_CZBLX = 'A'");
|
||||
sql.Add(" order by XLJGCZBML_JGCZBID");
|
||||
DataSet ds = dberp.OpenDataSet(sql);
|
||||
cbxJGCZB.ClearItems();
|
||||
cbxJGCZB.Items.Add(new ListItem("", ""));
|
||||
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
|
||||
{
|
||||
string sJGCZBBBID = ds.Tables[0].Rows[i]["XLJGCZBML_JGCZBBBID"].ToString().Trim();
|
||||
cbxJGCZB.Items.Add(new ListItem(ds.Tables[0].Rows[i]["XLJGCZBML_JGCZBID"].ToString().Trim() + "|" + ds.Tables[0].Rows[i]["XLJGCZBML_JGCZBMC"].ToString().Trim() + "|" + sJGCZBBBID
|
||||
, ds.Tables[0].Rows[i]["XLJGCZBML_JGCZBID"].ToString().Trim() + "|" + sJGCZBBBID));
|
||||
}
|
||||
}
|
||||
base.OnPreRender(e);
|
||||
}
|
||||
|
||||
#region 自定义事件
|
||||
|
||||
private void InitControl()
|
||||
{
|
||||
WorkFlowUtils.SetCombox_WFSW(this.UMID, tSession, cbxSW);
|
||||
TRYXX.SetComboBox_GH(cbxWFAWAITER, "", true, true);
|
||||
WorkFlowUtils.SetCheckedDropDownList_WFPROC("XLXSBJCLYL", cbxLCZT);
|
||||
cbxWFAWAITER.ShowValue = false;
|
||||
|
||||
cbxPXFS.ClearItems();
|
||||
cbxPXFS.Items.Add(new ListItem("", ""));
|
||||
cbxPXFS.Items.Add(new ListItem("维护时间倒排", "维护时间倒排"));
|
||||
cbxPXFS.Items.Add(new ListItem("报价单号+显示序号", "报价单号+显示序号"));
|
||||
|
||||
|
||||
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
||||
TSQL sql = new TSQL(dberp);
|
||||
TComboBox.SetComboBox("DBERP", cbxXLXHID, "select XLXHB_XLXHID as ID,XLXHB_XLXHID as Name from XLXHB where XLXHB_XLXHID in (select XLXSCLQD_XLXHID from XLXSCLQD where 1=1) order by ID ", true);
|
||||
TComboBox.SetComboBox("DBERP", cbxGCID, "select GC_GCID,case isnull(GC_TYBZ,'N') when 'Y' then rtrim(GC_GCMC)||'(停用)' else GC_GCMC end as Name from GC where 1=1 order by isnull(GC_TYBZ,'N'),GC_GCID ", true);
|
||||
TComboBox.SetComboBox("DBERP", cbxCPMLID, "SELECT XLXSCPML_CPMLID,XLXSCPML_CPMLMC FROM XLXSCPML where 1=1 order by XLXSCPML_CPMLID ", true);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void cbxJGCZB_SelectedIndexChanged(object Sender, EventArgs e)
|
||||
{
|
||||
if (!cbxJGCZB.SelectedValue.Trim().Equals(""))
|
||||
txtJGCZBBBID.Text = cbxJGCZB.SelectedValue.Trim().Split('|')[1];
|
||||
else
|
||||
txtJGCZBBBID.Text = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user