This commit is contained in:
2026-09-09 23:26:19 +08:00
parent 7b99aec79b
commit 2b324c2ec8
5 changed files with 238 additions and 221 deletions
+70 -39
View File
@@ -3103,7 +3103,7 @@ namespace GThinking.U20261363_N_XLXSBJ
}
protected override bool DataLogicValid()
{
{
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
TSQL SQL = new TSQL(dberp);
DataSet ds;
@@ -3278,7 +3278,7 @@ namespace GThinking.U20261363_N_XLXSBJ
if (ControlState == TControlState.ctsEdit)
{
string sYLZDMXTZ=XLBJDUtils.GetXLXSBJPZXX(100860064).XLXSBJPZ_YLZDMXTZ;
string sYLZDMsg = string.Empty;
StringBuilder sbYLZDMsg = new StringBuilder(string.Empty);
for (int i = 0; i < grdXLBJDMX.NewRows.Count; i++)
{
sHasYLDZSQ = grdXLBJDMX.GetValueByFieldName("HasYLDZSQ", grdXLBJDMX.NewRows[i]).Trim();
@@ -3320,13 +3320,14 @@ namespace GThinking.U20261363_N_XLXSBJ
ds = dberp.OpenDataSet(SQL);
if (ds.Tables[0].Rows.Count > 0)
{
sYLZDMsg += string.Format("[{0}] [{1} {2} {3} {4}]\r\n", dXSSX, sXLXHID, sXLGGID, sXLBZID, sDYDJID);
sbYLZDMsg.Append(string.Format("[{0}] [{1} {2} {3} {4}]\r\n", dXSSX, sXLXHID, sXLGGID, sXLBZID, sDYDJID));
}
}
}
string sYLZDMsg = sbYLZDMsg.ToString();
if (!string.IsNullOrEmpty(sYLZDMsg))
{
@@ -4750,7 +4751,7 @@ namespace GThinking.U20261363_N_XLXSBJ
if (sKHJSLY.Equals("KHXX"))
{
Hashtable sSQLParams = GetHashtableValue(Server.HtmlDecode(Request.Form["SQLParam"].ToString()));
Dictionary<string, string> sSQLParams = GetHashtableValue(Server.HtmlDecode(Request.Form["SQLParam"].ToString()));
StringBuilder strSQL = new StringBuilder();
strSQL.AppendLine("!select A.KHLXR_LXRID as CODE, case when isnull(A.KHLXR_XM,' ') = ' ' then A.KHLXR_CW else A.KHLXR_XM end as Message ");
strSQL.AppendLine(" from KHLXR A ");
@@ -7360,9 +7361,9 @@ namespace GThinking.U20261363_N_XLXSBJ
// }
//}
private Hashtable GetHashtableValue(string sSQLParam)
private Dictionary<string, string> GetHashtableValue(string sSQLParam)
{
Hashtable hParam = new Hashtable();
Dictionary<string, string> hParam = new Dictionary<string, string>();
hParam.Clear();
if (!sSQLParam.Trim().Equals(""))
{
@@ -21047,7 +21048,7 @@ namespace GThinking.U20261363_N_XLXSBJ
//价格表行情料价调整
protected void btnCLCB_MenuItemClick(object sender, string value)
{
{
BJFLXX bjflxx = XLBJDUtils.GetBJFLXX(cbxBJFLID.SelectedValue.Trim());
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
{
@@ -21072,7 +21073,7 @@ namespace GThinking.U20261363_N_XLXSBJ
DRWLJCP(txtBJDID.Text.Trim(),cbxBJFLID.SelectedValue.Trim());
break;
case "SCBJ":
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
string[] sTempArr = grdXLBJDMX.CheckedRows.Split(new char[] { ',' });
foreach (string sIndex in sTempArr)
{
@@ -21080,9 +21081,10 @@ namespace GThinking.U20261363_N_XLXSBJ
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
}
string sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
pageParams.UrlPath = "XLBJD_MX_YZInfo.aspx";
@@ -21284,7 +21286,7 @@ namespace GThinking.U20261363_N_XLXSBJ
//价格表行情料价调整
protected void btnLJ_MenuItemClick(object sender, string value)
{
{
BJFLXX bjflxx = XLBJDUtils.GetBJFLXX(cbxBJFLID.SelectedValue.Trim());
switch (value)
{
@@ -21397,15 +21399,16 @@ namespace GThinking.U20261363_N_XLXSBJ
ShowMessage("请选择一条需要调整的报价产品!");
return;
}
string sBJDXH = "";
StringBuilder sbBJDXH = new StringBuilder("");
foreach (GridViewRow Row in grdXLBJDMX.NewRows)
{
if (grdXLBJDMX.RowIsChecked(Row))
{
string sTmp = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", Row).Trim();
sBJDXH += sTmp + ",";
sbBJDXH.Append(sTmp + ",");
}
}
string sBJDXH = sbBJDXH.ToString();
sBJDXH = sBJDXH.TrimEnd(',');
if(sBJDXH.Equals(""))
sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", grdXLBJDMX.SelectedIndex).Trim();
@@ -22723,16 +22726,17 @@ namespace GThinking.U20261363_N_XLXSBJ
// return;
//}
string[] sTempArr = grdXLBJDMX.CheckedRows.Split(new char[] { ',' });
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
foreach (string sIndex in sTempArr)
{
int iRowIndex = CMISproConvert.StrToInt(sIndex.Trim());
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
}
string sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
//UFC_20191806_N_XL8
@@ -22984,6 +22988,7 @@ namespace GThinking.U20261363_N_XLXSBJ
TSQL SQL = new TSQL(dberp);
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (txtPLSZAll.Value.Trim().Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -22996,8 +23001,9 @@ namespace GThinking.U20261363_N_XLXSBJ
{
int iRowIndex = CMISproConvert.StrToInt(sIndex.Trim());
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
@@ -23011,7 +23017,7 @@ namespace GThinking.U20261363_N_XLXSBJ
}
//价格表表价调整
protected void btnRefreshJGBBJTZ_Click(object sender, EventArgs e)
protected void btnRefreshJGBBJTZ_Click(object sender, EventArgs e)
{
BJFLXX bjflxx = XLBJDUtils.GetBJFLXX(cbxBJFLID.SelectedValue.Trim());
@@ -23030,6 +23036,7 @@ namespace GThinking.U20261363_N_XLXSBJ
TSQL SQL = new TSQL(dberp);
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (txtPLSZAll.Value.Trim().Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -23042,8 +23049,9 @@ namespace GThinking.U20261363_N_XLXSBJ
{
int iRowIndex = CMISproConvert.StrToInt(sIndex.Trim());
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
SQL.Clear();
@@ -23089,7 +23097,8 @@ namespace GThinking.U20261363_N_XLXSBJ
btnOnlyRefresh_Click(null, null);
}
protected void btnRefreshJGBBJSC_Click(object sender, EventArgs e)
protected void
btnRefreshJGBBJSC_Click(object sender, EventArgs e)
{
BJFLXX bjflxx = XLBJDUtils.GetBJFLXX(cbxBJFLID.SelectedValue.Trim());
@@ -23107,6 +23116,7 @@ namespace GThinking.U20261363_N_XLXSBJ
TSQL SQL = new TSQL(dberp);
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (txtPLSZAll.Value.Trim().Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -23119,8 +23129,9 @@ namespace GThinking.U20261363_N_XLXSBJ
{
int iRowIndex = CMISproConvert.StrToInt(sIndex.Trim());
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
SQL.Clear();
@@ -23178,6 +23189,7 @@ namespace GThinking.U20261363_N_XLXSBJ
TSQL SQL = new TSQL(dberp);
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (txtPLSZAll.Value.Trim().Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -23192,9 +23204,10 @@ namespace GThinking.U20261363_N_XLXSBJ
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
else if(txtPLSZAll.Value.Trim().Equals("D"))
@@ -23290,7 +23303,7 @@ namespace GThinking.U20261363_N_XLXSBJ
}
btnRefreshDRBJDMX_Click(null, null);
}
}
//下浮
protected void btnRefreshBJXF_Click(object sender, EventArgs e)
@@ -23306,6 +23319,7 @@ namespace GThinking.U20261363_N_XLXSBJ
TSQL SQL = new TSQL(dberp);
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (txtPLSZAll.Value.Trim().Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -23320,9 +23334,10 @@ namespace GThinking.U20261363_N_XLXSBJ
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
else if (txtPLSZAll.Value.Trim().Equals("D"))
@@ -23414,13 +23429,13 @@ namespace GThinking.U20261363_N_XLXSBJ
{
ShowMessage("批量调价-下浮出现错误,请联系系统管理员!" + ex);
dberp.RollbackTrans();
}
}
btnRefreshDRBJDMX_Click(null, null);
}
//表价价差率
protected void btnRefreshBJJCL_Click(object sender, EventArgs e)
protected void btnRefreshBJJCL_Click(object sender, EventArgs e)
{
BJFLXX bjflxx = XLBJDUtils.GetBJFLXX(cbxBJFLID.SelectedValue.Trim());
@@ -23449,6 +23464,7 @@ namespace GThinking.U20261363_N_XLXSBJ
}
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (txtPLSZAll.Value.Trim().Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -23463,9 +23479,10 @@ namespace GThinking.U20261363_N_XLXSBJ
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
@@ -23664,11 +23681,11 @@ namespace GThinking.U20261363_N_XLXSBJ
ShowMessage("批量调价-表价价差率出现错误,请联系系统管理员!" + ex);
dberp.RollbackTrans();
}
btnRefreshDRBJDMX_Click(null, null);
btnRefreshDRBJDMX_Click(null, null);
}
//料价价差率
//注意----跳过表价不为0的记录
//注意----跳过表价不为0的记录
protected void btnRefreshLJJCL_Click(object sender, EventArgs e)
{
BJFLXX bjflxx = XLBJDUtils.GetBJFLXX(cbxBJFLID.SelectedValue.Trim());
@@ -23700,6 +23717,7 @@ namespace GThinking.U20261363_N_XLXSBJ
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
TSQL SQL = new TSQL(dberp);
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (sSZFW.Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -23713,9 +23731,10 @@ namespace GThinking.U20261363_N_XLXSBJ
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
@@ -23727,7 +23746,7 @@ namespace GThinking.U20261363_N_XLXSBJ
string sErrorMsg = "";
PLTJ_LJJCL(sBJDXHList, 0, sBJDID, sBJFLID, dCLCBLR, sCLCBLX, sCZLM, sJCLLX, sLJJCLLX, sZDXJJCLLX, sJYF, sYFWLID, sBJHYF, sCPBJMRXSWS, tmpXSWS, GetOption(100860000, "BJU002"), bWBJ, bFWG, ref sErrorMsg);
if (!sErrorMsg.Equals(""))
{
{
ShowMessage(sErrorMsg);
}
btnOnlyRefresh_Click(null, null);
@@ -23760,6 +23779,7 @@ namespace GThinking.U20261363_N_XLXSBJ
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
TSQL SQL = new TSQL(dberp);
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (sSZFW.Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -23773,9 +23793,10 @@ namespace GThinking.U20261363_N_XLXSBJ
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
@@ -23793,6 +23814,7 @@ namespace GThinking.U20261363_N_XLXSBJ
protected void btnRefreshPLTZBZ_Click(object sender, EventArgs e)
{
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (txtPLSZAll.Value.Trim().Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -23807,9 +23829,10 @@ namespace GThinking.U20261363_N_XLXSBJ
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
UpdateBJCPByXLBZID(txtBJDID.Text.Trim(), sBJDXHList, XLBJDUtils.ISDZBZ(txtPLSZBZID.Value.Trim()) ? "Y" : "N");
@@ -23832,13 +23855,14 @@ namespace GThinking.U20261363_N_XLXSBJ
//是否整单调整
pageParams.AddString("txtPLSZAllCID", txtPLSZAll.ClientID);
pageParams.AddString("btnRefreshKHWL", btnRefreshKHWL.ClientID);
OpenDialog(pageParams);
pageParams.AddString("btnRefreshKHWL", btnRefreshKHWL.ClientID);
OpenDialog(pageParams);
}
protected void btnRefreshKHWL_Click(object sender, EventArgs e)
{
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
if (txtPLSZAll.Value.Trim().Equals("N"))//调价范围:N|勾选记录
{
if (!(grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows)))
@@ -23853,9 +23877,10 @@ namespace GThinking.U20261363_N_XLXSBJ
string sBJDXH = grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XH", iRowIndex);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
}
sBJDXHList = sbBJDXHList.ToString();
sBJDXHList = sBJDXHList.TrimEnd(',');
}
TDatabase dberp = TContextDatabases.GetDatabase("DBERP");
@@ -25115,8 +25140,8 @@ namespace GThinking.U20261363_N_XLXSBJ
pageParams.AddString("XLGGID", grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XLGGID", grdXLBJDMX._SelectedIndex));
pageParams.AddString("XLBZID", grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_XLBZID", grdXLBJDMX._SelectedIndex));
pageParams.AddString("DYDJID", grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_DYDJID", grdXLBJDMX._SelectedIndex));
OpenModuleDialog(100860122, pageParams, btnRefreshCLHQTZ.ClientID);
}
OpenModuleDialog(100860122, pageParams, btnRefreshCLHQTZ.ClientID);
}
@@ -25147,8 +25172,11 @@ namespace GThinking.U20261363_N_XLXSBJ
lst.Clear();
string sFirstXH = "0";
string sBJDXHList = "";
StringBuilder sbBJDXHList = new StringBuilder("");
string sBJDXHList_GX_SD = "";
string sBJDXHList_GX_WSD = "";
StringBuilder sbBJDXHList_GX_SD = new StringBuilder("");
StringBuilder sbBJDXHList_GX_WSD = new StringBuilder("");
if (grdXLBJDMX.CheckBox && !String.IsNullOrEmpty(grdXLBJDMX.CheckedRows))
{
string[] sTempArr = grdXLBJDMX.CheckedRows.Split(new char[] { ',' });
@@ -25159,21 +25187,24 @@ namespace GThinking.U20261363_N_XLXSBJ
lst.Add(sBJDXH);
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
sBJDXHList += sBJDXH + ",";
sbBJDXHList.Append(sBJDXH + ",");
}
if (!sBJDXH.Equals("") && !sBJDXH.Equals("0"))
{
if (grdXLBJDMX.GetValueByFieldName("XLXSBJDMX_BJSDBZ", iRowIndex).ToString().Trim().Equals("Y"))
{
sBJDXHList_GX_SD += sBJDXH + ",";
sbBJDXHList_GX_SD.Append(sBJDXH + ",");
}
else
{
sBJDXHList_GX_WSD += sBJDXH + ",";
sbBJDXHList_GX_WSD.Append(sBJDXH + ",");
}
}
}
sBJDXHList_GX_WSD = sbBJDXHList_GX_WSD.ToString();
sBJDXHList_GX_SD = sbBJDXHList_GX_SD.ToString();
sBJDXHList = sbBJDXHList.ToString();
}
sBJDXHList = sBJDXHList.TrimStart(',').TrimEnd(',');
sBJDXHList_GX_SD = sBJDXHList_GX_SD.TrimStart(',').TrimEnd(',');