修改设备报验
This commit is contained in:
@@ -127,7 +127,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
conn.Close();
|
||||
conn.Dispose();
|
||||
|
||||
AddDatasetToSQL(ds.Tables[0], 12);
|
||||
AddDatasetToSQL(ds.Tables[0], 13);
|
||||
hdCheckResult.Text = "1";
|
||||
}
|
||||
catch (Exception exc)
|
||||
@@ -204,30 +204,30 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
}
|
||||
}
|
||||
|
||||
string row9 = pds.Rows[i][9].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(row9))
|
||||
{
|
||||
if (row9 != "合格" && row9 != "不合格")
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "本次抽检结果" + "," + "[" + row9 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row10 = pds.Rows[i][10].ToString();
|
||||
string row10 = pds.Rows[i][10].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(row10))
|
||||
{
|
||||
try
|
||||
if (row10 != "合格" && row10 != "不合格")
|
||||
{
|
||||
DateTime date = Convert.ToDateTime(row10.Trim());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "报验日期" + "," + "[" + row10 + "]错误!" + "|";
|
||||
result += (i + 2).ToString() + "," + "本次抽检结果" + "," + "[" + row10 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row11 = pds.Rows[i][11].ToString();
|
||||
if (string.IsNullOrEmpty(row11))
|
||||
if (!string.IsNullOrEmpty(row11))
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime date = Convert.ToDateTime(row11.Trim());
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "报验日期" + "," + "[" + row11 + "]错误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
string row12 = pds.Rows[i][12].ToString();
|
||||
if (string.IsNullOrEmpty(row12))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "标识编号" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
@@ -347,7 +347,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
conn.Close();
|
||||
conn.Dispose();
|
||||
|
||||
AddDatasetToSQL2(ds.Tables[0], 12);
|
||||
AddDatasetToSQL2(ds.Tables[0], 13);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -411,14 +411,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive
|
||||
Ins.Specifications = pds.Rows[i][5].ToString().Trim();
|
||||
Ins.Supplier = pds.Rows[i][6].ToString().Trim();
|
||||
Ins.Counts = pds.Rows[i][7].ToString().Trim();
|
||||
Ins.SamplingCount = pds.Rows[i][8].ToString().Trim();
|
||||
Ins.SamplingResult = pds.Rows[i][9].ToString().Trim() == "合格" ? "1" : "2";
|
||||
Ins.Unit = pds.Rows[i][8].ToString().Trim();
|
||||
Ins.SamplingCount = pds.Rows[i][9].ToString().Trim();
|
||||
Ins.SamplingResult = pds.Rows[i][10].ToString().Trim() == "合格" ? "1" : "2";
|
||||
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim()))
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim()))
|
||||
{
|
||||
Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim());
|
||||
Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim());
|
||||
}
|
||||
Ins.RemarkCode = pds.Rows[i][11].ToString().Trim();
|
||||
Ins.RemarkCode = pds.Rows[i][12].ToString().Trim();
|
||||
Ins.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment));
|
||||
Ins.CompileMan = this.CurrUser.UserId;
|
||||
Ins.CompileDate = DateTime.Now.Date;
|
||||
|
||||
Reference in New Issue
Block a user