2023-10-25
This commit is contained in:
@@ -228,71 +228,6 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 发起设计交底(树节点)
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuAddTechnicalDisclose_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.trWBS.SelectedNode != null)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.CQMSTechnicalDiscloseMenuId, BLL.Const.BtnAdd))
|
||||
{
|
||||
if (this.trWBS.SelectedNode.CommandName == "WorkPackage")
|
||||
{
|
||||
var childWorkPackages = from x in Funs.DB.WBS_WorkPackage where x.SuperWorkPackageId == this.trWBS.SelectedNodeID && x.IsApprove == true select x;
|
||||
if (childWorkPackages.Count() == 0) //末级节点
|
||||
{
|
||||
var oldTechnicalDisclose = BLL.CQMS_TechnicalDiscloseService.GetTechnicalDiscloseByDataId(this.trWBS.SelectedNodeID);
|
||||
if (oldTechnicalDisclose == null)
|
||||
{
|
||||
var unitWork = (from x in Funs.DB.WBS_UnitWork
|
||||
join y in Funs.DB.WBS_WorkPackage on x.UnitWorkId equals y.UnitWorkId
|
||||
where y.WorkPackageId == this.trWBS.SelectedNodeID
|
||||
select x).FirstOrDefault();
|
||||
Model.Technical_TechnicalDisclose technicalDisclose = new Model.Technical_TechnicalDisclose();
|
||||
technicalDisclose.TechnicalDiscloseId = SQLHelper.GetNewID();
|
||||
technicalDisclose.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (unitWork != null)
|
||||
{
|
||||
technicalDisclose.UnitId = unitWork.UnitId;
|
||||
technicalDisclose.UnitWorkId = unitWork.UnitWorkId;
|
||||
}
|
||||
technicalDisclose.DataId = this.trWBS.SelectedNodeID;
|
||||
technicalDisclose.DiscloseName = this.trWBS.SelectedNode.Text;
|
||||
technicalDisclose.State = "0"; //未交底
|
||||
technicalDisclose.CompileMan = this.CurrUser.PersonId;
|
||||
technicalDisclose.CompileDate = DateTime.Now;
|
||||
BLL.CQMS_TechnicalDiscloseService.AddTechnicalDisclose(technicalDisclose);
|
||||
ShowNotify("发起成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("该节点已发起设计交底!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择末级节点发起设计交底!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择末级节点发起设计交底!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("请选择树节点!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 展开全部
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user