修改安全实施计划导出及进度功能
This commit is contained in:
parent
df904cd642
commit
b8dae5be20
|
|
@ -0,0 +1,27 @@
|
|||
alter table [dbo].[WBS_WorkPackage] add PreJobId nvarchar(50) null
|
||||
GO
|
||||
alter table [dbo].[WBS_WorkPackage] add PlanProjectQuantity decimal(18,2) null
|
||||
GO
|
||||
alter table [dbo].[WBS_WorkPackage] add RealProjectQuantity decimal(18,2) null
|
||||
GO
|
||||
alter table [dbo].[WBS_WorkPackage] add PlanStartDate datetime null
|
||||
GO
|
||||
alter table [dbo].[WBS_WorkPackage] add PlanEndDate datetime null
|
||||
GO
|
||||
alter table [dbo].[WBS_WorkPackage] add RealStartDate datetime null
|
||||
GO
|
||||
alter table [dbo].[WBS_WorkPackage] add RealEndDate datetime null
|
||||
GO
|
||||
alter table [dbo].[WBS_WorkPackage] add Unit nvarchar(50) null
|
||||
GO
|
||||
alter table [dbo].[WBS_WorkPackage] add IsMileStone bit null
|
||||
GO
|
||||
|
||||
alter table [dbo].[WBS_UnitWork] add PlanStartDate datetime null
|
||||
GO
|
||||
alter table [dbo].[WBS_UnitWork] add PlanEndDate datetime null
|
||||
GO
|
||||
alter table [dbo].[WBS_UnitWork] add RealStartDate datetime null
|
||||
GO
|
||||
alter table [dbo].[WBS_UnitWork] add RealEndDate datetime null
|
||||
GO
|
||||
|
|
@ -1,55 +1,63 @@
|
|||
--delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_JDGL')
|
||||
--go
|
||||
--delete from Sys_Menu where MenuType='Menu_JDGL'
|
||||
--go
|
||||
delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_JDGL')
|
||||
go
|
||||
delete from Sys_Menu where MenuType='Menu_JDGL'
|
||||
go
|
||||
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
--VALUES('6890E0DD-9606-41BC-8700-D32FA5B65B66','施工进度','',10,'0','Menu_JDGL',0,0,1)
|
||||
--GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('BAC3D994-03A8-466C-8975-A31039998BCC','施工进度统计','JDGL/Check/ProgressShow.aspx',10,'0','Menu_JDGL',0,1,1)
|
||||
GO
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
--VALUES('BAC3D994-03A8-466C-8975-A31039998BCC','施工进度统计','JDGL/Check/ProgressShow.aspx',10,'0','Menu_JDGL',0,1,1)
|
||||
--GO
|
||||
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
--VALUES('1172B112-2A12-4410-AD66-E5BA6B461475','施工进度赢得值曲线','JDGL/Check/ProgressStatistics.aspx',20,'0','Menu_JDGL',0,1,1)
|
||||
--GO
|
||||
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
--VALUES('4288426D-E49B-4E5D-A495-7E6A76F269B5','周计划','',30,'0','Menu_JDGL',0,1,1)
|
||||
--GO
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('98E9B88C-5BB8-4673-9B6C-69B446E57C11','4288426D-E49B-4E5D-A495-7E6A76F269B5','增加',1)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('B69119FC-F0AB-4C07-83FB-48D2CEF00C5F','4288426D-E49B-4E5D-A495-7E6A76F269B5','修改',2)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('DC33D5E2-2C3B-4C9B-9887-1CF2EB2A3C7F','4288426D-E49B-4E5D-A495-7E6A76F269B5','删除',3)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('CBF94555-B633-44CC-9919-3CE579D368CD','4288426D-E49B-4E5D-A495-7E6A76F269B5','保存',4)
|
||||
--GO
|
||||
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
--VALUES('C75F0853-8A2B-4B32-83B7-509278D11957','项目里程碑节点','',40,'0','Menu_JDGL',0,1,1)
|
||||
--GO
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('3BCA8C5D-C781-4BF7-90C5-1EE569D0F810','C75F0853-8A2B-4B32-83B7-509278D11957','增加',1)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('1AC052E6-0FA0-45C4-A8AB-A8C71931DEC6','C75F0853-8A2B-4B32-83B7-509278D11957','修改',2)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('08B9E2EB-2998-4225-A6E5-F51597608000','C75F0853-8A2B-4B32-83B7-509278D11957','删除',3)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('FAF17C45-6D8A-4679-90A8-B8AF4F86EFB8','C75F0853-8A2B-4B32-83B7-509278D11957','保存',4)
|
||||
--GO
|
||||
|
||||
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
--VALUES('3550F422-E520-4962-9816-B691B0EE2865','形象进度照片','',50,'0','Menu_JDGL',0,1,1)
|
||||
--GO
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('92792060-5ED8-4A87-A355-93728321D4E8','3550F422-E520-4962-9816-B691B0EE2865','增加',1)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('6859B3C5-A8CF-48CF-8F7C-EA707ED5710A','3550F422-E520-4962-9816-B691B0EE2865','修改',2)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('274A6E9E-193A-498F-ABD3-A78437C79C00','3550F422-E520-4962-9816-B691B0EE2865','删除',3)
|
||||
--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
--VALUES('947CD34B-57C0-40EE-9773-53A75925D9AD','3550F422-E520-4962-9816-B691B0EE2865','保存',4)
|
||||
--GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('1172B112-2A12-4410-AD66-E5BA6B461475','施工进度赢得值曲线','JDGL/Check/ProgressStatistics.aspx',20,'0','Menu_JDGL',0,1,1)
|
||||
VALUES('E23F0879-3E9F-4E7B-9A2D-EFF34798D629','进度计划设置','JDGL/Check/PlanSet.aspx',10,'0','Menu_JDGL',0,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('F5055103-6182-43E0-93EC-7DD7BEF2B71C','E23F0879-3E9F-4E7B-9A2D-EFF34798D629','保存',4)
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('4288426D-E49B-4E5D-A495-7E6A76F269B5','周计划','',30,'0','Menu_JDGL',0,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('98E9B88C-5BB8-4673-9B6C-69B446E57C11','4288426D-E49B-4E5D-A495-7E6A76F269B5','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('B69119FC-F0AB-4C07-83FB-48D2CEF00C5F','4288426D-E49B-4E5D-A495-7E6A76F269B5','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('DC33D5E2-2C3B-4C9B-9887-1CF2EB2A3C7F','4288426D-E49B-4E5D-A495-7E6A76F269B5','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('CBF94555-B633-44CC-9919-3CE579D368CD','4288426D-E49B-4E5D-A495-7E6A76F269B5','保存',4)
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('C75F0853-8A2B-4B32-83B7-509278D11957','项目里程碑节点','',40,'0','Menu_JDGL',0,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('3BCA8C5D-C781-4BF7-90C5-1EE569D0F810','C75F0853-8A2B-4B32-83B7-509278D11957','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('1AC052E6-0FA0-45C4-A8AB-A8C71931DEC6','C75F0853-8A2B-4B32-83B7-509278D11957','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('08B9E2EB-2998-4225-A6E5-F51597608000','C75F0853-8A2B-4B32-83B7-509278D11957','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('FAF17C45-6D8A-4679-90A8-B8AF4F86EFB8','C75F0853-8A2B-4B32-83B7-509278D11957','保存',4)
|
||||
GO
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES('3550F422-E520-4962-9816-B691B0EE2865','形象进度照片','',50,'0','Menu_JDGL',0,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('92792060-5ED8-4A87-A355-93728321D4E8','3550F422-E520-4962-9816-B691B0EE2865','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('6859B3C5-A8CF-48CF-8F7C-EA707ED5710A','3550F422-E520-4962-9816-B691B0EE2865','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('274A6E9E-193A-498F-ABD3-A78437C79C00','3550F422-E520-4962-9816-B691B0EE2865','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('947CD34B-57C0-40EE-9773-53A75925D9AD','3550F422-E520-4962-9816-B691B0EE2865','保存',4)
|
||||
GO
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
|
|
@ -30,6 +32,14 @@ namespace BLL
|
|||
newWorkPackage.IsApprove = WorkPackage.IsApprove;
|
||||
newWorkPackage.Costs = WorkPackage.Costs;
|
||||
newWorkPackage.SubItemType = WorkPackage.SubItemType;
|
||||
newWorkPackage.PreJobId = WorkPackage.PreJobId;
|
||||
newWorkPackage.PlanProjectQuantity = WorkPackage.PlanProjectQuantity;
|
||||
newWorkPackage.RealProjectQuantity = WorkPackage.RealProjectQuantity;
|
||||
newWorkPackage.PlanStartDate = WorkPackage.PlanStartDate;
|
||||
newWorkPackage.PlanEndDate = WorkPackage.PlanEndDate;
|
||||
newWorkPackage.RealStartDate = WorkPackage.RealStartDate;
|
||||
newWorkPackage.RealEndDate = WorkPackage.RealEndDate;
|
||||
newWorkPackage.Unit = WorkPackage.Unit;
|
||||
|
||||
db.WBS_WorkPackage.InsertOnSubmit(newWorkPackage);
|
||||
db.SubmitChanges();
|
||||
|
|
@ -54,6 +64,15 @@ namespace BLL
|
|||
newWorkPackage.IsApprove = WorkPackage.IsApprove;
|
||||
newWorkPackage.Costs = WorkPackage.Costs;
|
||||
newWorkPackage.SubItemType = WorkPackage.SubItemType;
|
||||
newWorkPackage.PreJobId = WorkPackage.PreJobId;
|
||||
newWorkPackage.PlanProjectQuantity = WorkPackage.PlanProjectQuantity;
|
||||
newWorkPackage.RealProjectQuantity = WorkPackage.RealProjectQuantity;
|
||||
newWorkPackage.PlanStartDate = WorkPackage.PlanStartDate;
|
||||
newWorkPackage.PlanEndDate = WorkPackage.PlanEndDate;
|
||||
newWorkPackage.RealStartDate = WorkPackage.RealStartDate;
|
||||
newWorkPackage.RealEndDate = WorkPackage.RealEndDate;
|
||||
newWorkPackage.Unit = WorkPackage.Unit;
|
||||
newWorkPackage.IsMileStone = WorkPackage.IsMileStone;
|
||||
|
||||
db.SubmitChanges();
|
||||
}
|
||||
|
|
@ -218,5 +237,136 @@ namespace BLL
|
|||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取模拟树表格
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static DataTable GetAllTreeDataTable(string projectId)
|
||||
{
|
||||
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
IQueryable<Model.WBS_WorkPackage> workPackages = from x in db.WBS_WorkPackage where x.ProjectId == projectId select x;
|
||||
IQueryable<Model.WBS_UnitWork> unitWorks = from x in db.WBS_UnitWork where x.ProjectId == projectId select x;
|
||||
List<Model.View_WBS> getWBSs = (from x in db.View_WBS where x.ProjectId == projectId select x).ToList();
|
||||
List<Model.View_WBS> WBSList = new List<Model.View_WBS>();
|
||||
DataTable table = new DataTable();
|
||||
table.Columns.Add(new DataColumn("Id", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("SupId", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("Name", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("WBSType", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("ProjectId", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("ShowId", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("Weights", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("Unit", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("PlanProjectQuantity", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("RealProjectQuantity", typeof(String)));
|
||||
table.Columns.Add(new DataColumn("PlanStartDate", typeof(DateTime)));
|
||||
table.Columns.Add(new DataColumn("PlanEndDate", typeof(DateTime)));
|
||||
table.Columns.Add(new DataColumn("RealStartDate", typeof(DateTime)));
|
||||
table.Columns.Add(new DataColumn("RealEndDate", typeof(DateTime)));
|
||||
table.Columns.Add(new DataColumn("IsMileStone", typeof(bool)));
|
||||
if (getWBSs.Count() > 0)
|
||||
{
|
||||
List<Model.View_WBS> newList = new List<Model.View_WBS>();
|
||||
var projectTypes = getWBSs.Where(x => x.WBSType == "ProjectType" && x.SupId == "0");
|
||||
foreach (var item in projectTypes)
|
||||
{
|
||||
newList.Add(item);
|
||||
AddDetail(newList, getWBSs.ToList(), item.Id);
|
||||
}
|
||||
DataRow row;
|
||||
foreach (Model.View_WBS item in newList)
|
||||
{
|
||||
row = table.NewRow();
|
||||
row[0] = item.Id;
|
||||
row[1] = item.SupId;
|
||||
row[2] = item.Name;
|
||||
row[3] = item.WBSType;
|
||||
row[4] = item.ProjectId;
|
||||
if (item.WBSType == "WorkPackage")
|
||||
{
|
||||
var childWorkPackages = from x in workPackages where x.SuperWorkPackageId == item.Id && x.IsApprove == true select x;
|
||||
if (childWorkPackages.Count() == 0)
|
||||
{
|
||||
row[5] = item.Id;
|
||||
var workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == item.Id);
|
||||
if (workPackage != null)
|
||||
{
|
||||
if (workPackage.Weights != null)
|
||||
{
|
||||
row[6] = decimal.Round(Convert.ToDecimal(workPackage.Weights), 2);
|
||||
}
|
||||
row[7] = workPackage.Unit;
|
||||
if (workPackage.PlanProjectQuantity != null)
|
||||
{
|
||||
row[8] = decimal.Round(Convert.ToDecimal(workPackage.PlanProjectQuantity), 2);
|
||||
}
|
||||
if (workPackage.RealProjectQuantity != null)
|
||||
{
|
||||
row[9] = decimal.Round(Convert.ToDecimal(workPackage.RealProjectQuantity), 2);
|
||||
}
|
||||
if (workPackage.PlanStartDate != null)
|
||||
{
|
||||
row[10] = workPackage.PlanStartDate;
|
||||
}
|
||||
if (workPackage.PlanEndDate != null)
|
||||
{
|
||||
row[11] = workPackage.PlanEndDate;
|
||||
}
|
||||
if (workPackage.RealStartDate != null)
|
||||
{
|
||||
row[12] = workPackage.RealStartDate;
|
||||
}
|
||||
if (workPackage.RealEndDate != null)
|
||||
{
|
||||
row[13] = workPackage.RealEndDate;
|
||||
}
|
||||
if (workPackage.IsMileStone != null)
|
||||
{
|
||||
row[14] = workPackage.IsMileStone;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (item.WBSType == "UnitWork")
|
||||
{
|
||||
var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == item.Id);
|
||||
if (unitWork != null)
|
||||
{
|
||||
if (unitWork.PlanStartDate != null)
|
||||
{
|
||||
row[10] = unitWork.PlanStartDate;
|
||||
}
|
||||
if (unitWork.PlanEndDate != null)
|
||||
{
|
||||
row[11] = unitWork.PlanEndDate;
|
||||
}
|
||||
if (unitWork.RealStartDate != null)
|
||||
{
|
||||
row[12] = unitWork.RealStartDate;
|
||||
}
|
||||
if (unitWork.RealEndDate != null)
|
||||
{
|
||||
row[13] = unitWork.RealEndDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
table.Rows.Add(row);
|
||||
}
|
||||
}
|
||||
return table;
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddDetail(List<Model.View_WBS> newList, List<Model.View_WBS> oldList, string id)
|
||||
{
|
||||
var items = oldList.Where(x => x.SupId == id).OrderBy(x => x.Code);
|
||||
foreach (var item in items)
|
||||
{
|
||||
newList.Add(item);
|
||||
AddDetail(newList, oldList, item.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4452,6 +4452,13 @@
|
|||
|
||||
#endregion
|
||||
|
||||
#region 进度
|
||||
/// <summary>
|
||||
/// 项目施工WBS定制
|
||||
/// </summary>
|
||||
public const string PlanSetMenuId = "E23F0879-3E9F-4E7B-9A2D-EFF34798D629";
|
||||
#endregion
|
||||
|
||||
#region 施工综合
|
||||
#region 菜单Id
|
||||
/// <summary>
|
||||
|
|
|
|||
|
|
@ -58,6 +58,10 @@ namespace BLL
|
|||
newUnitWork.NDEUnit = UnitWork.NDEUnit;
|
||||
newUnitWork.Costs = UnitWork.Costs;
|
||||
newUnitWork.MainItemAndDesignProfessionalIds = UnitWork.MainItemAndDesignProfessionalIds;
|
||||
newUnitWork.PlanStartDate = UnitWork.PlanStartDate;
|
||||
newUnitWork.PlanEndDate = UnitWork.PlanEndDate;
|
||||
newUnitWork.RealStartDate = UnitWork.RealStartDate;
|
||||
newUnitWork.RealEndDate = UnitWork.RealEndDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
GetWeights(UnitWork.ProjectId);
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1126,6 +1126,7 @@
|
|||
<Content Include="indexProject.aspx" />
|
||||
<Content Include="font\iconfont.svg" />
|
||||
<Content Include="index.aspx" />
|
||||
<Content Include="JDGL\Check\PlanSet.aspx" />
|
||||
<Content Include="JDGL\Check\ProgressShow.aspx" />
|
||||
<Content Include="JDGL\Check\ProgressStatistics.aspx" />
|
||||
<Content Include="Login.aspx" />
|
||||
|
|
@ -11502,6 +11503,13 @@
|
|||
<Compile Include="index.aspx.designer.cs">
|
||||
<DependentUpon>index.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="JDGL\Check\PlanSet.aspx.cs">
|
||||
<DependentUpon>PlanSet.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="JDGL\Check\PlanSet.aspx.designer.cs">
|
||||
<DependentUpon>PlanSet.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="JDGL\Check\ProgressShow.aspx.cs">
|
||||
<DependentUpon>ProgressShow.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
|
|
|||
|
|
@ -410,15 +410,50 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
{
|
||||
projectName = "(" + projectName + ")";
|
||||
}
|
||||
else
|
||||
{
|
||||
projectName = "(无项目)";
|
||||
}
|
||||
projectName = projectName.Replace("/", "_");
|
||||
newUrl = uploadfilepath.Replace(".doc", projectName + ".doc");
|
||||
filePath = uploadfilepath.Replace(".doc", projectName + ".pdf");
|
||||
if (File.Exists(newUrl))
|
||||
{
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
|
||||
|
||||
|
||||
///更新书签
|
||||
Document doc = new Aspose.Words.Document(newUrl);
|
||||
//写入第一行
|
||||
Bookmark bookmarkProjectName = doc.Range.Bookmarks["ProjectName"];
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var project = ProjectService.GetProjectByProjectId(actionPlanList.ProjectId);
|
||||
var ActionPlan_ActionPlanListApproveList = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "2").ToList();
|
||||
|
||||
|
||||
|
||||
if (bookmarkProjectName != null)
|
||||
{
|
||||
|
||||
if (project != null)
|
||||
{
|
||||
if (project.ProjectName.Length > 20 && ActionPlan_ActionPlanListApproveList.Count != 0)
|
||||
{
|
||||
bookmarkProjectName.Text = project.ProjectName.Substring(0, 20) + "\n" +
|
||||
project.ProjectName.Substring(20);
|
||||
}
|
||||
else
|
||||
{
|
||||
bookmarkProjectName.Text = project.ProjectName;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("tab");
|
||||
builder.StartTable();
|
||||
|
|
@ -428,40 +463,6 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.RowFormat.Height = 20;
|
||||
builder.Font.Size = 9;
|
||||
#region 工程名称和项目部编制人员
|
||||
//工程名称和项目部编制人员
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("工程名称");
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 130;
|
||||
builder.Font.Bold = false;
|
||||
var project = ProjectService.GetProjectByProjectId(actionPlanList.ProjectId);
|
||||
var ActionPlan_ActionPlanListApproveList = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "2").ToList();
|
||||
if (project != null)
|
||||
{
|
||||
if (project.ProjectName.Length > 20 && ActionPlan_ActionPlanListApproveList.Count != 0)
|
||||
{
|
||||
builder.Write(project.ProjectName.Substring(0, 20) + "\n" +
|
||||
project.ProjectName.Substring(20));
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.Write(project.ProjectName);
|
||||
}
|
||||
|
||||
}
|
||||
builder.EndRow();
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
|
|
@ -476,7 +477,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 130;
|
||||
builder.CellFormat.Width = 300;
|
||||
builder.Font.Bold = false;
|
||||
var getCompileMan = Person_PersonsService.GetPerson_PersonsById(actionPlanList.CompileMan);
|
||||
if (!string.IsNullOrEmpty(getCompileMan.SignatureUrl) && File.Exists(rootPath + getCompileMan.SignatureUrl))
|
||||
|
|
@ -517,7 +518,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
//判断是不是最后一个
|
||||
if (ActionPlan_ActionPlanListApproveList.Count == i + 1)
|
||||
{
|
||||
builder.CellFormat.Width = 40;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl))
|
||||
{
|
||||
|
|
@ -534,12 +535,12 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 90;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Write("");
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.CellFormat.Width = 40;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl))
|
||||
{
|
||||
|
|
@ -561,7 +562,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 70;
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("项目部审核人");
|
||||
|
||||
|
|
@ -570,7 +571,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 20;
|
||||
builder.CellFormat.Width = 50;
|
||||
var getApproveMan2 = Person_PersonsService.GetPerson_PersonsById(ActionPlan_ActionPlanListApproveList[i + 1].ApproveMan);
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(getApproveMan2.SignatureUrl) && File.Exists(rootPath + getApproveMan2.SignatureUrl))
|
||||
|
|
@ -608,7 +609,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 230;
|
||||
builder.CellFormat.Width = 400;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("主要评审部门");
|
||||
builder.EndRow();
|
||||
|
|
@ -618,7 +619,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("评审部门");
|
||||
|
||||
|
|
@ -627,7 +628,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("评审意见");
|
||||
|
||||
|
|
@ -636,7 +637,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 70;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("评审部门负责人/日期");
|
||||
builder.EndRow();
|
||||
|
|
@ -649,7 +650,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
builder.Write("施工管理部");
|
||||
//评审意见
|
||||
|
|
@ -658,7 +659,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(item.ApproveIdea))
|
||||
{
|
||||
|
|
@ -676,7 +677,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 70;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
if (item.ApproveDate != null)
|
||||
{
|
||||
|
|
@ -706,7 +707,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 150;
|
||||
var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId);
|
||||
builder.Font.Bold = false;
|
||||
if (departModel != null)
|
||||
|
|
@ -719,7 +720,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(item.ApproveIdea))
|
||||
{
|
||||
|
|
@ -737,7 +738,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 70;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
if (item.ApproveDate != null)
|
||||
{
|
||||
|
|
@ -777,7 +778,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Bottom;//底部对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐
|
||||
builder.CellFormat.Width = 130;
|
||||
builder.CellFormat.Width = 300;
|
||||
builder.Font.Bold = true;
|
||||
builder.RowFormat.Height = 40;
|
||||
builder.Write("公司安全总监/部门负责人:");
|
||||
|
|
@ -793,14 +794,14 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("审核");
|
||||
builder.Write("审批");
|
||||
//公司安全总监/部门负责人
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Bottom;//底部对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐
|
||||
builder.CellFormat.Width = 130;
|
||||
builder.CellFormat.Width = 300;
|
||||
builder.Font.Bold = true;
|
||||
builder.RowFormat.Height = 40;
|
||||
builder.Write("公司主管生产/安全领导:");
|
||||
|
|
@ -816,17 +817,24 @@ namespace FineUIPro.Web.HSSE.ActionPlan
|
|||
}
|
||||
|
||||
doc.Save(newUrl);
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
//生成PDF文件
|
||||
string pdfUrl = newUrl.Replace(".doc", ".pdf");
|
||||
Document doc1 = new Aspose.Words.Document(newUrl);
|
||||
//验证参数
|
||||
if (doc1 == null) { throw new Exception("Word文件无效"); }
|
||||
doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(pdfUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.TransmitFile(pdfUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
File.Delete(pdfUrl);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,130 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlanSet.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.PlanSet" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>进度计划设置</title>
|
||||
<style type="text/css">
|
||||
.f-grid-row.noEdit {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.f-grid-colheader-text {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
|
||||
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="项目情况" BoxFlex="1" AllowColumnLocking="true" ForceFit="true"
|
||||
runat="server" EnableCollapse="true" DataKeyNames="Id,Name,ShowId" EnableTree="true" EnableColumnLines="true" ClicksToEdit="1" AllowCellEditing="true"
|
||||
TreeColumn="Name" DataIDField="Id" DataParentIDField="SupId" ExpandAllTreeNodes="true">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:TextBox runat="server" ID="hdId" Hidden="true"></f:TextBox>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存"
|
||||
OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<%--<f:RowNumberField HeaderText="序号"/>--%>
|
||||
<f:BoundField Width="350px" ColumnID="Name" DataField="Name" HeaderTextAlign="Center"
|
||||
HeaderText="工作内容" />
|
||||
<f:TemplateField Width="90px" HeaderText="里程碑点" HeaderTextAlign="Center" ID="IsMileStone" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cbIsMileStone" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="100px" ColumnID="Weights" DataField="Weights" FieldType="Double"
|
||||
HeaderText="权重(%)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:NumberBox ID="nbWeights" NoDecimal="false" NoNegative="true" MinValue="0"
|
||||
runat="server">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="Unit" DataField="Unit" FieldType="String"
|
||||
HeaderText="单位" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:TextBox runat="server" ID="txtUnit" MaxLength="50"></f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanProjectQuantity" DataField="PlanProjectQuantity" FieldType="Double"
|
||||
HeaderText="概算工程量" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:NumberBox ID="nbPlanProjectQuantity" NoDecimal="false" NoNegative="true" MinValue="0"
|
||||
runat="server">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="RealProjectQuantity" DataField="RealProjectQuantity" FieldType="Double"
|
||||
HeaderText="实际工程量" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:NumberBox ID="nbRealProjectQuantity" NoDecimal="false" NoNegative="true" MinValue="0"
|
||||
runat="server">
|
||||
</f:NumberBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanStartDate" DataField="PlanStartDate" FieldType="Date"
|
||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划开始时间" HeaderTextAlign="Center">
|
||||
<Editor>
|
||||
<f:DatePicker ID="txtPlanStartDate" Required="true" runat="server">
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="PlanEndDate" DataField="PlanEndDate" FieldType="Date"
|
||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划完成时间" HeaderTextAlign="Center">
|
||||
<Editor>
|
||||
<f:DatePicker ID="txtPlanEndDate" Required="true" runat="server">
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="RealStartDate" DataField="RealStartDate" FieldType="Date"
|
||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="实际开始时间" HeaderTextAlign="Center">
|
||||
<Editor>
|
||||
<f:DatePicker ID="txtRealStartDate" Required="true" runat="server">
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="100px" ColumnID="RealEndDate" DataField="RealEndDate" FieldType="Date"
|
||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="实际完成时间" HeaderTextAlign="Center">
|
||||
<Editor>
|
||||
<f:DatePicker ID="txtRealEndDate" Required="true" runat="server">
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var hdIdClientID = '<%= hdId.ClientID %>';
|
||||
|
||||
function onGridAfterEdit(event, value, params) {
|
||||
var me = this, columnId = params.columnId, rowId = params.rowId;
|
||||
var str = F(hdIdClientID).ooIl1;
|
||||
if (str == undefined) {
|
||||
str = rowId;
|
||||
}
|
||||
else {
|
||||
str = str + "," + rowId;
|
||||
}
|
||||
F(hdIdClientID).setValue(str);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,387 @@
|
|||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.JDGL.Check
|
||||
{
|
||||
public partial class PlanSet : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
{
|
||||
if (string.IsNullOrEmpty(this.Grid1.Rows[i].DataKeys[2].ToString()))
|
||||
{
|
||||
System.Web.UI.WebControls.CheckBox cbIsMileStone = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsMileStone"));
|
||||
cbIsMileStone.Visible = false;
|
||||
foreach (GridColumn column in Grid1.Columns)
|
||||
{
|
||||
if (column.ColumnIndex != 0)
|
||||
{
|
||||
this.Grid1.Rows[i].CellCssClasses[column.ColumnIndex] = "f-grid-cell-uneditable";
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
System.Web.UI.WebControls.CheckBox cbIsMileStone = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsMileStone"));
|
||||
Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(this.Grid1.Rows[i].DataKeys[2].ToString());
|
||||
if (workPackage != null && workPackage.IsMileStone == true)
|
||||
{
|
||||
cbIsMileStone.Checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 保存
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.PlanSetMenuId, BLL.Const.BtnSave))
|
||||
{
|
||||
Save();
|
||||
BindGrid();
|
||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHideReference());
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
private void Save()
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
var workPackages = from x in db.WBS_WorkPackage
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
var unitWorks = from x in db.WBS_UnitWork
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
select x;
|
||||
string[] ids = this.hdId.Text.Split(',');
|
||||
if (ids.Length > 0)
|
||||
{
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
int i = mergedRow.Value<int>("index");
|
||||
if (this.Grid1.Rows[i].DataKeys[2] != null)
|
||||
{
|
||||
Model.WBS_WorkPackage workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == this.Grid1.Rows[i].DataKeys[2].ToString());
|
||||
if (workPackage != null)
|
||||
{
|
||||
string weights = values.Value<string>("Weights");
|
||||
string unit = values.Value<string>("Unit");
|
||||
string planProjectQuantity = values.Value<string>("PlanProjectQuantity");
|
||||
string realProjectQuantity = values.Value<string>("RealProjectQuantity");
|
||||
string planStartDate = values.Value<string>("PlanStartDate");
|
||||
string planEndDate = values.Value<string>("PlanEndDate");
|
||||
string realStartDate = values.Value<string>("RealStartDate");
|
||||
string realEndDate = values.Value<string>("RealEndDate");
|
||||
System.Web.UI.WebControls.CheckBox cbIsMileStone = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsMileStone"));
|
||||
workPackage.Weights = Funs.GetNewDecimal(weights);
|
||||
workPackage.Unit = unit;
|
||||
workPackage.PlanProjectQuantity = Funs.GetNewDecimal(planProjectQuantity);
|
||||
workPackage.RealProjectQuantity = Funs.GetNewDecimal(realProjectQuantity);
|
||||
workPackage.PlanStartDate = Funs.GetNewDateTime(planStartDate);
|
||||
workPackage.PlanEndDate = Funs.GetNewDateTime(planEndDate);
|
||||
workPackage.RealStartDate = Funs.GetNewDateTime(realStartDate);
|
||||
workPackage.RealEndDate = Funs.GetNewDateTime(realEndDate);
|
||||
workPackage.IsMileStone = cbIsMileStone.Checked;
|
||||
BLL.WorkPackageService.UpdateWorkPackage(workPackage);
|
||||
if (workPackage.PlanStartDate != null || workPackage.PlanEndDate != null || workPackage.RealStartDate != null || workPackage.RealEndDate != null)
|
||||
{
|
||||
UpdateWorkPackages(db, workPackage, workPackage.PlanStartDate, workPackage.PlanEndDate, workPackage.RealStartDate, workPackage.RealEndDate);
|
||||
var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId);
|
||||
if (workPackage.PlanStartDate != null)
|
||||
{
|
||||
if (unitWork.PlanStartDate == null)
|
||||
{
|
||||
unitWork.PlanStartDate = workPackage.PlanStartDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (unitWork.PlanStartDate > workPackage.PlanStartDate)
|
||||
{
|
||||
unitWork.PlanStartDate = workPackage.PlanStartDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (workPackage.PlanEndDate != null)
|
||||
{
|
||||
if (unitWork.PlanEndDate == null)
|
||||
{
|
||||
unitWork.PlanEndDate = workPackage.PlanEndDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (unitWork.PlanEndDate < workPackage.PlanEndDate)
|
||||
{
|
||||
unitWork.PlanEndDate = workPackage.PlanEndDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (workPackage.RealStartDate != null)
|
||||
{
|
||||
if (unitWork.RealStartDate == null)
|
||||
{
|
||||
unitWork.RealStartDate = workPackage.RealStartDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (unitWork.RealStartDate > workPackage.RealStartDate)
|
||||
{
|
||||
unitWork.RealStartDate = workPackage.RealStartDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (workPackage.RealEndDate != null)
|
||||
{
|
||||
if (unitWork.RealEndDate == null)
|
||||
{
|
||||
unitWork.RealEndDate = workPackage.RealEndDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (unitWork.RealEndDate < workPackage.RealEndDate)
|
||||
{
|
||||
unitWork.RealEndDate = workPackage.RealEndDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 更新工作包、工作项
|
||||
/// <summary>
|
||||
/// 更新月工作包、工作项
|
||||
/// </summary>
|
||||
/// <param name="years"></param>
|
||||
/// <param name="months"></param>
|
||||
/// <param name="planValue"></param>
|
||||
/// <param name="parentId"></param>
|
||||
private void UpdateWorkPackages(Model.SGGLDB db, Model.WBS_WorkPackage workPackage, DateTime? planStartDate, DateTime? planEndDate, DateTime? realStartDate, DateTime? realEndDate)
|
||||
{
|
||||
if (workPackage != null)
|
||||
{
|
||||
Model.WBS_WorkPackage parentWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(workPackage.SuperWorkPackageId);
|
||||
if (parentWorkPackage != null)
|
||||
{
|
||||
if (planStartDate != null)
|
||||
{
|
||||
if (parentWorkPackage.PlanStartDate == null)
|
||||
{
|
||||
parentWorkPackage.PlanStartDate = planStartDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parentWorkPackage.PlanStartDate > planStartDate)
|
||||
{
|
||||
parentWorkPackage.PlanStartDate = planStartDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (planEndDate != null)
|
||||
{
|
||||
if (parentWorkPackage.PlanEndDate == null)
|
||||
{
|
||||
parentWorkPackage.PlanEndDate = planEndDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parentWorkPackage.PlanEndDate < planEndDate)
|
||||
{
|
||||
parentWorkPackage.PlanEndDate = planEndDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (realStartDate != null)
|
||||
{
|
||||
if (parentWorkPackage.RealStartDate == null)
|
||||
{
|
||||
parentWorkPackage.RealStartDate = realStartDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parentWorkPackage.RealStartDate > realStartDate)
|
||||
{
|
||||
parentWorkPackage.RealStartDate = realStartDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (realEndDate != null)
|
||||
{
|
||||
if (parentWorkPackage.RealEndDate == null)
|
||||
{
|
||||
parentWorkPackage.RealEndDate = realEndDate;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parentWorkPackage.RealEndDate < realEndDate)
|
||||
{
|
||||
parentWorkPackage.RealEndDate = realEndDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
UpdateWorkPackages(db, parentWorkPackage, planStartDate, planEndDate, realStartDate, realEndDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新周工作包、工作项
|
||||
/// </summary>
|
||||
/// <param name="years"></param>
|
||||
/// <param name="months"></param>
|
||||
/// <param name="planValue"></param>
|
||||
/// <param name="parentId"></param>
|
||||
private void UpdateWeekWbsSetDetail(string wbsSetId, DateTime months, DateTime startDate, DateTime endDate, decimal changeThisPlanValue, decimal changeThisRealCost, decimal changeThisPlanCost)
|
||||
{
|
||||
//Model.Wbs_WbsSet wbsSet = BLL.WbsSetService.GetWbsSetByWbsSetId(wbsSetId);
|
||||
//if (wbsSet != null)
|
||||
//{
|
||||
// Model.WBS_CostControlParentDetail parentDetail = BLL.CostControlParentDetailService.GetCostControlParentDetailByParentIdAndMonthsWeek(wbsSetId, months, startDate);
|
||||
// if (parentDetail != null)
|
||||
// {
|
||||
// parentDetail.ThisPlanValue += changeThisPlanValue;
|
||||
// parentDetail.ThisRealCost += changeThisRealCost;
|
||||
// parentDetail.ThisPlanCost += changeThisPlanCost;
|
||||
// BLL.CostControlParentDetailService.UpdateCostControlParentDetail(parentDetail);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// parentDetail = new Model.WBS_CostControlParentDetail();
|
||||
// parentDetail.CostControlParentDetailId = SQLHelper.GetNewID();
|
||||
// parentDetail.ParentId = wbsSetId;
|
||||
// parentDetail.Months = months;
|
||||
// parentDetail.StartDate = startDate;
|
||||
// parentDetail.EndDate = endDate;
|
||||
// parentDetail.ThisPlanValue = changeThisPlanValue;
|
||||
// parentDetail.ThisRealCost = changeThisRealCost;
|
||||
// parentDetail.ThisPlanCost = changeThisPlanCost;
|
||||
// BLL.CostControlParentDetailService.AddCostControlParentDetail(parentDetail);
|
||||
// }
|
||||
// if (wbsSet.SuperWbsSetId != null) //还存在上级节点,需要继续循环
|
||||
// {
|
||||
// UpdateWeekWbsSetDetail(wbsSet.SuperWbsSetId, months, startDate, endDate, changeThisPlanValue, changeThisRealCost, changeThisPlanCost);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 更新装置
|
||||
/// <summary>
|
||||
/// 更新月装置
|
||||
/// </summary>
|
||||
/// <param name="years"></param>
|
||||
/// <param name="months"></param>
|
||||
/// <param name="planValue"></param>
|
||||
/// <param name="parentId"></param>
|
||||
private void UpdateInstallationDetail(Model.SGGLDB db, string installationId, DateTime months, decimal changeThisPlanValue, decimal changeThisRealCost, decimal changeThisPlanCost)
|
||||
{
|
||||
//Model.Project_Installation installation = BLL.Project_InstallationService.GetInstallationByInstallationId(installationId);
|
||||
//if (installation != null)
|
||||
//{
|
||||
// Model.WBS_CostControlParentDetail parentDetail = BLL.CostControlParentDetailService.GetCostControlParentDetailByParentIdAndMonths(installationId, months);
|
||||
// if (parentDetail != null)
|
||||
// {
|
||||
// parentDetail.ThisPlanValue += changeThisPlanValue;
|
||||
// parentDetail.ThisRealCost += changeThisRealCost;
|
||||
// parentDetail.ThisPlanCost += changeThisPlanCost;
|
||||
// //BLL.CostControlParentDetailService.UpdateCostControlParentDetail(parentDetail);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// parentDetail = new Model.WBS_CostControlParentDetail();
|
||||
// parentDetail.CostControlParentDetailId = SQLHelper.GetNewID();
|
||||
// parentDetail.ParentId = installationId;
|
||||
// parentDetail.Months = months;
|
||||
// parentDetail.ThisPlanValue = changeThisPlanValue;
|
||||
// parentDetail.ThisRealCost = changeThisRealCost;
|
||||
// parentDetail.ThisPlanCost = changeThisPlanCost;
|
||||
// //BLL.CostControlParentDetailService.AddCostControlParentDetail(parentDetail);
|
||||
// db.WBS_CostControlParentDetail.InsertOnSubmit(parentDetail);
|
||||
// }
|
||||
// if (installation.SuperInstallationId != null) //还存在上级节点,需要继续循环
|
||||
// {
|
||||
// UpdateInstallationDetail(db, installation.SuperInstallationId, months, changeThisPlanValue, changeThisRealCost, changeThisPlanCost);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新周装置
|
||||
/// </summary>
|
||||
/// <param name="years"></param>
|
||||
/// <param name="months"></param>
|
||||
/// <param name="planValue"></param>
|
||||
/// <param name="parentId"></param>
|
||||
private void UpdateWeekInstallationDetail(string installationId, DateTime months, DateTime startDate, DateTime endDate, decimal changeThisPlanValue, decimal changeThisRealCost, decimal changeThisPlanCost)
|
||||
{
|
||||
//Model.Project_Installation installation = BLL.Project_InstallationService.GetInstallationByInstallationId(installationId);
|
||||
//if (installation != null)
|
||||
//{
|
||||
// Model.WBS_CostControlParentDetail parentDetail = BLL.CostControlParentDetailService.GetCostControlParentDetailByParentIdAndMonths(installationId, months);
|
||||
// if (parentDetail != null)
|
||||
// {
|
||||
// parentDetail.ThisPlanValue += changeThisPlanValue;
|
||||
// parentDetail.ThisRealCost += changeThisRealCost;
|
||||
// parentDetail.ThisPlanCost += changeThisPlanCost;
|
||||
// BLL.CostControlParentDetailService.UpdateCostControlParentDetail(parentDetail);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// parentDetail = new Model.WBS_CostControlParentDetail();
|
||||
// parentDetail.CostControlParentDetailId = SQLHelper.GetNewID();
|
||||
// parentDetail.ParentId = installationId;
|
||||
// parentDetail.Months = months;
|
||||
// parentDetail.StartDate = startDate;
|
||||
// parentDetail.EndDate = endDate;
|
||||
// parentDetail.ThisPlanValue = changeThisPlanValue;
|
||||
// parentDetail.ThisRealCost = changeThisRealCost;
|
||||
// parentDetail.ThisPlanCost = changeThisPlanCost;
|
||||
// BLL.CostControlParentDetailService.AddCostControlParentDetail(parentDetail);
|
||||
// }
|
||||
// if (installation.SuperInstallationId != null) //还存在上级节点,需要继续循环
|
||||
// {
|
||||
// UpdateWeekInstallationDetail(installation.SuperInstallationId, months, startDate, endDate, changeThisPlanValue, changeThisRealCost, changeThisPlanCost);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,168 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.JDGL.Check {
|
||||
|
||||
|
||||
public partial class PlanSet {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// hdId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox hdId;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// IsMileStone 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TemplateField IsMileStone;
|
||||
|
||||
/// <summary>
|
||||
/// cbIsMileStone 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.CheckBox cbIsMileStone;
|
||||
|
||||
/// <summary>
|
||||
/// nbWeights 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox nbWeights;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtUnit;
|
||||
|
||||
/// <summary>
|
||||
/// nbPlanProjectQuantity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox nbPlanProjectQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// nbRealProjectQuantity 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox nbRealProjectQuantity;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanStartDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtPlanStartDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtPlanEndDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtPlanEndDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtRealStartDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtRealStartDate;
|
||||
|
||||
/// <summary>
|
||||
/// txtRealEndDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker txtRealEndDate;
|
||||
}
|
||||
}
|
||||
|
|
@ -398,13 +398,44 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
}
|
||||
projectName = projectName.Replace("/", "_");
|
||||
newUrl = uploadfilepath.Replace(".doc", projectName + ".doc");
|
||||
filePath = uploadfilepath.Replace(".doc", projectName + ".pdf");
|
||||
if (File.Exists(newUrl))
|
||||
{
|
||||
File.Delete(newUrl);
|
||||
}
|
||||
File.Copy(uploadfilepath, newUrl);
|
||||
|
||||
|
||||
|
||||
///更新书签
|
||||
Document doc = new Aspose.Words.Document(newUrl);
|
||||
//写入第一行
|
||||
Bookmark bookmarkProjectName = doc.Range.Bookmarks["ProjectName"];
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
var project = ProjectService.GetProjectByProjectId(actionPlanList.ProjectId);
|
||||
var ActionPlan_ActionPlanListApproveList = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "2").ToList();
|
||||
|
||||
|
||||
|
||||
if (bookmarkProjectName != null)
|
||||
{
|
||||
|
||||
if (project != null)
|
||||
{
|
||||
if (project.ProjectName.Length > 20 && ActionPlan_ActionPlanListApproveList.Count != 0)
|
||||
{
|
||||
bookmarkProjectName.Text = project.ProjectName.Substring(0, 20) + "\n" +
|
||||
project.ProjectName.Substring(20);
|
||||
}
|
||||
else
|
||||
{
|
||||
bookmarkProjectName.Text = project.ProjectName;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
|
||||
builder.MoveToBookmark("tab");
|
||||
builder.StartTable();
|
||||
|
|
@ -414,40 +445,6 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.RowFormat.Height = 20;
|
||||
builder.Font.Size = 9;
|
||||
#region 工程名称和项目部编制人员
|
||||
//工程名称和项目部编制人员
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("工程名称");
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 130;
|
||||
builder.Font.Bold = false;
|
||||
var project = ProjectService.GetProjectByProjectId(actionPlanList.ProjectId);
|
||||
var ActionPlan_ActionPlanListApproveList = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "2").ToList();
|
||||
if (project != null)
|
||||
{
|
||||
if (project.ProjectName.Length > 20 && ActionPlan_ActionPlanListApproveList.Count != 0)
|
||||
{
|
||||
builder.Write(project.ProjectName.Substring(0, 20) + "\n" +
|
||||
project.ProjectName.Substring(20));
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.Write(project.ProjectName);
|
||||
}
|
||||
|
||||
}
|
||||
builder.EndRow();
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
|
|
@ -462,7 +459,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 130;
|
||||
builder.CellFormat.Width = 300;
|
||||
builder.Font.Bold = false;
|
||||
var getCompileMan = Person_PersonsService.GetPerson_PersonsById(actionPlanList.CompileMan);
|
||||
if (!string.IsNullOrEmpty(getCompileMan.SignatureUrl) && File.Exists(rootPath + getCompileMan.SignatureUrl))
|
||||
|
|
@ -503,7 +500,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
//判断是不是最后一个
|
||||
if (ActionPlan_ActionPlanListApproveList.Count == i + 1)
|
||||
{
|
||||
builder.CellFormat.Width = 40;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl))
|
||||
{
|
||||
|
|
@ -520,12 +517,12 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 90;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Write("");
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.CellFormat.Width = 40;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl))
|
||||
{
|
||||
|
|
@ -547,7 +544,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 70;
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("项目部审核人");
|
||||
|
||||
|
|
@ -556,7 +553,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 20;
|
||||
builder.CellFormat.Width = 50;
|
||||
var getApproveMan2 = Person_PersonsService.GetPerson_PersonsById(ActionPlan_ActionPlanListApproveList[i + 1].ApproveMan);
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(getApproveMan2.SignatureUrl) && File.Exists(rootPath + getApproveMan2.SignatureUrl))
|
||||
|
|
@ -594,7 +591,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 230;
|
||||
builder.CellFormat.Width = 400;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("主要评审部门");
|
||||
builder.EndRow();
|
||||
|
|
@ -604,7 +601,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("评审部门");
|
||||
|
||||
|
|
@ -613,7 +610,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("评审意见");
|
||||
|
||||
|
|
@ -622,7 +619,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 70;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("评审部门负责人/日期");
|
||||
builder.EndRow();
|
||||
|
|
@ -635,7 +632,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
builder.Write("施工管理部");
|
||||
//评审意见
|
||||
|
|
@ -644,7 +641,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(item.ApproveIdea))
|
||||
{
|
||||
|
|
@ -662,7 +659,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 70;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
if (item.ApproveDate != null)
|
||||
{
|
||||
|
|
@ -692,7 +689,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 150;
|
||||
var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId);
|
||||
builder.Font.Bold = false;
|
||||
if (departModel != null)
|
||||
|
|
@ -705,7 +702,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 80;
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = false;
|
||||
if (!string.IsNullOrEmpty(item.ApproveIdea))
|
||||
{
|
||||
|
|
@ -723,7 +720,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 70;
|
||||
builder.CellFormat.Width = 150;
|
||||
builder.Font.Bold = false;
|
||||
if (item.ApproveDate != null)
|
||||
{
|
||||
|
|
@ -763,7 +760,7 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Bottom;//底部对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐
|
||||
builder.CellFormat.Width = 130;
|
||||
builder.CellFormat.Width = 300;
|
||||
builder.Font.Bold = true;
|
||||
builder.RowFormat.Height = 40;
|
||||
builder.Write("公司安全总监/部门负责人:");
|
||||
|
|
@ -779,14 +776,14 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
|
||||
builder.CellFormat.Width = 100;
|
||||
builder.Font.Bold = true;
|
||||
builder.Write("审核");
|
||||
builder.Write("审批");
|
||||
//公司安全总监/部门负责人
|
||||
builder.InsertCell();
|
||||
builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None;
|
||||
builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First;
|
||||
builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Bottom;//底部对齐
|
||||
builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐
|
||||
builder.CellFormat.Width = 130;
|
||||
builder.CellFormat.Width = 300;
|
||||
builder.Font.Bold = true;
|
||||
builder.RowFormat.Height = 40;
|
||||
builder.Write("公司主管生产/安全领导:");
|
||||
|
|
@ -802,17 +799,24 @@ namespace FineUIPro.Web.ZHGL.Plan
|
|||
}
|
||||
|
||||
doc.Save(newUrl);
|
||||
string fileName = Path.GetFileName(newUrl);
|
||||
FileInfo info = new FileInfo(newUrl);
|
||||
//生成PDF文件
|
||||
string pdfUrl = newUrl.Replace(".doc", ".pdf");
|
||||
Document doc1 = new Aspose.Words.Document(newUrl);
|
||||
//验证参数
|
||||
if (doc1 == null) { throw new Exception("Word文件无效"); }
|
||||
doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
FileInfo info = new FileInfo(pdfUrl);
|
||||
long fileSize = info.Length;
|
||||
Response.Clear();
|
||||
Response.ContentType = "application/x-zip-compressed";
|
||||
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
Response.TransmitFile(newUrl, 0, fileSize);
|
||||
Response.TransmitFile(pdfUrl, 0, fileSize);
|
||||
Response.Flush();
|
||||
Response.Close();
|
||||
File.Delete(newUrl);
|
||||
File.Delete(pdfUrl);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6696,6 +6696,14 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<View_WBS> View_WBS
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetTable<View_WBS>();
|
||||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<View_WBS_ControlItemAndCycle> View_WBS_ControlItemAndCycle
|
||||
{
|
||||
get
|
||||
|
|
@ -287728,6 +287736,123 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_WBS")]
|
||||
public partial class View_WBS
|
||||
{
|
||||
|
||||
private string _Id;
|
||||
|
||||
private string _SupId;
|
||||
|
||||
private string _Code;
|
||||
|
||||
private string _Name;
|
||||
|
||||
private string _WBSType;
|
||||
|
||||
private string _ProjectId;
|
||||
|
||||
public View_WBS()
|
||||
{
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Id;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Id != value))
|
||||
{
|
||||
this._Id = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SupId", DbType="NVarChar(50)")]
|
||||
public string SupId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._SupId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._SupId != value))
|
||||
{
|
||||
this._SupId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", DbType="NVarChar(30)")]
|
||||
public string Code
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Code;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Code != value))
|
||||
{
|
||||
this._Code = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")]
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Name;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Name != value))
|
||||
{
|
||||
this._Name = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WBSType", DbType="VarChar(11) NOT NULL", CanBeNull=false)]
|
||||
public string WBSType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._WBSType;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._WBSType != value))
|
||||
{
|
||||
this._WBSType = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ProjectId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ProjectId != value))
|
||||
{
|
||||
this._ProjectId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_WBS_ControlItemAndCycle")]
|
||||
public partial class View_WBS_ControlItemAndCycle
|
||||
{
|
||||
|
|
@ -291336,6 +291461,14 @@ namespace Model
|
|||
|
||||
private string _MainItemAndDesignProfessionalIds;
|
||||
|
||||
private System.Nullable<System.DateTime> _PlanStartDate;
|
||||
|
||||
private System.Nullable<System.DateTime> _PlanEndDate;
|
||||
|
||||
private System.Nullable<System.DateTime> _RealStartDate;
|
||||
|
||||
private System.Nullable<System.DateTime> _RealEndDate;
|
||||
|
||||
private EntitySet<Accident_AccidentPersonRecord> _Accident_AccidentPersonRecord;
|
||||
|
||||
private EntitySet<Accident_AccidentReport> _Accident_AccidentReport;
|
||||
|
|
@ -291414,6 +291547,14 @@ namespace Model
|
|||
partial void OnCostsChanged();
|
||||
partial void OnMainItemAndDesignProfessionalIdsChanging(string value);
|
||||
partial void OnMainItemAndDesignProfessionalIdsChanged();
|
||||
partial void OnPlanStartDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnPlanStartDateChanged();
|
||||
partial void OnPlanEndDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnPlanEndDateChanged();
|
||||
partial void OnRealStartDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnRealStartDateChanged();
|
||||
partial void OnRealEndDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnRealEndDateChanged();
|
||||
#endregion
|
||||
|
||||
public WBS_UnitWork()
|
||||
|
|
@ -291717,6 +291858,86 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanStartDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> PlanStartDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PlanStartDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PlanStartDate != value))
|
||||
{
|
||||
this.OnPlanStartDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PlanStartDate = value;
|
||||
this.SendPropertyChanged("PlanStartDate");
|
||||
this.OnPlanStartDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanEndDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> PlanEndDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PlanEndDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PlanEndDate != value))
|
||||
{
|
||||
this.OnPlanEndDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PlanEndDate = value;
|
||||
this.SendPropertyChanged("PlanEndDate");
|
||||
this.OnPlanEndDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealStartDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> RealStartDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RealStartDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RealStartDate != value))
|
||||
{
|
||||
this.OnRealStartDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RealStartDate = value;
|
||||
this.SendPropertyChanged("RealStartDate");
|
||||
this.OnRealStartDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealEndDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> RealEndDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RealEndDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RealEndDate != value))
|
||||
{
|
||||
this.OnRealEndDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RealEndDate = value;
|
||||
this.SendPropertyChanged("RealEndDate");
|
||||
this.OnRealEndDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentPersonRecord_ProjectData_WorkArea", Storage="_Accident_AccidentPersonRecord", ThisKey="UnitWorkId", OtherKey="WorkAreaId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<Accident_AccidentPersonRecord> Accident_AccidentPersonRecord
|
||||
{
|
||||
|
|
@ -292407,6 +292628,24 @@ namespace Model
|
|||
|
||||
private string _SubItemType;
|
||||
|
||||
private string _PreJobId;
|
||||
|
||||
private System.Nullable<decimal> _PlanProjectQuantity;
|
||||
|
||||
private System.Nullable<decimal> _RealProjectQuantity;
|
||||
|
||||
private System.Nullable<System.DateTime> _PlanStartDate;
|
||||
|
||||
private System.Nullable<System.DateTime> _PlanEndDate;
|
||||
|
||||
private System.Nullable<System.DateTime> _RealStartDate;
|
||||
|
||||
private System.Nullable<System.DateTime> _RealEndDate;
|
||||
|
||||
private string _Unit;
|
||||
|
||||
private System.Nullable<bool> _IsMileStone;
|
||||
|
||||
private EntitySet<WBS_ControlItemAndCycle> _WBS_ControlItemAndCycle;
|
||||
|
||||
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
|
||||
|
|
@ -292451,6 +292690,24 @@ namespace Model
|
|||
partial void OnCostsChanged();
|
||||
partial void OnSubItemTypeChanging(string value);
|
||||
partial void OnSubItemTypeChanged();
|
||||
partial void OnPreJobIdChanging(string value);
|
||||
partial void OnPreJobIdChanged();
|
||||
partial void OnPlanProjectQuantityChanging(System.Nullable<decimal> value);
|
||||
partial void OnPlanProjectQuantityChanged();
|
||||
partial void OnRealProjectQuantityChanging(System.Nullable<decimal> value);
|
||||
partial void OnRealProjectQuantityChanged();
|
||||
partial void OnPlanStartDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnPlanStartDateChanged();
|
||||
partial void OnPlanEndDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnPlanEndDateChanged();
|
||||
partial void OnRealStartDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnRealStartDateChanged();
|
||||
partial void OnRealEndDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnRealEndDateChanged();
|
||||
partial void OnUnitChanging(string value);
|
||||
partial void OnUnitChanged();
|
||||
partial void OnIsMileStoneChanging(System.Nullable<bool> value);
|
||||
partial void OnIsMileStoneChanged();
|
||||
#endregion
|
||||
|
||||
public WBS_WorkPackage()
|
||||
|
|
@ -292824,6 +293081,186 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PreJobId", DbType="NVarChar(50)")]
|
||||
public string PreJobId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PreJobId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PreJobId != value))
|
||||
{
|
||||
this.OnPreJobIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PreJobId = value;
|
||||
this.SendPropertyChanged("PreJobId");
|
||||
this.OnPreJobIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanProjectQuantity", DbType="Decimal(18,2)")]
|
||||
public System.Nullable<decimal> PlanProjectQuantity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PlanProjectQuantity;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PlanProjectQuantity != value))
|
||||
{
|
||||
this.OnPlanProjectQuantityChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PlanProjectQuantity = value;
|
||||
this.SendPropertyChanged("PlanProjectQuantity");
|
||||
this.OnPlanProjectQuantityChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealProjectQuantity", DbType="Decimal(18,2)")]
|
||||
public System.Nullable<decimal> RealProjectQuantity
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RealProjectQuantity;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RealProjectQuantity != value))
|
||||
{
|
||||
this.OnRealProjectQuantityChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RealProjectQuantity = value;
|
||||
this.SendPropertyChanged("RealProjectQuantity");
|
||||
this.OnRealProjectQuantityChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanStartDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> PlanStartDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PlanStartDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PlanStartDate != value))
|
||||
{
|
||||
this.OnPlanStartDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PlanStartDate = value;
|
||||
this.SendPropertyChanged("PlanStartDate");
|
||||
this.OnPlanStartDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanEndDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> PlanEndDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PlanEndDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PlanEndDate != value))
|
||||
{
|
||||
this.OnPlanEndDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PlanEndDate = value;
|
||||
this.SendPropertyChanged("PlanEndDate");
|
||||
this.OnPlanEndDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealStartDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> RealStartDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RealStartDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RealStartDate != value))
|
||||
{
|
||||
this.OnRealStartDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RealStartDate = value;
|
||||
this.SendPropertyChanged("RealStartDate");
|
||||
this.OnRealStartDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealEndDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> RealEndDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RealEndDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._RealEndDate != value))
|
||||
{
|
||||
this.OnRealEndDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RealEndDate = value;
|
||||
this.SendPropertyChanged("RealEndDate");
|
||||
this.OnRealEndDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Unit", DbType="NVarChar(50)")]
|
||||
public string Unit
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Unit;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Unit != value))
|
||||
{
|
||||
this.OnUnitChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Unit = value;
|
||||
this.SendPropertyChanged("Unit");
|
||||
this.OnUnitChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsMileStone", DbType="Bit")]
|
||||
public System.Nullable<bool> IsMileStone
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._IsMileStone;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._IsMileStone != value))
|
||||
{
|
||||
this.OnIsMileStoneChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._IsMileStone = value;
|
||||
this.SendPropertyChanged("IsMileStone");
|
||||
this.OnIsMileStoneChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_ControlItemAndCycle_WBS_ControlItemAndCycle", Storage="_WBS_ControlItemAndCycle", ThisKey="WorkPackageId", OtherKey="WorkPackageId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<WBS_ControlItemAndCycle> WBS_ControlItemAndCycle
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue