增加因子,特性加点增加主芯截面
This commit is contained in:
+25
-78
@@ -349,91 +349,38 @@ namespace GThinking.N_XLXSBJ
|
||||
|
||||
private void InitGrdColumn()
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ01").Visible = false;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ02").Visible = false;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ03").Visible = false;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ04").Visible = false;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ05").Visible = false;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ06").Visible = false;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ07").Visible = false;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ08").Visible = false;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ09").Visible = false;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ10").Visible = false;
|
||||
for (int i = 1; i <= 20; i++)
|
||||
{
|
||||
string fieldName = "TZYZ_JZ" + i.ToString("D2");
|
||||
gtAjaxGridViewColumn col = grdSHD.FindColumnByFieldName(fieldName);
|
||||
if (col != null)
|
||||
{
|
||||
col.Visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
string[] sTJYZList = PageParam.GetRTrimString("TJYZList").Split(',');
|
||||
for (int i = 0; i < sTJYZList.Length; i++)
|
||||
{
|
||||
if (sTJYZList[i].StartsWith("JZ01|"))
|
||||
string item = sTJYZList[i];
|
||||
|
||||
// 检查是否以 "JZ" + 两位数字 + "|" 开头
|
||||
if (item.Length >= 5 && item.StartsWith("JZ") && char.IsDigit(item[2]) && char.IsDigit(item[3]) && item[4] == '|')
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ01").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ01").HeaderText = sTJYZList[i].Replace("JZ01|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ01").NumberDecimalPlace = 5;
|
||||
}
|
||||
else if (sTJYZList[i].StartsWith("JZ02|"))
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ02").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ02").HeaderText = sTJYZList[i].Replace("JZ02|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ02").NumberDecimalPlace = 5;
|
||||
}
|
||||
else if (sTJYZList[i].StartsWith("JZ03|"))
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ03").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ03").HeaderText = sTJYZList[i].Replace("JZ03|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ03").NumberDecimalPlace = 5;
|
||||
}
|
||||
else if (sTJYZList[i].StartsWith("JZ04|"))
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ04").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ04").HeaderText = sTJYZList[i].Replace("JZ04|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ04").NumberDecimalPlace = 5;
|
||||
}
|
||||
else if (sTJYZList[i].StartsWith("JZ05|"))
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ05").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ05").HeaderText = sTJYZList[i].Replace("JZ05|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ05").NumberDecimalPlace = 5;
|
||||
}
|
||||
else if (sTJYZList[i].StartsWith("JZ06|"))
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ06").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ06").HeaderText = sTJYZList[i].Replace("JZ06|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ06").NumberDecimalPlace = 5;
|
||||
}
|
||||
else if (sTJYZList[i].StartsWith("JZ07|"))
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ07").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ07").HeaderText = sTJYZList[i].Replace("JZ07|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ07").NumberDecimalPlace = 5;
|
||||
}
|
||||
else if (sTJYZList[i].StartsWith("JZ08|"))
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ08").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ08").HeaderText = sTJYZList[i].Replace("JZ08|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ08").NumberDecimalPlace = 5;
|
||||
}
|
||||
else if (sTJYZList[i].StartsWith("JZ09|"))
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ09").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ09").HeaderText = sTJYZList[i].Replace("JZ09|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ09").NumberDecimalPlace = 5;
|
||||
}
|
||||
else if (sTJYZList[i].StartsWith("JZ10|"))
|
||||
{
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ10").Visible = true;
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ10").HeaderText = sTJYZList[i].Replace("JZ10|", "");
|
||||
if (sTJYZList[i].EndsWith("(元)"))
|
||||
grdSHD.FindColumnByFieldName("TZYZ_JZ10").NumberDecimalPlace = 5;
|
||||
string num = item.Substring(2, 2); // 提取 "01" ~ "10"
|
||||
string fieldName = "TZYZ_JZ" + num; // 构造列名
|
||||
|
||||
gtAjaxGridViewColumn col = grdSHD.FindColumnByFieldName(fieldName);
|
||||
if (col != null)
|
||||
{
|
||||
col.Visible = true;
|
||||
col.HeaderText = item.Substring(5); // 去掉 "JZxx|" 前缀
|
||||
if (item.EndsWith("(元)"))
|
||||
col.NumberDecimalPlace = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void InsertXLXSJGBYZZ2(TDatabase dberp)
|
||||
|
||||
Reference in New Issue
Block a user