增加因子,特性加点增加主芯截面

This commit is contained in:
2026-09-03 11:44:53 +08:00
parent f85e5baa8d
commit 5ef31cf4c2
47 changed files with 2736 additions and 549 deletions
+20 -58
View File
@@ -428,65 +428,27 @@ namespace GThinking.N_XLXSBJ
sql.ParamByName("pWHRID").Value = tSession.UserId;
sql.ParamByName("pWHSJ").Value = tNow;
if (sTJYZList[i].StartsWith("JZ01|"))
string item = sTJYZList[i];
if (item.Length >= 5 && item.StartsWith("JZ") && char.IsDigit(item[2]) && char.IsDigit(item[3]) && item[4] == '|')
{
sql.ParamByName("pYZID").Value = "JZ01";
sql.ParamByName("pYZZ").Value = txtTJYZ1.Value;
dberp.ExecSQL(sql);
}
else if (sTJYZList[i].StartsWith("JZ02|"))
{
sql.ParamByName("pYZID").Value = "JZ02";
sql.ParamByName("pYZZ").Value = txtTJYZ2.Value;
dberp.ExecSQL(sql);
}
else if (sTJYZList[i].StartsWith("JZ03|"))
{
sql.ParamByName("pYZID").Value = "JZ03";
sql.ParamByName("pYZZ").Value = txtTJYZ3.Value;
dberp.ExecSQL(sql);
}
else if (sTJYZList[i].StartsWith("JZ04|"))
{
sql.ParamByName("pYZID").Value = "JZ04";
sql.ParamByName("pYZZ").Value = txtTJYZ4.Value;
dberp.ExecSQL(sql);
}
else if (sTJYZList[i].StartsWith("JZ05|"))
{
sql.ParamByName("pYZID").Value = "JZ05";
sql.ParamByName("pYZZ").Value = txtTJYZ5.Value;
dberp.ExecSQL(sql);
}
else if (sTJYZList[i].StartsWith("JZ06|"))
{
sql.ParamByName("pYZID").Value = "JZ06";
sql.ParamByName("pYZZ").Value = txtTJYZ6.Value;
dberp.ExecSQL(sql);
}
else if (sTJYZList[i].StartsWith("JZ07|"))
{
sql.ParamByName("pYZID").Value = "JZ07";
sql.ParamByName("pYZZ").Value = txtTJYZ7.Value;
dberp.ExecSQL(sql);
}
else if (sTJYZList[i].StartsWith("JZ08|"))
{
sql.ParamByName("pYZID").Value = "JZ08";
sql.ParamByName("pYZZ").Value = txtTJYZ8.Value;
dberp.ExecSQL(sql);
}
else if (sTJYZList[i].StartsWith("JZ09|"))
{
sql.ParamByName("pYZID").Value = "JZ09";
sql.ParamByName("pYZZ").Value = txtTJYZ9.Value;
dberp.ExecSQL(sql);
}
else if (sTJYZList[i].StartsWith("JZ10|"))
{
sql.ParamByName("pYZID").Value = "JZ10";
sql.ParamByName("pYZZ").Value = txtTJYZ10.Value;
dberp.ExecSQL(sql);
string num = item.Substring(2, 2); // 取出两位编号,如 "01"
int index;
if (int.TryParse(num, out index) && index >= 1 && index <= 10)
{
string id = "JZ" + num; // 构造 pYZID 的值,如 "JZ01"
sql.ParamByName("pYZID").Value = id;
// 根据编号动态查找对应的输入控件
Control ctrl = FindControl("txtTJYZ" + num);
if (ctrl != null && ctrl is gtNumTextBox)
{
double value = ((gtNumTextBox)ctrl).Value;
sql.ParamByName("pYZZ").Value = value;
dberp.ExecSQL(sql);
}
// 因为一个 sTJYZList[i] 只会匹配一个分支,找到后即可跳出当前元素的处理
break;
}
}
}
#endregion