修改设备信息
This commit is contained in:
@@ -126,7 +126,7 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
hdCheckResult.Text = "1";
|
||||
AddDatasetToSQL(ds.Tables[0], 10);
|
||||
AddDatasetToSQL(ds.Tables[0], 11);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
@@ -180,14 +180,14 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
string row1 = pds.Rows[i][1].ToString();
|
||||
if (string.IsNullOrEmpty(row1))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "供货单位名称" + "," + "此项为必填项!" + "|";
|
||||
result += (i + 2).ToString() + "," + "采购单位" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
else
|
||||
{
|
||||
var unit = units.FirstOrDefault(x => x.UnitName == row1);
|
||||
if (unit == null)
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "供货单位名称" + "," + "[" + row1 + "]不存在!" + "|";
|
||||
result += (i + 2).ToString() + "," + "采购单位" + "," + "[" + row1 + "]不存在!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,6 +258,12 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
//{
|
||||
// result += (i + 2).ToString() + "," + "到货日期" + "," + "此项为必填项!" + "|";
|
||||
//}
|
||||
|
||||
string row10 = pds.Rows[i][10].ToString();
|
||||
if (string.IsNullOrEmpty(row10))
|
||||
{
|
||||
result += (i + 2).ToString() + "," + "生产厂家" + "," + "此项为必填项!" + "|";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
@@ -365,7 +371,7 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
oleDBConn.Close();
|
||||
oleDBConn.Dispose();
|
||||
|
||||
AddDatasetToSQL2(ds.Tables[0], 10);
|
||||
AddDatasetToSQL2(ds.Tables[0], 11);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -411,7 +417,10 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
equipment.ProjectId = this.CurrUser.LoginProjectId;
|
||||
equipment.ContractNo = pds.Rows[i][0].ToString().Trim();
|
||||
equipment.UnitId = units.First(e => e.UnitName == pds.Rows[i][1].ToString().Trim()).UnitId;
|
||||
equipment.MainItemId = mainItems.First(e => e.MainItemName == pds.Rows[i][2].ToString().Trim()).MainItemId;
|
||||
if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim()))
|
||||
{
|
||||
equipment.MainItemId = mainItems.First(e => e.MainItemName == pds.Rows[i][2].ToString().Trim()).MainItemId;
|
||||
}
|
||||
equipment.EquipmentName = pds.Rows[i][3].ToString().Trim();
|
||||
equipment.SpecificationAndModel = pds.Rows[i][4].ToString().Trim();
|
||||
equipment.EquipmentCode = pds.Rows[i][5].ToString().Trim();
|
||||
@@ -419,6 +428,7 @@ namespace FineUIPro.Web.CQMS.Material
|
||||
equipment.Unit = pds.Rows[i][7].ToString().Trim();
|
||||
equipment.Num = Funs.GetNewDecimalOrZero(pds.Rows[i][8].ToString().Trim());
|
||||
equipment.ArrivalDate = Funs.GetNewDateTime(pds.Rows[i][9].ToString().Trim());
|
||||
equipment.Factory = pds.Rows[i][10].ToString().Trim();
|
||||
equipment.CompileMan = this.CurrUser.PersonId;
|
||||
equipment.CompileDate = DateTime.Now;
|
||||
BLL.CQMS_EquipmentService.AddEquipment(equipment);
|
||||
|
||||
Reference in New Issue
Block a user