人员考试
This commit is contained in:
@@ -8,8 +8,6 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Model;
|
||||
using FineUIPro.Web.BaseInfo;
|
||||
|
||||
namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
@@ -314,72 +312,45 @@ namespace FineUIPro.Web.ProjectData
|
||||
{
|
||||
string id = this.trProjects.SelectedNode.NodeID;
|
||||
Model.Project_Installation installation = BLL.Project_InstallationService.GetInstallationByInstallationId(id);
|
||||
if (installation != null)
|
||||
if (installation.SuperInstallationId == "0") //删除一级装置
|
||||
{
|
||||
ShowNotify("已关联项目无法删除!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
if (installation.InstallationName == "总图")
|
||||
{
|
||||
DeleteZTData(installation.InstallationId);
|
||||
}
|
||||
else
|
||||
{
|
||||
BLL.Project_InstallationService.DeleteInstallation(id);
|
||||
var installation2s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == id select x;
|
||||
foreach (var installation2 in installation2s)
|
||||
{
|
||||
BLL.Project_InstallationService.DeleteInstallation(installation2.InstallationId);
|
||||
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation2.InstallationId select x;
|
||||
foreach (var installation3 in installation3s)
|
||||
{
|
||||
DeleteData(installation3.InstallationId);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var cnProfession = Funs.DB.WBS_CnProfession.FirstOrDefault(x => x.InstallationId == id);
|
||||
if (cnProfession != null)
|
||||
else
|
||||
{
|
||||
ShowNotify("已关联专业无法删除!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
Model.Project_Installation installation2 = BLL.Project_InstallationService.GetInstallationByInstallationId(id);
|
||||
Model.Project_Installation installation1 = BLL.Project_InstallationService.GetInstallationByInstallationId(installation2.SuperInstallationId);
|
||||
if (installation1.SuperInstallationId == "0") //删除二级装置
|
||||
{
|
||||
BLL.Project_InstallationService.DeleteInstallation(id);
|
||||
var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == id select x;
|
||||
foreach (var installation3 in installation3s)
|
||||
{
|
||||
DeleteData(installation3.InstallationId);
|
||||
}
|
||||
}
|
||||
else //删除二级装置
|
||||
{
|
||||
DeleteData(id);
|
||||
}
|
||||
}
|
||||
var unitWorks = (from x in Funs.DB.WBS_UnitWork where x.InstallationId == id select x).ToList();
|
||||
if (unitWorks != null)
|
||||
{
|
||||
ShowNotify("已关联单位工程无法删除!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var workArea = (from x in Funs.DB.ProjectData_WorkArea where x.InstallationId == id select x).ToList();
|
||||
if (workArea != null)
|
||||
{
|
||||
ShowNotify("已关联施工区域无法删除!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
//if (installation.SuperInstallationId == "0") //删除一级装置
|
||||
//{
|
||||
// if (installation.InstallationName == "总图")
|
||||
// {
|
||||
// DeleteZTData(installation.InstallationId);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BLL.Project_InstallationService.DeleteInstallation(id);
|
||||
// var installation2s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == id select x;
|
||||
// foreach (var installation2 in installation2s)
|
||||
// {
|
||||
// BLL.Project_InstallationService.DeleteInstallation(installation2.InstallationId);
|
||||
// var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == installation2.InstallationId select x;
|
||||
// foreach (var installation3 in installation3s)
|
||||
// {
|
||||
// DeleteData(installation3.InstallationId);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Model.Project_Installation installation2 = BLL.Project_InstallationService.GetInstallationByInstallationId(id);
|
||||
// Model.Project_Installation installation1 = BLL.Project_InstallationService.GetInstallationByInstallationId(installation2.SuperInstallationId);
|
||||
// if (installation1.SuperInstallationId == "0") //删除二级装置
|
||||
// {
|
||||
// BLL.Project_InstallationService.DeleteInstallation(id);
|
||||
// var installation3s = from x in Funs.DB.Project_Installation where x.SuperInstallationId == id select x;
|
||||
// foreach (var installation3 in installation3s)
|
||||
// {
|
||||
// DeleteData(installation3.InstallationId);
|
||||
// }
|
||||
// }
|
||||
// else //删除二级装置
|
||||
// {
|
||||
// DeleteData(id);
|
||||
// }
|
||||
//}
|
||||
|
||||
BLL.Project_InstallationService.DeleteInstallation(id);
|
||||
ShowNotify("删除成功!", MessageBoxIcon.Success);
|
||||
InitTreeMenu();
|
||||
}
|
||||
@@ -411,13 +382,6 @@ namespace FineUIPro.Web.ProjectData
|
||||
BLL.WbsDetailService.DeleteWbsDetailByToWbs(wbsSet.WbsSetId); //删除进度记录
|
||||
BLL.WbsSetService.DeleteWbsSet(wbsSet.WbsSetId);
|
||||
}
|
||||
var unitWorks = (from x in Funs.DB.WBS_UnitWork where x.InstallationId == installationId select x).ToList();
|
||||
foreach (var unitWork in unitWorks)
|
||||
{
|
||||
BLL.BreakdownProjectService.DeleteAllBreakdownByUnitWorkId(unitWork.UnitWorkId);
|
||||
BLL.DivisionProjectService.DeleteDivisionProjectByUnitWorkId(unitWork.UnitWorkId);
|
||||
BLL.UnitWorkService.DeleteUnitWorkById(unitWork.UnitWorkId);
|
||||
}
|
||||
|
||||
//删除单位工程及子单位工程
|
||||
var unitProjects = from x in Funs.DB.Wbs_UnitProject join y in Funs.DB.WBS_CnProfession on x.CnProfessionId equals y.CnProfessionId where y.InstallationId == installationId && x.CnProfessionId != null select x;
|
||||
|
||||
Reference in New Issue
Block a user