This commit is contained in:
2026-06-12 14:54:42 +08:00
parent 8632ef62d5
commit b52bab4c84
@@ -80,7 +80,8 @@ namespace FineUIPro.Web.HJGL.HotProessManage
protected void btnAudit_Click(object sender, EventArgs e)
{
bool isEmptyPostHeatingDate = false;
bool isEmptyPostHeatingDate = false;//后热日期是否为空
bool isEmptyHotData = false;//热处理数据
string message = string.Empty;
errorInfos = string.Empty;
try
@@ -179,7 +180,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
{
errorInfos += (i + 2) + "行, [施工号、管线号和焊口号] 不能为空|";
}
if(ds.Tables[0].Rows[i]["后热日期"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["后热日期"].ToString()))
if (ds.Tables[0].Rows[i]["后热日期"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["后热日期"].ToString()))
{
try
{
@@ -193,12 +194,12 @@ namespace FineUIPro.Web.HJGL.HotProessManage
}
else
{
isEmptyPostHeatingDate = false;
errorInfos += (i + 2) + "行, [后热日期]或热处理数据,不能为空|";
//isEmptyPostHeatingDate = false;
//errorInfos += (i + 2) + "行, [后热日期]或热处理数据,不能为空|";
}
if (ds.Tables[0].Rows[i]["测温点编号"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["测温点编号"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -210,6 +211,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["热处理温度℃(要求)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["热处理温度℃(要求)"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -221,6 +223,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["热处理温度℃(实际)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["热处理温度℃(实际)"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -232,6 +235,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["恒温时间h(要求)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["恒温时间h(要求)"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -243,6 +247,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["恒温时间h(实际)"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["恒温时间h(实际)"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -257,10 +262,11 @@ namespace FineUIPro.Web.HJGL.HotProessManage
try
{
DateTime date = Convert.ToDateTime(ds.Tables[0].Rows[i]["热处理日期"].ToString());
isEmptyHotData = true;
}
catch (Exception)
{
errorInfos += (i + 2) + "行, [热处理日期] 必须为日期型|";
errorInfos += (i + 2) + "行, [热处理日期] 必须为日期型|";
}
}
else
@@ -273,6 +279,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["记录曲线图编号"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["记录曲线图编号"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -284,6 +291,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["热电偶数量/个"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["热电偶数量/个"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -295,6 +303,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["加热范围/mm"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["加热范围/mm"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -306,6 +315,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["保温范围/mm"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["保温范围/mm"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -317,6 +327,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
if (ds.Tables[0].Rows[i]["保温厚度/mm"] != null && !string.IsNullOrEmpty(ds.Tables[0].Rows[i]["保温厚度/mm"].ToString()))
{
isEmptyHotData = true;
}
else
{
@@ -332,6 +343,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
{
DateTime date = Convert.ToDateTime(ds.Tables[0].Rows[i]["热处理开始时间"].ToString());
stockIn.ReviewDate = date;
isEmptyHotData = true;
}
catch (Exception)
{
@@ -352,6 +364,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
{
DateTime date = Convert.ToDateTime(ds.Tables[0].Rows[i]["热处理完成时间"].ToString());
stockIn.ReviewDate = date;
isEmptyHotData = true;
}
catch (Exception)
{
@@ -365,6 +378,10 @@ namespace FineUIPro.Web.HJGL.HotProessManage
errorInfos += (i + 2) + "行, [热处理完成时间] 不能为空|";
}
}
if (isEmptyPostHeatingDate == false && isEmptyHotData == false)
{
errorInfos += (i + 2) + "行, [后热日期或热处理数据] 不能为空|";
}
#endregion
}
if (!string.IsNullOrEmpty(errorInfos))