2023-10-25

This commit is contained in:
2023-10-25 19:44:10 +08:00
parent 127146e24a
commit fa939f60d3
66 changed files with 522 additions and 636 deletions
@@ -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>
@@ -176,7 +176,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
object[] ID = Grid1.DataKeys[Grid1.SelectedRowIndex];
object[] ID = Grid1.DataKeys[Grid1.SelectedRowIndex];
var model = BLL.PhtglContractTrackService.GetPHTGL_ContractTrackById(ID[0].ToString());
if (model != null) ///已上报时不能删除
{