This commit is contained in:
2025-12-23 11:17:49 +08:00
parent 19c093122b
commit eca0fd7d5e
10 changed files with 84 additions and 15 deletions
@@ -125,7 +125,7 @@ namespace FineUIPro.Web.Accident
conn.Close();
conn.Dispose();
AddDatasetToSQL(ds.Tables[0], 6);
AddDatasetToSQL(ds.Tables[0], 8);
hdCheckResult.Text = "1";
}
catch (Exception exc)
@@ -180,10 +180,10 @@ namespace FineUIPro.Web.Accident
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "事故类型", Reason = "此项为必填项!" });
}
string row2 = pds.Rows[i][2].ToString();
if (string.IsNullOrEmpty(row2))
{
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "事故地点", Reason = "此项为必填项!" });
}
//if (string.IsNullOrEmpty(row2))
//{
// errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "事故地点", Reason = "此项为必填项!" });
//}
string row3 = pds.Rows[i][3].ToString();
if (!string.IsNullOrEmpty(row3))
{
@@ -202,7 +202,7 @@ namespace FineUIPro.Web.Accident
}
if (!string.IsNullOrWhiteSpace(row0) && !string.IsNullOrWhiteSpace(row1) && !string.IsNullOrWhiteSpace(row2) && !string.IsNullOrWhiteSpace(row3))
{
var acc = oldViewInfos.Where(x => x.Title == row0 && x.Address == row1 && x.Type == row2 && x.AccidentDate == Convert.ToDateTime(row2.Trim()));
var acc = oldViewInfos.Where(x => x.Title == row0 && x.Address == row1 && x.Type == row2 && x.AccidentDate == Convert.ToDateTime(row3.Trim()));
if (acc.Any())
{
errorInfos.Add(new ErrorInfo { Row = (i + 2).ToString(), Column = "事故标题", Reason = "此项事故已存在!" });
@@ -293,7 +293,7 @@ namespace FineUIPro.Web.Accident
conn.Close();
conn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 6);
AddDatasetToSQL2(ds.Tables[0], 8);
}
catch (Exception ex)
{