Files
N_XLXSBJ----MX/XSBJYWPZ_MRXHDYQuery.aspx.cs
2026-08-21 17:03:02 +08:00

114 lines
3.4 KiB
C#

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_MISPRO.Utility;
using GThinking.N_MISPRO.Data;
using GThinking.N_WORKFLOW;
using GThinking.N_PUBLIC;
using GThinking.N_MODEL.Dialog;
namespace GThinking.N_XLXSBJ
{
public partial class XSBJYWPZ_MRXHDYQuery : SingleQueryBase
{
XSBJYWPZ_MRXHDY_M queryentity = new XSBJYWPZ_MRXHDY_M();
protected void Page_Load(object sender, EventArgs e)
{
this.UMID = 100860062;
this.UMName = "销售报价业务配置";
this.CurMaster = Master;
this.CurQueryTable = QueryTalbe;
this.CurQueryEntity = queryentity;
if (!IsPostBack)
{
InitControl();
}
base.InitPage();
}
protected override bool QueryLogicValid()
{
string sXLXHID = txtXLXHID.Text.Trim();
string[] sTempXLXHID = sXLXHID.Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
if (sTempXLXHID.Length >= 2 && chkXLXHIDJQPP.Checked == false)
{
ShowMessage("多型号查询时,型号精确匹配必须勾选!");
return false;
}
return base.QueryLogicValid();
}
#region 私有函数
private void InitControl()
{
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
TSQL sql = new TSQL(dberp);
sql.Add("select XLDYDJB_DYDJID as ID,XLDYDJB_DYDJID as Name from XLDYDJB where isnull(XLDYDJB_TYBZ,'N')<>'Y' order by XLDYDJB_XH ");
DataSet ds = dberp.OpenDataSet(sql);
drpDYDJID.Items.Clear();
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
string sID = ds.Tables[0].Rows[i]["ID"].ToString().Trim();
string sName = ds.Tables[0].Rows[i]["Name"].ToString().Trim();
drpDYDJID.Items.Add(new ListItem(sName, sID));
}
TComboBox.SetComboBox("DBERP", cbxXLBZ, " select XLBZ_XLBZID as ID,XLBZ_XLBZLXMC as Name from XLBZ where 1=1 order by XLBZ_DZSC,XLBZ_PX,ID ", true);
}
#endregion
#region 控件事件
protected void txtXLXHID_OnTextChanged(object Sender, EventArgs e)
{
if (!txtXLXHID.Text.Trim().Equals(""))
{
string sXLXHID = txtXLXHID.Text.Trim();
string[] sTemp = sXLXHID.Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
if (sTemp.Length >= 2)
{
if (chkXLXHIDJQPP.Checked == false)
{
chkXLXHIDJQPP.Checked = true;
}
}
else
{
}
}
}
protected void chkXLXHIDJQPP_OnCheckedChanged(object Sender, EventArgs e)
{
string sXLXHID = txtXLXHID.Text.Trim();
string[] sTemp = sXLXHID.Split(new Char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
if (sTemp.Length >= 2)
{
}
else
{
txtXLXHID_OnTextChanged(null, null);
}
}
#endregion
}
}