2026821
This commit is contained in:
@@ -0,0 +1,165 @@
|
||||
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.Data;
|
||||
using GThinking.N_MISPRO.Utility;
|
||||
|
||||
namespace GThinking.N_XLXSBJ
|
||||
{
|
||||
[TableMap(DB = "DBERP", DbTableName = "XLWBBJDMX", Umid = 100860043, IsWorkFlow = false, IsAttach = false)]
|
||||
public class XLWBBJDMXDR : EntityManager { }
|
||||
public partial class DRASKInfo : SingleCardBase
|
||||
{
|
||||
XLWBBJDMXDR entity = new XLWBBJDMXDR();
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UMID = 100860043;
|
||||
this.UMName = "外部线缆产品导入";
|
||||
this.CurMaster = Master;
|
||||
this.CurEntity = entity;
|
||||
this.PageHeight = 180;
|
||||
this.PageWidth = 400;
|
||||
Master.EnableAttachBtn = false;
|
||||
Master.EnableCancelBtn = false;
|
||||
Master.EnableCopyBtn = false;
|
||||
Master.EnableDeleteBtn = false;
|
||||
Master.EnableEditBtn = false;
|
||||
Master.EnableInsertBtn = false;
|
||||
Master.EnablePrintBtn = false;
|
||||
Master.EnableRefreshBtn = false;
|
||||
Master.EnableSaveBtn = false;
|
||||
Master.IsWorkFlow = false;
|
||||
base.InitPage();
|
||||
if (!IsPostBack)
|
||||
{
|
||||
if (this.PageHeight > 180)
|
||||
txtSM.Height = Unit.Parse(Convert.ToString(this.PageHeight - 170) + "px");
|
||||
InitControl();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitControl()
|
||||
{
|
||||
txtSM.Enabled = false;
|
||||
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
|
||||
TSQL sSQL = new TSQL(dberp);
|
||||
string sMsg = "";
|
||||
//string sDRHH = "";
|
||||
//string sMSG = "";
|
||||
//string sBJCPMX = "";
|
||||
//string sXLXHIDMX = "";
|
||||
//string sXLGGIDMX = "";
|
||||
//string sDYDJIDMX = "";
|
||||
string sWBBJDID = PageParam.GetRTrimString("sWBBJDID");
|
||||
string sXLBJDID = PageParam.GetRTrimString("sXLBJDID");
|
||||
int sign1 = CMISproConvert.StrToInt(PageParam.GetRTrimString("sign1"));
|
||||
int sign2 = CMISproConvert.StrToInt(PageParam.GetRTrimString("sign2"));
|
||||
int sign3 = CMISproConvert.StrToInt(PageParam.GetRTrimString("sign3"));
|
||||
int sign4 = CMISproConvert.StrToInt(PageParam.GetRTrimString("sign4"));
|
||||
|
||||
//无表价/无清单查询
|
||||
string sWCLQDList = "";
|
||||
sSQL.Clear();
|
||||
sSQL.Add(" select XLWBBJDMX_DRHH,XLWBBJDMX_BJCP,XLWBBJDMX_XLXHID,XLWBBJDMX_XLGGID,XLWBBJDMX_DYDJID from XLWBBJDMX ");
|
||||
sSQL.Add(" where 1 = 1 ");
|
||||
sSQL.Add(" and XLWBBJDMX_WBBJDID=:pWBBJDID and XLWBBJDMX_BJDID=:pBJDID ");
|
||||
string sJGBID = PageParam.GetRTrimString("sJGBID");
|
||||
string sJGFID = PageParam.GetRTrimString("sJGFID");
|
||||
string sJGCIDS = PageParam.GetRTrimString("sJGCIDS");
|
||||
if (XLBJDUtils.IsJGEJGB(sJGBID))
|
||||
sSQL.Add(" and not exists (select 1 from XLXSCLQD WHERE XLXSCLQD_WPID='ZZZZ' and XLXSCLQD_XLXHID=XLWBBJDMX_XLXHID and XLXSCLQD_XLGGID = XLWBBJDMX_XLGGID and XLXSCLQD_XLBZID=isnull(XLWBBJDMX_XLBZID,' ') and XLXSCLQD_DYDJID=isnull(XLWBBJDMX_DYDJID,' ')) ");
|
||||
else
|
||||
{
|
||||
if (sJGCIDS.Equals(""))
|
||||
{
|
||||
sSQL.Add(" and not exists (select 1 from XLXSJGBMX WHERE XLXSJGBMX_JGBID = '" + sJGBID + "' and XLXSJGBMX_XLXHID=XLWBBJDMX_XLXHID and XLXSJGBMX_XLGGID = XLWBBJDMX_XLGGID and XLXSJGBMX_XLBZID=isnull(XLWBBJDMX_XLBZID,' ') and XLXSJGBMX_DYDJID=isnull(XLWBBJDMX_DYDJID,' ')) ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sSQL.Add(" and not exists (select 1 from XLXSJGBMX WHERE " + CMISproDataBase.GetWhereEqual("XLXSJGBMX_JGBID", sJGCIDS) + " and XLXSJGBMX_XLXHID=XLWBBJDMX_XLXHID and XLXSJGBMX_XLGGID = XLWBBJDMX_XLGGID and XLXSJGBMX_XLBZID=isnull(XLWBBJDMX_XLBZID,' ') and XLXSJGBMX_DYDJID=isnull(XLWBBJDMX_DYDJID,' ')) ");
|
||||
}
|
||||
}
|
||||
if (!sJGFID.Equals(""))
|
||||
sSQL.Add(" and not exists (select 1 from XLXSJGBMX WHERE XLXSJGBMX_JGBID = '" + sJGFID + "' and XLXSJGBMX_XLXHID=XLWBBJDMX_XLXHID and XLXSJGBMX_XLGGID = XLWBBJDMX_XLGGID and XLXSJGBMX_XLBZID=isnull(XLWBBJDMX_XLBZID,' ') and XLXSJGBMX_DYDJID=isnull(XLWBBJDMX_DYDJID,' ')) ");
|
||||
sSQL.Add("order by XLWBBJDMX_DRHH ");
|
||||
sSQL.ParamByName("pWBBJDID").Value = sWBBJDID;
|
||||
sSQL.ParamByName("pBJDID").Value = sXLBJDID;
|
||||
DataSet dsCLQDSC = dberp.OpenDataSet(sSQL);
|
||||
if (dsCLQDSC.Tables[0].Rows.Count > 0)
|
||||
{
|
||||
sign4 = 1;
|
||||
foreach (DataRow trow in dsCLQDSC.Tables[0].Rows)
|
||||
{
|
||||
string sBJCPDWCLQD = trow["XLWBBJDMX_BJCP"].ToString().Trim();
|
||||
string sDRHHWCLQD = trow["XLWBBJDMX_DRHH"].ToString().Trim();
|
||||
string sXLXHIDWCLQD = trow["XLWBBJDMX_XLXHID"].ToString().Trim();
|
||||
string sXLGGIDWCLQD = trow["XLWBBJDMX_XLGGID"].ToString().Trim();
|
||||
string sDYDJIDWCLQD = trow["XLWBBJDMX_DYDJID"].ToString().Trim();
|
||||
if (!sWCLQDList.Equals(""))
|
||||
sWCLQDList += "\r\n";
|
||||
sWCLQDList += "[" + sDRHHWCLQD + "] [" + sBJCPDWCLQD + "] " + sXLXHIDWCLQD + " " + sXLGGIDWCLQD + " " + sDYDJIDWCLQD;
|
||||
}
|
||||
}
|
||||
if (1 == sign1)
|
||||
{
|
||||
sMsg = sMsg + "型号、";
|
||||
}
|
||||
|
||||
if (1 == sign2)
|
||||
{
|
||||
sMsg = sMsg + "规格、";
|
||||
}
|
||||
|
||||
if (1 == sign3)
|
||||
{
|
||||
sMsg = sMsg + "电压等级、";
|
||||
}
|
||||
|
||||
lblTS1.Text = "部分报价产品存在" + sMsg.TrimEnd('、') + "不合规,是否终止导入,使用“不合规查询”查看哪些不合规?";
|
||||
if (!sWCLQDList.Equals(""))
|
||||
{
|
||||
if (!XLBJDUtils.IsJGEJGB(PageParam.GetRTrimString("sJGBID")))
|
||||
{
|
||||
string sBJFLID1 = PageParam.GetRTrimString("BJFLID");
|
||||
string sJGBBJBM = XLBJDUtils.GetJGBBJBM(sBJFLID1);
|
||||
if (sJGBBJBM.Equals(""))
|
||||
{
|
||||
lblTS2.Text = "附无表价清单:";
|
||||
}
|
||||
else
|
||||
lblTS2.Text = "附无" + sJGBBJBM + "清单:";
|
||||
}
|
||||
else
|
||||
lblTS2.Text = "无用量清单:";
|
||||
//sMsg = sWCLQDList;
|
||||
}
|
||||
txtSM.Text = sWCLQDList.Replace(" ", " ").Replace(";", "");
|
||||
}
|
||||
|
||||
protected void btnQD_Click(object sender, EventArgs e)
|
||||
{
|
||||
CloseWindow();
|
||||
}
|
||||
|
||||
protected void btnQX_Click(object sender, EventArgs e)
|
||||
{
|
||||
//CloseWindow();
|
||||
DialogOperationScript dos1 = new DialogOperationScript(this);
|
||||
////dos.SetCallbackArgument("WindowClose");
|
||||
dos1.SetOwnerControlValue(PageParam.GetRTrimString("CloseFlag"), "Y");
|
||||
dos1.SetOwnerControlValue(PageParam.GetRTrimString("txtSFCXDR"), PageParam.GetRTrimString("SFCXDR"));
|
||||
//dos.CloseOwner();
|
||||
dos1.CloseSelf();
|
||||
dos1.Execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user