0813
This commit is contained in:
@@ -24,25 +24,23 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
if (operating == "add")
|
||||
{
|
||||
int i = 0;
|
||||
if (type.Equals("cnProfession") || type.Equals("unitProject"))
|
||||
if (type.Equals("cnProfession"))
|
||||
{
|
||||
txtCode.Text = GetNewCode(id, i, "cnProfession");
|
||||
//txtCode.Text = GetNewCode(id, i, "cnProfession");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
txtCode.Readonly = true;
|
||||
this.trSortIndex.Hidden = true;
|
||||
txtCode.Text = GetNewCode(id, i, "wbsSet");
|
||||
Model.WBS_WbsSetInit wbsSet = BLL.WbsSetInitService.GetWbsSetInitByWbsSetCode(id);
|
||||
this.trWeight.Hidden = false;
|
||||
if (wbsSet != null)
|
||||
{
|
||||
if (BLL.WbsSetInitService.GetItemCount(id) == 0) //末级节点
|
||||
if (wbsSet.Weights != null)
|
||||
{
|
||||
this.trWbsSet2.Hidden = false;
|
||||
this.trWeight.Hidden = false;
|
||||
if (wbsSet.Weights != null)
|
||||
{
|
||||
this.nbWeights.Text = wbsSet.Weights.ToString();
|
||||
}
|
||||
this.nbWeights.Text = wbsSet.Weights.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,28 +54,30 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
{
|
||||
txtCode.Text = unitProject.UnitProjectCode;
|
||||
txtName.Text = unitProject.UnitProjectName;
|
||||
txtRemark.Text = unitProject.Remark;
|
||||
if (unitProject.SortIndex != null)
|
||||
{
|
||||
txtSortIndex.Text = unitProject.SortIndex.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
txtCode.Readonly = true;
|
||||
this.trSortIndex.Hidden = true;
|
||||
Model.WBS_WbsSetInit wbsSet = BLL.WbsSetInitService.GetWbsSetInitByWbsSetCode(id);
|
||||
if (wbsSet != null)
|
||||
{
|
||||
if (BLL.WbsSetInitService.GetItemCount(id) == 0) //末级节点
|
||||
{
|
||||
this.trWbsSet2.Hidden = false;
|
||||
this.trWeight.Hidden = false;
|
||||
if (wbsSet.Weights != null)
|
||||
{
|
||||
this.nbWeights.Text = wbsSet.Weights.ToString();
|
||||
}
|
||||
txtControlItemDef.Text = wbsSet.ControlItemDef;
|
||||
}
|
||||
txtCode.Text = wbsSet.WbsSetCode;
|
||||
txtName.Text = wbsSet.WbsSetName;
|
||||
txtRemark.Text = wbsSet.Remark;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
}
|
||||
else
|
||||
{
|
||||
testCode = code + "-" + istr;
|
||||
testCode = code + istr;
|
||||
if (BLL.WbsSetInitService.GetWbsSetInitByWbsSetCode(testCode) == null)
|
||||
{
|
||||
newCode = testCode;
|
||||
@@ -180,7 +180,7 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
{
|
||||
istr = i.ToString();
|
||||
}
|
||||
testCode = code + "-" + istr;
|
||||
testCode = code + istr;
|
||||
} while (BLL.WbsSetInitService.GetWbsSetInitByWbsSetCode(testCode) != null);
|
||||
newCode = testCode;
|
||||
}
|
||||
@@ -210,7 +210,7 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
unitProject.UnitProjectName = txtName.Text.Trim();
|
||||
unitProject.CnProfessionId = cnProfession.CnProfessionId;
|
||||
unitProject.IsIn = false;
|
||||
unitProject.Remark = txtRemark.Text.Trim();
|
||||
unitProject.SortIndex = Funs.GetNewIntOrZero(txtSortIndex.Text.Trim());
|
||||
BLL.UnitProjectInitService.AddUnitProjectInit(unitProject);
|
||||
}
|
||||
else
|
||||
@@ -227,21 +227,17 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
}
|
||||
if (oldWbsSet == null)
|
||||
{
|
||||
wbsSet.Flag = 1;
|
||||
wbsSet.CnProfessionId = oldUnitProject.CnProfessionId;
|
||||
wbsSet.UnitProjectCode = oldUnitProject.UnitProjectCode;
|
||||
wbsSet.SuperWbsSetCode = oldUnitProject.UnitProjectCode;
|
||||
wbsSet.SuperWbsSetCode = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
wbsSet.Flag++;
|
||||
wbsSet.CnProfessionId = oldWbsSet.CnProfessionId;
|
||||
wbsSet.UnitProjectCode = oldWbsSet.UnitProjectCode;
|
||||
wbsSet.SuperWbsSetCode = oldWbsSet.WbsSetCode;
|
||||
}
|
||||
wbsSet.ControlItemDef = this.txtControlItemDef.Text.Trim();
|
||||
wbsSet.IsIn = false;
|
||||
wbsSet.Remark = txtRemark.Text.Trim();
|
||||
BLL.WbsSetInitService.AddWbsSetInit(wbsSet);
|
||||
}
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, id, id, BLL.Const.WBSSetMenuId, "增加WBS库单位、分部、分项工程!");
|
||||
@@ -256,7 +252,7 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
{
|
||||
unitProject.UnitProjectCode = id;
|
||||
unitProject.UnitProjectName = txtName.Text.Trim();
|
||||
unitProject.Remark = txtRemark.Text.Trim();
|
||||
unitProject.SortIndex = Funs.GetNewIntOrZero(txtSortIndex.Text.Trim());
|
||||
BLL.UnitProjectInitService.UpdateUnitProjectInit(unitProject);
|
||||
}
|
||||
}
|
||||
@@ -271,8 +267,6 @@ namespace FineUIPro.Web.JDGL.WBS
|
||||
{
|
||||
wbsSet.Weights = Funs.GetNewIntOrZero(this.nbWeights.Text.Trim());
|
||||
}
|
||||
wbsSet.ControlItemDef = this.txtControlItemDef.Text.Trim();
|
||||
wbsSet.Remark = txtRemark.Text.Trim();
|
||||
BLL.WbsSetInitService.UpdateWbsSetInit(wbsSet);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user