提交代码
This commit is contained in:
@@ -200,6 +200,11 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
string result = string.Empty;
|
||||
string col0 = pds.Rows[i][0].ToString().Trim();
|
||||
string col1 = pds.Rows[i][1].ToString().Trim();
|
||||
string col3 = pds.Rows[i][3].ToString().Trim();
|
||||
string col4 = pds.Rows[i][4].ToString().Trim();
|
||||
string col5 = pds.Rows[i][5].ToString().Trim();
|
||||
string col6 = pds.Rows[i][6].ToString().Trim();
|
||||
string col7 = pds.Rows[i][7].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(col0))
|
||||
{
|
||||
if (string.IsNullOrEmpty(col0))
|
||||
@@ -234,6 +239,66 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|";
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col3))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanProjectQuantity = Convert.ToDecimal(col3);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "概算工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col4))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.DrawProjectQuantity = Convert.ToDecimal(col4);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "图纸工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col5))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.RealProjectQuantity = Convert.ToDecimal(col5);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "实际工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col6))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanStartDate = Convert.ToDateTime(col6);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "计划开始时间输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col7))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanEndDate = Convert.ToDateTime(col7);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "计划完成时间输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
ViewWorkPackages.Add(newWorkPackage);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
@@ -387,6 +452,12 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
string result = string.Empty;
|
||||
string col0 = pds.Rows[i][0].ToString().Trim();
|
||||
string col1 = pds.Rows[i][1].ToString().Trim();
|
||||
string col2 = pds.Rows[i][2].ToString().Trim();
|
||||
string col3 = pds.Rows[i][3].ToString().Trim();
|
||||
string col4 = pds.Rows[i][4].ToString().Trim();
|
||||
string col5 = pds.Rows[i][5].ToString().Trim();
|
||||
string col6 = pds.Rows[i][6].ToString().Trim();
|
||||
string col7 = pds.Rows[i][7].ToString().Trim();
|
||||
if (!string.IsNullOrEmpty(col0))
|
||||
{
|
||||
if (string.IsNullOrEmpty(col0))
|
||||
@@ -421,6 +492,68 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
result += "第" + (i + 2).ToString() + "行," + "定制输入值有误!" + "|";
|
||||
}
|
||||
|
||||
newWorkPackage.Unit = col2;
|
||||
|
||||
if (!string.IsNullOrEmpty(col3))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanProjectQuantity = Convert.ToDecimal(col3);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "概算工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col4))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.DrawProjectQuantity = Convert.ToDecimal(col4);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "图纸工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col5))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.RealProjectQuantity = Convert.ToDecimal(col5);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "实际工程量输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col6))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanStartDate = Convert.ToDateTime(col6);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "计划开始时间输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(col7))
|
||||
{
|
||||
try
|
||||
{
|
||||
newWorkPackage.PlanEndDate = Convert.ToDateTime(col7);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result += "第" + (i + 2).ToString() + "行," + "计划完成时间输入值有误!" + "|";
|
||||
}
|
||||
}
|
||||
|
||||
ViewWorkPackages.Add(newWorkPackage);
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
@@ -470,6 +603,12 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
Model.WBS_WorkPackage oldWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(workPackageId);
|
||||
string workPackageCode2 = this.Grid1.Rows[i].DataKeys[1].ToString();
|
||||
string txtName = values.Value<string>("SuperWorkPack");
|
||||
string Unit = values.Value<string>("Unit");
|
||||
string PlanProjectQuantity = values.Value<string>("PlanProjectQuantity");
|
||||
string DrawProjectQuantity = values.Value<string>("DrawProjectQuantity");
|
||||
string RealProjectQuantity = values.Value<string>("RealProjectQuantity");
|
||||
string PlanStartDate = values.Value<string>("PlanStartDate");
|
||||
string PlanEndDate = values.Value<string>("PlanEndDate");
|
||||
Model.WBS_WorkPackageProject workPackageProject = BLL.WorkPackageProjectService.GetWorkPackageProjectByWorkPackageCode(workPackageCode2, this.CurrUser.LoginProjectId);
|
||||
if (oldWorkPackage == null) //新增内容
|
||||
{
|
||||
@@ -522,6 +661,12 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||
newWorkPackage.ProjectType = workPackageProject.ProjectType;
|
||||
newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode;
|
||||
newWorkPackage.IsApprove = true;
|
||||
newWorkPackage.Unit = Unit;
|
||||
newWorkPackage.PlanProjectQuantity = Funs.GetNewDecimal(PlanProjectQuantity);
|
||||
newWorkPackage.DrawProjectQuantity = Funs.GetNewDecimal(DrawProjectQuantity);
|
||||
newWorkPackage.RealProjectQuantity = Funs.GetNewDecimal(RealProjectQuantity);
|
||||
newWorkPackage.PlanStartDate = Funs.GetNewDateTime(PlanStartDate);
|
||||
newWorkPackage.PlanEndDate = Funs.GetNewDateTime(PlanEndDate);
|
||||
BLL.WorkPackageService.AddWorkPackage(newWorkPackage);
|
||||
num++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user