diff --git a/DataBase/版本日志/SGGLDB_V2023-09-11.sql b/DataBase/版本日志/SGGLDB_V2023-09-11.sql
new file mode 100644
index 00000000..b3fd4f62
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-09-11.sql
@@ -0,0 +1,219 @@
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','ʩ±','PZHGL/InformationProject/ConstructionMonthReport.aspx',95,'0','Menu_PZHGL',0,1,1)
+GO
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('AFEBD968-295E-4E43-8D86-508B1E0B784B','F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','',1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('C6A2DA3D-163C-4FA5-8EF1-67F07CB72429','F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','',2)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('143704FE-D865-42A4-ABA6-EAB87466AA51','F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','ɾ',3)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('833F9250-7646-4C1B-97AA-70511DD04C31','F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','',4)
+GO
+
+
+CREATE TABLE [dbo].[ZHGL_ConstructionMonthReport](
+ [ConstructionMonthReportId] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [Month] [datetime] NULL,
+ [OwnerName] [nvarchar](100) NULL,
+ [ContractScope] [nvarchar](1000) NULL,
+ [ContractPriceAndPricingModel] [nvarchar](300) NULL,
+ [ContractStartDate] [datetime] NULL,
+ [ContractEndDate] [datetime] NULL,
+ [MainConstructionActivities] [nvarchar](3000) NULL,
+ [ProgressDeviationAndCauseAnalysis] [nvarchar](3000) NULL,
+ [KeyDeviationAndCauseAnalysis] [nvarchar](3000) NULL,
+ [TargetedCorrectiveMeasures] [nvarchar](3000) NULL,
+ [NextMonthWork] [nvarchar](3000) NULL,
+ [NeedCoordinateMatter] [nvarchar](3000) NULL,
+ [CompileMan] [nvarchar](50) NULL,
+ [CompileDate] [datetime] NULL,
+ CONSTRAINT [PK_ZHGL_ConstructionMonthReport] PRIMARY KEY CLUSTERED
+(
+ [ConstructionMonthReportId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReport] WITH CHECK ADD CONSTRAINT [FK_ZHGL_ConstructionMonthReport_Base_Project] FOREIGN KEY([ProjectId])
+REFERENCES [dbo].[Base_Project] ([ProjectId])
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReport] CHECK CONSTRAINT [FK_ZHGL_ConstructionMonthReport_Base_Project]
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReport] WITH CHECK ADD CONSTRAINT [FK_ZHGL_ConstructionMonthReport_Person_Persons] FOREIGN KEY([CompileMan])
+REFERENCES [dbo].[Person_Persons] ([PersonId])
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReport] CHECK CONSTRAINT [FK_ZHGL_ConstructionMonthReport_Person_Persons]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'ConstructionMonthReportId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'ProjectId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'±·' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'Month'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'OwnerName'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬΧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'ContractScope'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬ۸ͼƼģʽ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'ContractPriceAndPricingModel'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'ContractStartDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬʩ깤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'ContractEndDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩƫԭ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'ProgressDeviationAndCauseAnalysis'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ؼ·ƫԭ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'KeyDeviationAndCauseAnalysis'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ծƫʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'TargetedCorrectiveMeasures'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩҪ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'NextMonthWork'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Э' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'NeedCoordinateMatter'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'CompileMan'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport', @level2type=N'COLUMN',@level2name=N'CompileDate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩ±' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReport'
+GO
+
+
+
+CREATE TABLE [dbo].[ZHGL_ConstructionMonthReportMainCost](
+ [ConstructionMonthReportMainCostId] [nvarchar](50) NOT NULL,
+ [ConstructionMonthReportId] [nvarchar](50) NULL,
+ [ContractConstructionCost] [decimal](18, 4) NULL,
+ [ThisRequestCost] [decimal](18, 4) NULL,
+ [TotalRequestCost] [decimal](18, 4) NULL,
+ [ThisCollection] [decimal](18, 4) NULL,
+ [TotalCollection] [decimal](18, 4) NULL,
+ [TotalCollectionRate] [decimal](9, 2) NULL,
+ CONSTRAINT [PK_ZHGL_ConstructionMonthReportMainCost] PRIMARY KEY CLUSTERED
+(
+ [ConstructionMonthReportMainCostId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReportMainCost] WITH CHECK ADD CONSTRAINT [FK_ZHGL_ConstructionMonthReportMainCost_ZHGL_ConstructionMonthReport] FOREIGN KEY([ConstructionMonthReportId])
+REFERENCES [dbo].[ZHGL_ConstructionMonthReport] ([ConstructionMonthReportId])
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReportMainCost] CHECK CONSTRAINT [FK_ZHGL_ConstructionMonthReportMainCost_ZHGL_ConstructionMonthReport]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportMainCost', @level2type=N'COLUMN',@level2name=N'ConstructionMonthReportMainCostId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportMainCost', @level2type=N'COLUMN',@level2name=N'ConstructionMonthReportId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportMainCost', @level2type=N'COLUMN',@level2name=N'ContractConstructionCost'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportMainCost', @level2type=N'COLUMN',@level2name=N'ThisRequestCost'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportMainCost', @level2type=N'COLUMN',@level2name=N'TotalRequestCost'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'տ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportMainCost', @level2type=N'COLUMN',@level2name=N'ThisCollection'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼտ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportMainCost', @level2type=N'COLUMN',@level2name=N'TotalCollection'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼտٷֱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportMainCost', @level2type=N'COLUMN',@level2name=N'TotalCollectionRate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܰʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportMainCost'
+GO
+
+
+
+CREATE TABLE [dbo].[ZHGL_ConstructionMonthReportSubCost](
+ [ConstructionMonthReportSubCostId] [nvarchar](50) NOT NULL,
+ [ConstructionMonthReportId] [nvarchar](50) NULL,
+ [UnitId] [nvarchar](50) NULL,
+ [ContractAmount] [decimal](18, 4) NULL,
+ [ThisNeedPay] [decimal](18, 4) NULL,
+ [ThisRealPay] [decimal](18, 4) NULL,
+ [TotalNeedPay] [decimal](18, 4) NULL,
+ [TotalRealPay] [decimal](18, 4) NULL,
+ [TotalRealPayRate] [decimal](9, 2) NULL,
+ CONSTRAINT [PK_ZHGL_ConstructionMonthReportSubCost] PRIMARY KEY CLUSTERED
+(
+ [ConstructionMonthReportSubCostId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReportSubCost] WITH CHECK ADD CONSTRAINT [FK_ZHGL_ConstructionMonthReportSubCost_Base_Unit] FOREIGN KEY([UnitId])
+REFERENCES [dbo].[Base_Unit] ([UnitId])
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReportSubCost] CHECK CONSTRAINT [FK_ZHGL_ConstructionMonthReportSubCost_Base_Unit]
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReportSubCost] WITH CHECK ADD CONSTRAINT [FK_ZHGL_ConstructionMonthReportSubCost_ZHGL_ConstructionMonthReport] FOREIGN KEY([ConstructionMonthReportId])
+REFERENCES [dbo].[ZHGL_ConstructionMonthReport] ([ConstructionMonthReportId])
+GO
+
+ALTER TABLE [dbo].[ZHGL_ConstructionMonthReportSubCost] CHECK CONSTRAINT [FK_ZHGL_ConstructionMonthReportSubCost_ZHGL_ConstructionMonthReport]
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost', @level2type=N'COLUMN',@level2name=N'ConstructionMonthReportSubCostId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost', @level2type=N'COLUMN',@level2name=N'ConstructionMonthReportId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩλId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost', @level2type=N'COLUMN',@level2name=N'UnitId'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͬ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost', @level2type=N'COLUMN',@level2name=N'ContractAmount'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ӧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost', @level2type=N'COLUMN',@level2name=N'ThisNeedPay'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost', @level2type=N'COLUMN',@level2name=N'ThisRealPay'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼӦ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost', @level2type=N'COLUMN',@level2name=N'TotalNeedPay'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼʵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost', @level2type=N'COLUMN',@level2name=N'TotalRealPay'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۼƸٷֱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost', @level2type=N'COLUMN',@level2name=N'TotalRealPayRate'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ְʩ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'ZHGL_ConstructionMonthReportSubCost'
+GO
+
+
diff --git a/DataBase/菜单初始化脚本/1-8综合管理(Menu_PZHGL).sql b/DataBase/菜单初始化脚本/1-8综合管理(Menu_PZHGL).sql
index ca3dd16e..6f39a0ab 100644
--- a/DataBase/菜单初始化脚本/1-8综合管理(Menu_PZHGL).sql
+++ b/DataBase/菜单初始化脚本/1-8综合管理(Menu_PZHGL).sql
@@ -121,6 +121,19 @@ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('EB1E4B30-66E6-45E2-B8D8-8D8382E97E15','3A9039B2-20DC-47FA-A943-E3604FBBF699','保存',4)
GO
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','施工月报','PZHGL/InformationProject/ConstructionMonthReport.aspx',95,'0','Menu_PZHGL',0,1,1)
+GO
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('AFEBD968-295E-4E43-8D86-508B1E0B784B','F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','增加',1)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('C6A2DA3D-163C-4FA5-8EF1-67F07CB72429','F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','修改',2)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('143704FE-D865-42A4-ABA6-EAB87466AA51','F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','删除',3)
+INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+VALUES('833F9250-7646-4C1B-97AA-70511DD04C31','F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F','保存',4)
+GO
+
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('25AC041E-0B27-4D7C-860B-1A06518B6673','文件柜','',100,'0','Menu_PZHGL',0,0,1)
GO
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 6037c38e..54c8d3bc 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -693,6 +693,9 @@
+
+
+
diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs
index 9531c37d..577c1fbf 100644
--- a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs
+++ b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs
@@ -776,5 +776,245 @@ namespace BLL
}
}
#endregion
+
+ ///
+ /// 获取模拟树表格
+ ///
+ ///
+ public static DataTable GetAllTreeDataTableConstructionMonthReport(string projectId, string IsOut, DateTime startTime, DateTime endTime)
+ {
+ using (var db = new Model.SGGLDB(Funs.ConnString))
+ {
+ IQueryable workPackages = from x in db.WBS_WorkPackage where x.ProjectId == projectId select x;
+ IQueryable unitWorks = from x in db.WBS_UnitWork where x.ProjectId == projectId select x;
+ IQueryable getDetails = from x in db.View_WBS_WorkPackageDetail where x.ProjectId == projectId select x;
+ List getWBSs = (from x in db.View_WBS where x.ProjectId == projectId select x).ToList();
+ List WBSList = new List();
+ DateTime startDate, endDate, startMonth, endMonth;
+ List months = new List();
+ var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == projectId);
+ if (project.StartDate != null)
+ {
+ startDate = Convert.ToDateTime(project.StartDate);
+ endDate = DateTime.Now;
+ if (project.EndDate != null)
+ {
+ endDate = Convert.ToDateTime(project.EndDate);
+ }
+ startMonth = Convert.ToDateTime(startDate.Year + "-" + startDate.Month + "-01");
+ endMonth = Convert.ToDateTime(endDate.Year + "-" + endDate.Month + "-01");
+ do
+ {
+ months.Add(startMonth);
+ startMonth = startMonth.AddMonths(1);
+ } while (startMonth <= endMonth);
+ }
+ 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("JDWeights", 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)));
+ table.Columns.Add(new DataColumn("PlanCost", typeof(String)));
+ table.Columns.Add(new DataColumn("PreWorkCode", typeof(String)));
+ table.Columns.Add(new DataColumn("Code", typeof(String)));
+ for (int i = 0; i < months.Count; i++)
+ {
+ table.Columns.Add(new DataColumn("PlanNum" + (i + 1).ToString(), typeof(String)));
+ table.Columns.Add(new DataColumn("ThisNum" + (i + 1).ToString(), typeof(String)));
+ }
+ if (getWBSs.Count() > 0)
+ {
+ List newList = new List();
+ var projectTypes = getWBSs.Where(x => x.WBSType == "ProjectType" && x.SupId == "0");
+ int a = 1;
+ foreach (var item in projectTypes)
+ {
+ item.Code = a.ToString();
+ newList.Add(item);
+ if (string.IsNullOrEmpty(IsOut))
+ {
+ AddDetail2(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime);
+ }
+ else
+ {
+ AddDetail2(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime);
+ }
+ a++;
+ }
+ 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;
+ var workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == item.Id);
+ if (workPackage != null)
+ {
+ if (childWorkPackages.Count() == 0)
+ {
+ row[5] = item.Id;
+ if (workPackage.JDWeights != null)
+ {
+ row[6] = decimal.Round(Convert.ToDecimal(workPackage.JDWeights), 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;
+ }
+ if (workPackage.PlanCost != null)
+ {
+ row[15] = decimal.Round(Convert.ToDecimal(workPackage.PlanCost), 2);
+ }
+ row[16] = workPackage.PreWorkCode;
+ var details = getDetails.Where(x => x.WorkPackageId == item.Id).ToList();
+ foreach (var item1 in details)
+ {
+ var index = months.FindIndex(x => x.Equals(item1.Months));
+ if (item1.PlanNum != 0)
+ {
+ row[18 + index * 2] = decimal.Round(Convert.ToDecimal(item1.PlanNum), 2);
+ }
+ if (item1.ThisNum != 0)
+ {
+ row[19 + index * 2] = decimal.Round(Convert.ToDecimal(item1.ThisNum), 2);
+ }
+ }
+ }
+ else
+ {
+ if (workPackage.JDWeights != null)
+ {
+ row[6] = decimal.Round(Convert.ToDecimal(workPackage.JDWeights), 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.PlanCost != null)
+ {
+ row[15] = decimal.Round(Convert.ToDecimal(workPackage.PlanCost), 2);
+ }
+ }
+ }
+ }
+ else if (item.WBSType == "UnitWork")
+ {
+ var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == item.Id);
+ if (unitWork != null)
+ {
+ if (unitWork.JDWeights != null)
+ {
+ row[6] = decimal.Round(Convert.ToDecimal(unitWork.JDWeights), 2);
+ }
+ 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;
+ }
+ if (unitWork.PlanCost != null)
+ {
+ row[15] = decimal.Round(Convert.ToDecimal(unitWork.PlanCost), 2);
+ }
+ }
+ }
+ row[17] = item.Code;
+ table.Rows.Add(row);
+ }
+ }
+ return table;
+ }
+ }
+
+ private static void AddDetail2(List newList, List oldList, string id, string preCode, DateTime startTime, DateTime endTime)
+ {
+ var items = oldList.Where(x => x.SupId == id && x.PlanEndDate > startTime && x.PlanEndDate <= endTime).OrderBy(x => x.WBSCode);
+ int b = 1;
+ foreach (var item in items)
+ {
+ item.Code = preCode + "." + b.ToString();
+ newList.Add(item);
+ AddDetail2(newList, oldList, item.Id, item.Code, startTime, endTime);
+ b++;
+ }
+ }
+
+ private static void AddDetail2(List newList, List oldList, string id, string preCode, string prefix, DateTime startTime, DateTime endTime)
+ {
+ var items = oldList.Where(x => x.SupId == id && x.PlanEndDate > startTime && x.PlanEndDate <= endTime).OrderBy(x => x.WBSCode);
+ int b = 1;
+ foreach (var item in items)
+ {
+ item.Code = preCode + "." + b.ToString();
+ item.Name = prefix + "...." + item.Name;
+ newList.Add(item);
+ AddDetail2(newList, oldList, item.Id, item.Code, prefix + "....", startTime, endTime);
+ b++;
+ }
+ }
}
}
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 7dbcf11f..fe03fd93 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -4471,6 +4471,10 @@ namespace BLL
///
public const string CheckMonthTemplateUrl = "File\\Word\\CQMS\\Check\\质量月报.doc";
///
+ /// 施工月报的虚拟路径
+ ///
+ public const string ConstructionMonthReportTemplateUrl = "File\\Word\\ZHGL\\施工月报.doc";
+ ///
/// 设计变更的虚拟路径
///
public const string DesignTemplateUrl = "File\\Word\\CQMS\\Check\\设计变更.doc";
@@ -4526,6 +4530,11 @@ namespace BLL
/// 项目级施工日志
///
public const string WorkHandoverMenuId = "CD88CE2A-A8E2-4F07-9A90-9161BD1C345C";
+
+ ///
+ /// 施工月报
+ ///
+ public const string ConstructionMonthReportMenuId = "F50EDEF0-FCDE-4B84-8D30-1F16E03FE26F";
#endregion
#region 施工综合流程定义
diff --git a/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportMainCostService.cs b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportMainCostService.cs
new file mode 100644
index 00000000..5a5743a5
--- /dev/null
+++ b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportMainCostService.cs
@@ -0,0 +1,69 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace BLL
+{
+ public class ConstructionMonthReportMainCostService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 获取施工月报总包工程施工请款情况模板列表
+ ///
+ ///
+ ///
+ ///
+ public static List getListData(string ConstructionMonthReportId)
+ {
+ return (from x in Funs.DB.ZHGL_ConstructionMonthReportMainCost
+ where x.ConstructionMonthReportId == ConstructionMonthReportId
+ select x).ToList();
+ }
+
+ ///
+ /// 增加施工月报总包工程施工请款情况
+ ///
+ /// 施工月报总包工程施工请款情况实体
+ public static void AddConstructionMonthReportMainCost(Model.ZHGL_ConstructionMonthReportMainCost ConstructionMonthReportMainCost)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.ZHGL_ConstructionMonthReportMainCost newApprove = new Model.ZHGL_ConstructionMonthReportMainCost();
+ newApprove.ConstructionMonthReportMainCostId = ConstructionMonthReportMainCost.ConstructionMonthReportMainCostId;
+ newApprove.ConstructionMonthReportId = ConstructionMonthReportMainCost.ConstructionMonthReportId;
+ newApprove.ContractConstructionCost = ConstructionMonthReportMainCost.ContractConstructionCost;
+ newApprove.ThisRequestCost = ConstructionMonthReportMainCost.ThisRequestCost;
+ newApprove.TotalRequestCost = ConstructionMonthReportMainCost.TotalRequestCost;
+ newApprove.ThisCollection = ConstructionMonthReportMainCost.ThisCollection;
+ newApprove.TotalCollection = ConstructionMonthReportMainCost.TotalCollection;
+ newApprove.TotalCollectionRate = ConstructionMonthReportMainCost.TotalCollectionRate;
+
+ db.ZHGL_ConstructionMonthReportMainCost.InsertOnSubmit(newApprove);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 根据月报id删除对应的所有施工月报总包工程施工请款情况
+ ///
+ /// 施工月报总包工程施工请款情况编号
+ public static void DeleteConstructionMonthReportMainCostsByConstructionMonthReportId(string ConstructionMonthReportId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var q = (from x in db.ZHGL_ConstructionMonthReportMainCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
+ if (q.Count() > 0)
+ {
+ db.ZHGL_ConstructionMonthReportMainCost.DeleteAllOnSubmit(q);
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据月报id获取对应的所有施工月报总包工程施工请款情况
+ ///
+ /// 施工月报总包工程施工请款情况编号
+ public static List GetConstructionMonthReportMainCostsByConstructionMonthReportId(string ConstructionMonthReportId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ return (from x in db.ZHGL_ConstructionMonthReportMainCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportService.cs b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportService.cs
new file mode 100644
index 00000000..89733cb7
--- /dev/null
+++ b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportService.cs
@@ -0,0 +1,95 @@
+using System;
+using System.Collections;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace BLL
+{
+ public class ConstructionMonthReportService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 添加施工月报
+ ///
+ ///
+ public static void AddConstructionMonthReport(Model.ZHGL_ConstructionMonthReport ConstructionMonthReport)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.ZHGL_ConstructionMonthReport newConstructionMonthReport = new Model.ZHGL_ConstructionMonthReport();
+ newConstructionMonthReport.ConstructionMonthReportId = ConstructionMonthReport.ConstructionMonthReportId;
+ newConstructionMonthReport.ProjectId = ConstructionMonthReport.ProjectId;
+ newConstructionMonthReport.Month = ConstructionMonthReport.Month;
+ newConstructionMonthReport.OwnerName = ConstructionMonthReport.OwnerName;
+ newConstructionMonthReport.ContractScope = ConstructionMonthReport.ContractScope;
+ newConstructionMonthReport.ContractPriceAndPricingModel = ConstructionMonthReport.ContractPriceAndPricingModel;
+ newConstructionMonthReport.ContractStartDate = ConstructionMonthReport.ContractStartDate;
+ newConstructionMonthReport.ContractEndDate = ConstructionMonthReport.ContractEndDate;
+ newConstructionMonthReport.MainConstructionActivities = ConstructionMonthReport.MainConstructionActivities;
+ newConstructionMonthReport.ProgressDeviationAndCauseAnalysis = ConstructionMonthReport.ProgressDeviationAndCauseAnalysis;
+ newConstructionMonthReport.KeyDeviationAndCauseAnalysis = ConstructionMonthReport.KeyDeviationAndCauseAnalysis;
+ newConstructionMonthReport.TargetedCorrectiveMeasures = ConstructionMonthReport.TargetedCorrectiveMeasures;
+ newConstructionMonthReport.NextMonthWork = ConstructionMonthReport.NextMonthWork;
+ newConstructionMonthReport.NeedCoordinateMatter = ConstructionMonthReport.NeedCoordinateMatter;
+ newConstructionMonthReport.CompileMan = ConstructionMonthReport.CompileMan;
+ newConstructionMonthReport.CompileDate = ConstructionMonthReport.CompileDate;
+
+ db.ZHGL_ConstructionMonthReport.InsertOnSubmit(newConstructionMonthReport);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 修改施工月报
+ ///
+ ///
+ public static void UpdateConstructionMonthReport(Model.ZHGL_ConstructionMonthReport ConstructionMonthReport)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.ZHGL_ConstructionMonthReport newConstructionMonthReport = db.ZHGL_ConstructionMonthReport.First(e => e.ConstructionMonthReportId == ConstructionMonthReport.ConstructionMonthReportId);
+ newConstructionMonthReport.OwnerName = ConstructionMonthReport.OwnerName;
+ newConstructionMonthReport.ContractScope = ConstructionMonthReport.ContractScope;
+ newConstructionMonthReport.ContractPriceAndPricingModel = ConstructionMonthReport.ContractPriceAndPricingModel;
+ newConstructionMonthReport.ContractStartDate = ConstructionMonthReport.ContractStartDate;
+ newConstructionMonthReport.ContractEndDate = ConstructionMonthReport.ContractEndDate;
+ newConstructionMonthReport.MainConstructionActivities = ConstructionMonthReport.MainConstructionActivities;
+ newConstructionMonthReport.ProgressDeviationAndCauseAnalysis = ConstructionMonthReport.ProgressDeviationAndCauseAnalysis;
+ newConstructionMonthReport.KeyDeviationAndCauseAnalysis = ConstructionMonthReport.KeyDeviationAndCauseAnalysis;
+ newConstructionMonthReport.TargetedCorrectiveMeasures = ConstructionMonthReport.TargetedCorrectiveMeasures;
+ newConstructionMonthReport.NextMonthWork = ConstructionMonthReport.NextMonthWork;
+ newConstructionMonthReport.NeedCoordinateMatter = ConstructionMonthReport.NeedCoordinateMatter;
+
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 根据施工月报Id删除一个施工月报信息
+ ///
+ ///
+ public static void DeleteConstructionMonthReport(string ConstructionMonthReportId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.ZHGL_ConstructionMonthReport ConstructionMonthReport = db.ZHGL_ConstructionMonthReport.First(e => e.ConstructionMonthReportId == ConstructionMonthReportId);
+ db.ZHGL_ConstructionMonthReport.DeleteOnSubmit(ConstructionMonthReport);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 根据施工月报Id获取一个施工月报信息
+ ///
+ ///
+ public static Model.ZHGL_ConstructionMonthReport GetConstructionMonthReport(string ConstructionMonthReportId)
+ {
+ return Funs.DB.ZHGL_ConstructionMonthReport.FirstOrDefault(e => e.ConstructionMonthReportId == ConstructionMonthReportId);
+ }
+
+ ///
+ /// 根据月份获取一个施工月报信息
+ ///
+ /// 月份
+ public static Model.ZHGL_ConstructionMonthReport GetConstructionMonthReportByMonth(DateTime month, string projectId)
+ {
+ return Funs.DB.ZHGL_ConstructionMonthReport.FirstOrDefault(e => e.Month == month && e.ProjectId == projectId);
+ }
+ }
+}
diff --git a/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportSubCostService.cs b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportSubCostService.cs
new file mode 100644
index 00000000..df6fa798
--- /dev/null
+++ b/SGGL/BLL/ZHGL/ConstructionMonthReport/ConstructionMonthReportSubCostService.cs
@@ -0,0 +1,72 @@
+using System.Collections.Generic;
+using System.Linq;
+
+namespace BLL
+{
+ public class ConstructionMonthReportSubCostService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 获取施工月报分包工程施工付款情况模板列表
+ ///
+ ///
+ ///
+ ///
+ public static List getListData(string ConstructionMonthReportId)
+ {
+ return (from x in Funs.DB.ZHGL_ConstructionMonthReportSubCost
+ join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
+ where x.ConstructionMonthReportId == ConstructionMonthReportId
+ orderby y.UnitCode
+ select x).ToList();
+ }
+
+ ///
+ /// 增加施工月报分包工程施工付款情况
+ ///
+ /// 施工月报分包工程施工付款情况实体
+ public static void AddConstructionMonthReportSubCost(Model.ZHGL_ConstructionMonthReportSubCost ConstructionMonthReportSubCost)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.ZHGL_ConstructionMonthReportSubCost newApprove = new Model.ZHGL_ConstructionMonthReportSubCost();
+ newApprove.ConstructionMonthReportSubCostId = ConstructionMonthReportSubCost.ConstructionMonthReportSubCostId;
+ newApprove.ConstructionMonthReportId = ConstructionMonthReportSubCost.ConstructionMonthReportId;
+ newApprove.UnitId = ConstructionMonthReportSubCost.UnitId;
+ newApprove.ContractAmount = ConstructionMonthReportSubCost.ContractAmount;
+ newApprove.ThisNeedPay = ConstructionMonthReportSubCost.ThisNeedPay;
+ newApprove.ThisRealPay = ConstructionMonthReportSubCost.ThisRealPay;
+ newApprove.TotalNeedPay = ConstructionMonthReportSubCost.TotalNeedPay;
+ newApprove.TotalRealPay = ConstructionMonthReportSubCost.TotalRealPay;
+ newApprove.TotalRealPayRate = ConstructionMonthReportSubCost.TotalRealPayRate;
+
+ db.ZHGL_ConstructionMonthReportSubCost.InsertOnSubmit(newApprove);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 根据月报id删除对应的所有施工月报分包工程施工付款情况
+ ///
+ /// 施工月报分包工程施工付款情况编号
+ public static void DeleteConstructionMonthReportSubCostsByConstructionMonthReportId(string ConstructionMonthReportId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ var q = (from x in db.ZHGL_ConstructionMonthReportSubCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
+ if (q.Count() > 0)
+ {
+ db.ZHGL_ConstructionMonthReportSubCost.DeleteAllOnSubmit(q);
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据月报id获取对应的所有施工月报分包工程施工付款情况
+ ///
+ /// 施工月报分包工程施工付款情况编号
+ public static List GetConstructionMonthReportSubCostsByConstructionMonthReportId(string ConstructionMonthReportId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ return (from x in db.ZHGL_ConstructionMonthReportSubCost where x.ConstructionMonthReportId == ConstructionMonthReportId select x).ToList();
+ }
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index b4222019..e69de29b 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -1,42 +0,0 @@
-
-错误信息开始=====>
-错误类型:NullReferenceException
-错误信息:未将对象引用设置到对象的实例。
-错误堆栈:
- 在 FineUIPro.Web.index.MenuSwitchMethod(String type) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\index.aspx.cs:行号 417
- 在 FineUIPro.Web.index.btnPerson_Click(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\index.aspx.cs:行号 467
- 在 FineUIPro.Button.OnClick(EventArgs e)
- 在 (Button , EventArgs )
- 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
- 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
- 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
- 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
-出错时间:09/03/2023 11:44:42
-出错文件:http://localhost:8797/index.aspx
-IP地址:::1
-
-出错时间:09/03/2023 11:44:42
-
-
-错误信息开始=====>
-错误类型:ChangeConflictException
-错误信息:2 的 1 更新失败。
-错误堆栈:
- 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode)
- 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode)
- 在 System.Data.Linq.DataContext.SubmitChanges()
- 在 BLL.PhtglContractTrackService.UpdatePHTGL_ContractTrack(PHTGL_ContractTrack newtable) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\PHTGL\ContractCompile\PhtglContracttrackService .cs:行号 200
- 在 FineUIPro.Web.PHTGL.ContractCompile.ContractTrackList.btnSave_OnClick(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\PHTGL\ContractCompile\ContractTrackList.aspx.cs:行号 371
- 在 FineUIPro.Button.OnClick(EventArgs e)
- 在 (Button , EventArgs )
- 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
- 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
- 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
- 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
-出错时间:09/04/2023 10:22:11
-出错文件:http://localhost:8797/PHTGL/ContractCompile/ContractTrackList.aspx
-IP地址:::1
-操作人员:JT
-
-出错时间:09/04/2023 10:22:11
-
diff --git a/SGGL/FineUIPro.Web/File/Word/ZHGL/施工月报.doc b/SGGL/FineUIPro.Web/File/Word/ZHGL/施工月报.doc
new file mode 100644
index 00000000..8933ff78
Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Word/ZHGL/施工月报.doc differ
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 40fcdd75..aea91ac7 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1310,6 +1310,8 @@
+
+
@@ -12722,6 +12724,20 @@
ConstructionLogView.aspx
+
+ ConstructionMonthReport.aspx
+ ASPXCodeBehind
+
+
+ ConstructionMonthReport.aspx
+
+
+ ConstructionMonthReportEdit.aspx
+ ASPXCodeBehind
+
+
+ ConstructionMonthReportEdit.aspx
+
ConstructionPlan.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx
new file mode 100644
index 00000000..6e80f521
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx
@@ -0,0 +1,102 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConstructionMonthReport.aspx.cs" Inherits="FineUIPro.Web.PZHGL.InformationProject.ConstructionMonthReport" %>
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.cs
new file mode 100644
index 00000000..6c288139
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.cs
@@ -0,0 +1,975 @@
+using Aspose.Words;
+using BLL;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.IO;
+using System.Linq;
+
+namespace FineUIPro.Web.PZHGL.InformationProject
+{
+ public partial class ConstructionMonthReport : PageBase
+ {
+ ///
+ /// 项目id
+ ///
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.ProjectId = this.CurrUser.LoginProjectId;
+ GetButtonPower();
+ BindGrid();
+ }
+ }
+ #region 绑定数据
+ ///
+ /// 绑定数据
+ ///
+ public void BindGrid()
+ {
+ DataTable tb = ChecklistData();
+ Grid1.RecordCount = tb.Rows.Count;
+ tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ protected DataTable ChecklistData()
+ {
+ string strSql = @"select C.ConstructionMonthReportId,C.ProjectId,C.Month,C.CompileDate,C.CompileMan, U.PersonName from ZHGL_ConstructionMonthReport C left join Person_Persons U on U.PersonId = C.CompileMan where 1=1";
+
+ List listStr = new List();
+ strSql += " AND C.ProjectId = @ProjectId";
+ listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ return tb;
+ }
+ #endregion
+ #region 操作数据
+ ///
+ /// 添加
+ ///
+ ///
+ ///
+ protected void btnNew_Click(object sender, EventArgs e)
+ {
+ if (BLL.CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ConstructionMonthReportMenuId, BLL.Const.BtnAdd))
+ {
+ if (!string.IsNullOrEmpty(this.txtMonth.Text.Trim()))
+ {
+ string Month = txtMonth.Text.Trim() + "-01";
+ if (BLL.ConstructionMonthReportService.GetConstructionMonthReportByMonth(Convert.ToDateTime(Month), this.CurrUser.LoginProjectId) == null)
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConstructionMonthReportEdit.aspx?Month={0}", Month, "添加 - ")));
+ }
+ else
+ {
+ Alert.ShowInTop("该月份月报已存在!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ Alert.ShowInTop("请选择月份!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ }
+ }
+ //右键编辑
+ protected void btnMenuModify_Click(object sender, EventArgs e)
+ {
+ if (BLL.CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ConstructionMonthReportMenuId, BLL.Const.BtnModify))
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
+ return;
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConstructionMonthReportEdit.aspx?ConstructionMonthReportId={0}", Grid1.SelectedRowID, "编辑 - ")));
+ }
+ }
+ //双击编辑
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ if (BLL.CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ConstructionMonthReportMenuId, BLL.Const.BtnModify))
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
+ return;
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConstructionMonthReportEdit.aspx?ConstructionMonthReportId={0}", Grid1.SelectedRowID, "编辑 - ")));
+ }
+ }
+ //查看
+ protected void btnMenuView_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
+ return;
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConstructionMonthReportEdit.aspx?see=see&ConstructionMonthReportId={0}", Grid1.SelectedRowID, "查看 - ")));
+ }
+
+ protected void btnMenuDel_Click(object sender, EventArgs e)
+ {
+ if (BLL.CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ConstructionMonthReportMenuId, BLL.Const.BtnDelete))
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ BLL.ConstructionMonthReportMainCostService.DeleteConstructionMonthReportMainCostsByConstructionMonthReportId(rowID);
+ BLL.ConstructionMonthReportSubCostService.DeleteConstructionMonthReportSubCostsByConstructionMonthReportId(rowID);
+ BLL.ConstructionMonthReportService.DeleteConstructionMonthReport(rowID);
+ }
+
+ BindGrid();
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+ else
+ {
+ Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ }
+
+ }
+ ///
+ /// 编辑数据方法
+ ///
+ private void EditData()
+ {
+
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
+ return;
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ConstructionMonthReportEdit.aspx?ConstructionMonthReportId={0}", Grid1.SelectedRowID, "编辑 - ")));
+
+ }
+ #endregion
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.PersonId, BLL.Const.ConstructionMonthReportMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuModify.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnMenuDel.Hidden = false;
+ }
+ }
+ }
+
+ #endregion
+
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+
+ protected void btnPrinter_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ string ConstructionMonthReportId = this.Grid1.SelectedRowID;
+ string rootPath = Server.MapPath("~/");
+ string initTemplatePath = string.Empty;
+ string uploadfilepath = string.Empty;
+ string newUrl = string.Empty;
+ Model.ZHGL_ConstructionMonthReport monthReport = ConstructionMonthReportService.GetConstructionMonthReport(ConstructionMonthReportId);
+ Model.Project_Sys_Set CheckMonthStartDay = BLL.Project_SysSetService.GetSysSetBySetName("月报开始日期", this.CurrUser.LoginProjectId);
+ Model.Project_Sys_Set CheckMonthEndDay = BLL.Project_SysSetService.GetSysSetBySetName("月报结束日期", this.CurrUser.LoginProjectId);
+ DateTime startTime = Convert.ToDateTime(monthReport.Month.Value.AddMonths(-1).Year.ToString() + "-" + monthReport.Month.Value.AddMonths(-1).Month.ToString() + "-25");
+ DateTime endTime = startTime.AddMonths(1);
+ if (CheckMonthStartDay != null)
+ {
+ if (CheckMonthStartDay.SetValue != "")
+ {
+ if (CheckMonthEndDay != null)
+ {
+ if (CheckMonthEndDay.SetValue != "")
+ {
+ startTime = Convert.ToDateTime(monthReport.Month.Value.AddMonths(-1).Year.ToString() + "-" + monthReport.Month.Value.AddMonths(-1).Month.ToString() + "-" + CheckMonthStartDay.SetValue);
+ endTime = Convert.ToDateTime(monthReport.Month.Value.AddMonths(-1).Year.ToString() + "-" + monthReport.Month.Value.Month.ToString() + "-" + CheckMonthEndDay.SetValue);
+ }
+ else
+ {
+ startTime = Convert.ToDateTime(monthReport.Month.Value.AddMonths(-1).Year.ToString() + "-" + monthReport.Month.Value.AddMonths(-1).Month.ToString() + "-" + CheckMonthStartDay.SetValue);
+ endTime = startTime.AddMonths(1);
+ }
+
+ }
+ else
+ {
+ startTime = Convert.ToDateTime(monthReport.Month.Value.AddMonths(-1).Year.ToString() + "-" + monthReport.Month.Value.AddMonths(-1).Month.ToString() + "-" + CheckMonthStartDay.SetValue);
+ endTime = startTime.AddMonths(1);
+ }
+
+ }
+ else
+ {
+ if (CheckMonthEndDay != null)
+ {
+ if (CheckMonthEndDay.SetValue != "")
+ {
+ startTime = Convert.ToDateTime(monthReport.Month.Value.AddMonths(-1).Year.ToString() + "-" + monthReport.Month.Value.AddMonths(-1).Month.ToString() + "-" + CheckMonthEndDay.SetValue);
+ endTime = startTime.AddMonths(1);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (CheckMonthEndDay != null)
+ {
+ if (CheckMonthEndDay.SetValue != null)
+ {
+ startTime = Convert.ToDateTime(monthReport.Month.Value.AddMonths(-1).Year.ToString() + "-" + monthReport.Month.Value.AddMonths(-1).Month.ToString() + "-" + CheckMonthEndDay.SetValue);
+ endTime = startTime.AddMonths(1);
+ }
+ }
+ }
+
+ initTemplatePath = Const.ConstructionMonthReportTemplateUrl;
+ uploadfilepath = rootPath + initTemplatePath;
+ newUrl = uploadfilepath.Replace(".doc", "(" + string.Format("{0:yyyy-MM}", monthReport.Month) + ").doc");
+ File.Copy(uploadfilepath, newUrl);
+ //更新书签内容
+ Document doc = new Aspose.Words.Document(newUrl);
+ var project = ProjectService.GetProjectByProjectId(monthReport.ProjectId);
+ Bookmark bookmarkProjectName1 = doc.Range.Bookmarks["ProjectName1"];
+ if (bookmarkProjectName1 != null)
+ {
+ if (project != null)
+ {
+ bookmarkProjectName1.Text = project.ProjectName;
+ }
+ }
+ Bookmark bookmarkMag = doc.Range.Bookmarks["Mag"];
+ if (bookmarkMag != null)
+ {
+ bookmarkMag.Text = endTime.Year.ToString() + "年第" + endTime.Month.ToString() + "期";
+ }
+ Bookmark bookmarkTimeSpan = doc.Range.Bookmarks["TimeSpan"];
+ if (bookmarkTimeSpan != null)
+ {
+ bookmarkTimeSpan.Text = startTime.Year + "年" + startTime.Month + "月" + startTime.Day + "日" + "~" + endTime.Year + "年" + endTime.Month + "月" + endTime.Day + "日";
+ }
+ Bookmark bookmarkCompileMan = doc.Range.Bookmarks["CompileMan"];
+ if (bookmarkCompileMan != null)
+ {
+ bookmarkCompileMan.Text = Person_PersonsService.GetPersonsNameById(monthReport.CompileMan);
+ }
+ Bookmark bookmarkCompileDate = doc.Range.Bookmarks["CompileDate"];
+ if (bookmarkCompileDate != null)
+ {
+ if (monthReport.CompileDate != null)
+ {
+ bookmarkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", monthReport.CompileDate);
+ }
+ }
+ Bookmark bookmarkProjectName2 = doc.Range.Bookmarks["ProjectName2"];
+ if (bookmarkProjectName2 != null)
+ {
+ if (project != null)
+ {
+ bookmarkProjectName2.Text = project.ProjectName;
+ }
+ }
+ Bookmark bookmarkOwnerName = doc.Range.Bookmarks["OwnerName"];
+ if (bookmarkOwnerName != null)
+ {
+ bookmarkOwnerName.Text = monthReport.OwnerName ?? "";
+ }
+ Bookmark bookmarkContractScope = doc.Range.Bookmarks["ContractScope"];
+ if (bookmarkContractScope != null)
+ {
+ bookmarkContractScope.Text = monthReport.ContractScope ?? "";
+ }
+ Bookmark bookmarkContractPriceAndPricingModel = doc.Range.Bookmarks["ContractPriceAndPricingModel"];
+ if (bookmarkContractPriceAndPricingModel != null)
+ {
+ bookmarkContractPriceAndPricingModel.Text = monthReport.ContractPriceAndPricingModel ?? "";
+ }
+ Bookmark bookmarkStartEndTime = doc.Range.Bookmarks["StartEndTime"];
+ if (bookmarkStartEndTime != null)
+ {
+ string start = string.Empty, end = string.Empty;
+ if (monthReport.ContractStartDate != null)
+ {
+ start = string.Format("{0:yyyy-MM-dd}", monthReport.ContractStartDate);
+ }
+ if (monthReport.ContractEndDate != null)
+ {
+ end = string.Format("{0:yyyy-MM-dd}", monthReport.ContractEndDate);
+ }
+ bookmarkStartEndTime.Text = start + "/" + end;
+ }
+ Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc);
+ //本月进度完成情况
+ builder.MoveToBookmark("Table1");
+ builder.StartTable();
+ builder.CellFormat.Borders.LineStyle = LineStyle.Single;
+ builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
+ builder.Bold = false;
+ builder.RowFormat.Height = 20;
+ builder.Bold = false;
+ DataTable table = BLL.WorkPackageService.GetAllTreeDataTableConstructionMonthReport(this.CurrUser.LoginProjectId, string.Empty, startTime, endTime);
+ //序号
+ 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 = 60;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 200;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ builder.Write("实际完成时间");
+ builder.EndRow();
+ foreach (DataRow row in table.Rows)
+ {
+ //序号
+ 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 = 60;
+ builder.Write(row["Code"].ToString());
+ //工作内容
+ 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 = 200;
+ builder.Write(row["Name"].ToString());
+ //概算工程量
+ 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;
+ if (row["PlanProjectQuantity"] != System.DBNull.Value)
+ {
+ builder.Write(Funs.GetNewDecimalOrZero(row["PlanProjectQuantity"].ToString()).ToString("0.##"));
+ }
+ //计划开始时间
+ 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;
+ string planStartDate = string.Empty;
+ if (row["PlanStartDate"] != null)
+ {
+ planStartDate = string.Format("{0:yyyy-MM-dd}", row["PlanStartDate"]);
+ }
+ builder.Write(planStartDate);
+ //计划完成时间
+ 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;
+ string planEndDate = string.Empty;
+ if (row["PlanEndDate"] != null)
+ {
+ planEndDate = string.Format("{0:yyyy-MM-dd}", row["PlanEndDate"]);
+ }
+ builder.Write(planEndDate);
+ //实际开始时间
+ 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;
+ string realStartDate = string.Empty;
+ if (row["RealStartDate"] != null)
+ {
+ realStartDate = string.Format("{0:yyyy-MM-dd}", row["RealStartDate"]);
+ }
+ builder.Write(realStartDate);
+ //实际完成时间
+ 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;
+ string realEndDate = string.Empty;
+ if (row["RealEndDate"] != null)
+ {
+ realEndDate = string.Format("{0:yyyy-MM-dd}", row["RealEndDate"]);
+ }
+ builder.Write(realEndDate);
+ builder.EndRow();
+ }
+ builder.EndTable();
+ Bookmark bookmarkMainConstructionActivities = doc.Range.Bookmarks["MainConstructionActivities"];
+ if (bookmarkMainConstructionActivities != null)
+ {
+ bookmarkMainConstructionActivities.Text = monthReport.MainConstructionActivities ?? "";
+ }
+ Bookmark bookmarkProgressDeviationAndCauseAnalysis = doc.Range.Bookmarks["ProgressDeviationAndCauseAnalysis"];
+ if (bookmarkProgressDeviationAndCauseAnalysis != null)
+ {
+ bookmarkProgressDeviationAndCauseAnalysis.Text = monthReport.ProgressDeviationAndCauseAnalysis ?? "";
+ }
+ Bookmark bookmarkKeyDeviationAndCauseAnalysis = doc.Range.Bookmarks["KeyDeviationAndCauseAnalysis"];
+ if (bookmarkKeyDeviationAndCauseAnalysis != null)
+ {
+ bookmarkKeyDeviationAndCauseAnalysis.Text = monthReport.KeyDeviationAndCauseAnalysis ?? "";
+ }
+ Bookmark bookmarkTargetedCorrectiveMeasures = doc.Range.Bookmarks["TargetedCorrectiveMeasures"];
+ if (bookmarkTargetedCorrectiveMeasures != null)
+ {
+ bookmarkTargetedCorrectiveMeasures.Text = monthReport.TargetedCorrectiveMeasures ?? "";
+ }
+ //总包工程施工请款情况表
+ builder.MoveToBookmark("Table2");
+ builder.StartTable();
+ builder.CellFormat.Borders.LineStyle = LineStyle.Single;
+ builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
+ builder.Bold = false;
+ builder.RowFormat.Height = 20;
+ builder.Bold = false;
+ var list = ConstructionMonthReportMainCostService.getListData(ConstructionMonthReportId);
+ foreach (var item in list)
+ {
+ //序号
+ 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 = 28;
+ builder.Write("1");
+ //合同施工费
+ 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 = 68;
+ builder.Write(item.ContractConstructionCost.Value.ToString("0.####"));
+ //本月请款
+ 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 = 56;
+ builder.Write(item.ThisRequestCost.Value.ToString("0.####"));
+ //累计请款
+ 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 = 80;
+ builder.Write(item.TotalRequestCost.Value.ToString("0.####"));
+ //本月收款
+ 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 = 62;
+ builder.Write(item.ThisCollection.Value.ToString("0.####"));
+ //累计收款
+ 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 = 76;
+ builder.Write(item.TotalCollection.Value.ToString("0.####"));
+ //累计收款百分比
+ 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 = 68;
+ builder.Write(item.TotalCollectionRate.Value.ToString("0.##"));
+ builder.EndRow();
+ }
+ builder.EndTable();
+ //分包工程施工付款情况表
+ builder.MoveToBookmark("Table3");
+ builder.StartTable();
+ builder.CellFormat.Borders.LineStyle = LineStyle.Single;
+ builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
+ builder.Bold = false;
+ builder.RowFormat.Height = 20;
+ builder.Bold = false;
+ var list2 = ConstructionMonthReportSubCostService.getListData(ConstructionMonthReportId);
+ int i = 1;
+ foreach (var item in list2)
+ {
+ //序号
+ 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 = 33;
+ builder.Write(i.ToString());
+ //施工单位
+ 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 = 62;
+ builder.Write(BLL.UnitService.GetUnitNameByUnitId(item.UnitId));
+ //合同金额
+ 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 = 37;
+ builder.Write(item.ContractAmount.Value.ToString("0.####"));
+ //本月应付
+ 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 = 62;
+ builder.Write(item.ThisNeedPay.Value.ToString("0.####"));
+ //本月实付
+ 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 = 62;
+ builder.Write(item.ThisRealPay.Value.ToString("0.####"));
+ //累计应付
+ 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 = 62;
+ builder.Write(item.TotalNeedPay.Value.ToString("0.####"));
+ //累计实付
+ 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 = 62;
+ builder.Write(item.TotalRealPay.Value.ToString("0.####"));
+ //累计付款百分比
+ 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 = 62;
+ builder.Write(item.TotalRealPayRate.Value.ToString("0.##"));
+ builder.EndRow();
+ i++;
+ }
+ //合计
+ 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 = 33;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 62;
+ builder.Write(string.Empty);
+ //合同金额
+ 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 = 37;
+ builder.Write(list2.Sum(x=>x.ContractAmount??0).ToString("0.####"));
+ //本月应付
+ 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 = 62;
+ builder.Write(list2.Sum(x => x.ThisNeedPay ?? 0).ToString("0.####"));
+ //本月实付
+ 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 = 62;
+ builder.Write(list2.Sum(x => x.ThisRealPay ?? 0).ToString("0.####"));
+ //累计应付
+ 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 = 62;
+ builder.Write(list2.Sum(x => x.TotalNeedPay ?? 0).ToString("0.####"));
+ //累计实付
+ 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 = 62;
+ builder.Write(list2.Sum(x => x.TotalRealPay ?? 0).ToString("0.####"));
+ //累计付款百分比
+ 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 = 62;
+ decimal contractAmount = list2.Sum(x => x.ContractAmount ?? 0);
+ decimal totalRealPay = list2.Sum(x => x.TotalRealPay ?? 0);
+ decimal totalRealPayRate = 0;
+ if (contractAmount > 0 && totalRealPay > 0)
+ {
+ totalRealPayRate = totalRealPay / contractAmount * 100;
+ }
+ builder.Write(totalRealPayRate.ToString("0.##"));
+ builder.EndRow();
+ builder.EndTable();
+ //下月计划完成情况
+ builder.MoveToBookmark("Table4");
+ builder.StartTable();
+ builder.CellFormat.Borders.LineStyle = LineStyle.Single;
+ builder.CellFormat.Borders.Color = System.Drawing.Color.Black;
+ builder.Bold = false;
+ builder.RowFormat.Height = 20;
+ builder.Bold = false;
+ DateTime nextStartTime = startTime.AddMonths(1);
+ DateTime nextEndTime = endTime.AddMonths(1);
+ DataTable table2 = BLL.WorkPackageService.GetAllTreeDataTableConstructionMonthReport(this.CurrUser.LoginProjectId, string.Empty, nextStartTime, nextEndTime);
+ //序号
+ 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 = 60;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 200;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ 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.Center;//垂直居中对齐
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ builder.CellFormat.Width = 100;
+ builder.Write("实际完成时间");
+ builder.EndRow();
+ foreach (DataRow row in table2.Rows)
+ {
+ //序号
+ 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 = 60;
+ builder.Write(row["Code"].ToString());
+ //工作内容
+ 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 = 200;
+ builder.Write(row["Name"].ToString());
+ //概算工程量
+ 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;
+ if (row["PlanProjectQuantity"] != System.DBNull.Value)
+ {
+ builder.Write(Funs.GetNewDecimalOrZero(row["PlanProjectQuantity"].ToString()).ToString("0.##"));
+ }
+ //计划开始时间
+ 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;
+ string planStartDate = string.Empty;
+ if (row["PlanStartDate"] != null)
+ {
+ planStartDate = string.Format("{0:yyyy-MM-dd}", row["PlanStartDate"]);
+ }
+ builder.Write(planStartDate);
+ //计划完成时间
+ 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;
+ string planEndDate = string.Empty;
+ if (row["PlanEndDate"] != null)
+ {
+ planEndDate = string.Format("{0:yyyy-MM-dd}", row["PlanEndDate"]);
+ }
+ builder.Write(planEndDate);
+ //实际开始时间
+ 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;
+ string realStartDate = string.Empty;
+ if (row["RealStartDate"] != null)
+ {
+ realStartDate = string.Format("{0:yyyy-MM-dd}", row["RealStartDate"]);
+ }
+ builder.Write(realStartDate);
+ //实际完成时间
+ 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;
+ string realEndDate = string.Empty;
+ if (row["RealEndDate"] != null)
+ {
+ realEndDate = string.Format("{0:yyyy-MM-dd}", row["RealEndDate"]);
+ }
+ builder.Write(realEndDate);
+ builder.EndRow();
+ }
+ builder.EndTable();
+ Bookmark bookmarkNextMonthWork = doc.Range.Bookmarks["NextMonthWork"];
+ if (bookmarkNextMonthWork != null)
+ {
+ bookmarkNextMonthWork.Text = monthReport.NextMonthWork ?? "";
+ }
+ Bookmark bookmarkNeedCoordinateMatter = doc.Range.Bookmarks["NeedCoordinateMatter"];
+ if (bookmarkNeedCoordinateMatter != null)
+ {
+ bookmarkNeedCoordinateMatter.Text = monthReport.NeedCoordinateMatter ?? "";
+ }
+ Bookmark bookmarkFile = doc.Range.Bookmarks["Photo"];
+ if (bookmarkFile != null)
+ {
+ builder.MoveToBookmark("Photo");
+ builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐
+ var checkFile = AttachFileService.Getfiles(ConstructionMonthReportId, Const.ConstructionMonthReportMenuId);
+ if (!string.IsNullOrEmpty(checkFile.AttachUrl))
+ {
+ string[] urls = checkFile.AttachUrl.Split(',');
+ if (urls.Length > 0)
+ {
+ foreach (var url in urls)
+ {
+ if (!string.IsNullOrWhiteSpace(url))
+ {
+ System.Drawing.Size JpgSize;
+ float Wpx;
+ float Hpx;
+ string spliurl = url;
+ UploadAttachmentService.getJpgSize(rootPath + spliurl, out JpgSize, out Wpx, out Hpx);
+ float d = 1;
+ if (JpgSize.Width > 0 && JpgSize.Height > 0)
+ {
+ if (JpgSize.Width >= JpgSize.Height)
+ {
+ if (JpgSize.Width > 420)
+ {
+ d = (float)JpgSize.Width / 420;
+ }
+ }
+ else
+ {
+ if (JpgSize.Height > 420)
+ {
+ d = (float)JpgSize.Height / 420;
+ }
+
+ }
+ if (File.Exists(rootPath + spliurl))
+ {
+ builder.InsertImage(rootPath + spliurl, Convert.ToDouble(JpgSize.Width / d), Convert.ToDouble(JpgSize.Height / d));
+ builder.Write(" ");
+ }
+ }
+ }
+
+
+ }
+ }
+ //string url = item.AttachUrl.Substring(0, item.AttachUrl.Length - 1);
+ }
+ }
+ doc.Save(newUrl);
+ string fileName = Path.GetFileName(newUrl);
+ FileInfo info = new FileInfo(newUrl);
+ 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.Flush();
+ Response.Close();
+ File.Delete(newUrl);
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.designer.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.designer.cs
new file mode 100644
index 00000000..baa92281
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReport.aspx.designer.cs
@@ -0,0 +1,168 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.PZHGL.InformationProject {
+
+
+ public partial class ConstructionMonthReport {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// txtMonth 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtMonth;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuModify 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuModify;
+
+ ///
+ /// btnPrinter 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnPrinter;
+
+ ///
+ /// btnMenuView 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuView;
+
+ ///
+ /// btnMenuDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDel;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx
new file mode 100644
index 00000000..f68b4e23
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx
@@ -0,0 +1,417 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConstructionMonthReportEdit.aspx.cs" Inherits="FineUIPro.Web.PZHGL.InformationProject.ConstructionMonthReportEdit" %>
+
+
+
+
+
+
+ 质量月报
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.cs
new file mode 100644
index 00000000..e8623af4
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.cs
@@ -0,0 +1,411 @@
+using BLL;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Web;
+using System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.PZHGL.InformationProject
+{
+ public partial class ConstructionMonthReportEdit : PageBase
+ {
+ ///
+ /// 检查月报主键
+ ///
+ public string ConstructionMonthReportId
+ {
+ get
+ {
+ return (string)ViewState["ConstructionMonthReportId"];
+ }
+ set
+ {
+ ViewState["ConstructionMonthReportId"] = value;
+ }
+ }
+ private static DateTime startTime;
+
+ private static DateTime endTime;
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ ConstructionMonthReportId = Request.Params["ConstructionMonthReportId"];
+ if (!IsPostBack)
+ {
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ if (!string.IsNullOrEmpty(Request.Params["see"]))
+ {
+ btnSave.Visible = false;
+ }
+ if (!string.IsNullOrEmpty(Request.Params["month"]))
+ {
+ Model.Project_Sys_Set ConstructionMonthReportStartDay = BLL.Project_SysSetService.GetSysSetBySetName("月报开始日期", this.CurrUser.LoginProjectId);
+ Model.Project_Sys_Set ConstructionMonthReportEndDay = BLL.Project_SysSetService.GetSysSetBySetName("月报结束日期", this.CurrUser.LoginProjectId);
+ DateTime fromPageMonths = Convert.ToDateTime(Request.Params["month"]).AddMonths(-1);
+ startTime = Convert.ToDateTime(fromPageMonths.Year.ToString() + "-" + fromPageMonths.Month.ToString() + "-25");
+ endTime = startTime.AddMonths(1);
+ if (ConstructionMonthReportStartDay != null)
+ {
+ if (ConstructionMonthReportStartDay.SetValue != "")
+ {
+
+ if (ConstructionMonthReportEndDay != null)
+ {
+ if (ConstructionMonthReportEndDay.SetValue != "")
+ {
+ startTime = Convert.ToDateTime(fromPageMonths.Year.ToString() + "-" + fromPageMonths.Month.ToString() + "-" + ConstructionMonthReportStartDay.SetValue);
+ endTime = Convert.ToDateTime(fromPageMonths.Year.ToString() + "-" + fromPageMonths.Month.ToString() + "-" + ConstructionMonthReportEndDay.SetValue).AddMonths(1);
+ }
+ else
+ {
+ startTime = Convert.ToDateTime(fromPageMonths.Year.ToString() + "-" + fromPageMonths.Month.ToString() + "-" + ConstructionMonthReportStartDay.SetValue);
+ endTime = startTime.AddMonths(1);
+ }
+
+ }
+ else
+ {
+ startTime = Convert.ToDateTime(fromPageMonths.Year.ToString() + "-" + fromPageMonths.Month.ToString() + "-" + ConstructionMonthReportStartDay.SetValue);
+ endTime = startTime.AddMonths(1);
+ }
+ }
+ else
+ {
+ if (ConstructionMonthReportEndDay != null)
+ {
+ if (ConstructionMonthReportEndDay.SetValue != "")
+ {
+ startTime = Convert.ToDateTime(fromPageMonths.Year.ToString() + "-" + fromPageMonths.Month.ToString() + "-" + ConstructionMonthReportEndDay.SetValue);
+ endTime = startTime.AddMonths(1);
+ }
+ }
+ }
+ }
+ else
+ {
+ if (ConstructionMonthReportEndDay != null)
+ {
+ if (ConstructionMonthReportEndDay.SetValue != "")
+ {
+ startTime = Convert.ToDateTime(fromPageMonths.Year.ToString() + "-" + fromPageMonths.Month.ToString() + "-" + ConstructionMonthReportEndDay.SetValue);
+ endTime = startTime.AddMonths(1);
+ }
+ }
+ }
+
+ }
+ var project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId);
+ Model.ZHGL_ConstructionMonthReport constructionMonthReport = ConstructionMonthReportService.GetConstructionMonthReport(ConstructionMonthReportId);
+ if (constructionMonthReport != null)
+ {
+ this.hdId.Text = ConstructionMonthReportId;
+ startTime = Convert.ToDateTime(constructionMonthReport.Month.Value.AddMonths(-1).Year.ToString() + "-" + constructionMonthReport.Month.Value.AddMonths(-1).Month.ToString() + "-25");
+ endTime = startTime.AddMonths(1);
+ this.txtOwnerName.Text = constructionMonthReport.OwnerName;
+ this.txtContractScope.Text = constructionMonthReport.ContractScope;
+ this.txtContractPriceAndPricingModel.Text = constructionMonthReport.ContractPriceAndPricingModel;
+ if (constructionMonthReport.ContractStartDate != null)
+ {
+ this.txtContractStartDate.Text = string.Format("{0:yyyy-MM-dd}", constructionMonthReport.ContractStartDate);
+ }
+ if (constructionMonthReport.ContractEndDate != null)
+ {
+ this.txtContractEndDate.Text = string.Format("{0:yyyy-MM-dd}", constructionMonthReport.ContractEndDate);
+ }
+ this.txtMainConstructionActivities.Text = constructionMonthReport.MainConstructionActivities;
+ this.txtProgressDeviationAndCauseAnalysis.Text = constructionMonthReport.ProgressDeviationAndCauseAnalysis;
+ this.txtKeyDeviationAndCauseAnalysis.Text = constructionMonthReport.KeyDeviationAndCauseAnalysis;
+ this.txtTargetedCorrectiveMeasures.Text = constructionMonthReport.TargetedCorrectiveMeasures;
+ this.txtNextMonthWork.Text = constructionMonthReport.NextMonthWork;
+ this.txtNeedCoordinateMatter.Text = constructionMonthReport.NeedCoordinateMatter;
+ }
+ else
+ {
+ var ownerUnit = BLL.ProjectUnitService.GetProjectUnitListByProjectIdUnitType(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_4);
+ if (ownerUnit.Count > 0)
+ {
+ this.txtOwnerName.Text = BLL.UnitService.GetUnitNameByUnitId(ownerUnit[0].UnitId);
+ }
+ if (project.StartDate != null)
+ {
+ this.txtContractStartDate.Text = string.Format("{0:yyyy-MM-dd}", project.StartDate);
+ }
+ if (project.EndDate != null)
+ {
+ this.txtContractEndDate.Text = string.Format("{0:yyyy-MM-dd}", project.EndDate);
+ }
+ }
+ if (project != null)
+ {
+ this.txtProjectName.Text = project.ProjectName;
+ }
+ lbMonths.Text = endTime.Year.ToString() + "年" + endTime.Month.ToString() + "月";
+ DataTable table = BLL.WorkPackageService.GetAllTreeDataTableConstructionMonthReport(this.CurrUser.LoginProjectId, string.Empty, startTime, endTime);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ BindMainCost();
+ BindSubCost();
+ DateTime nextStartTime = startTime.AddMonths(1);
+ DateTime nextEndTime = endTime.AddMonths(1);
+ DataTable table2 = BLL.WorkPackageService.GetAllTreeDataTableConstructionMonthReport(this.CurrUser.LoginProjectId, string.Empty, nextStartTime, nextEndTime);
+ Grid2.DataSource = table2;
+ Grid2.DataBind();
+ BindGrid();
+ OutputSummaryData();
+ }
+ else
+ {
+ if (GetRequestEventArgument() == "UPDATE_SUMMARY")
+ {
+ // 页面要求重新计算合计行的值
+ OutputSummaryData();
+ }
+ }
+ }
+
+ #region 计算合计
+ ///
+ /// 计算合计
+ ///
+ private void OutputSummaryData()
+ {
+ decimal contractAmount = 0, thisNeedPay = 0, thisRealPay = 0, totalNeedPay = 0, totalRealPay = 0, totalRealPayRate = 0;
+
+ JArray mergedData = GridSubCost.GetMergedData();
+ foreach (JObject mergedRow in mergedData)
+ {
+ JObject values = mergedRow.Value("values");
+ contractAmount += Funs.GetNewDecimalOrZero(values.Value("ContractAmount"));
+ thisNeedPay += Funs.GetNewDecimalOrZero(values.Value("ThisNeedPay"));
+ thisRealPay += Funs.GetNewDecimalOrZero(values.Value("ThisRealPay"));
+ totalNeedPay += Funs.GetNewDecimalOrZero(values.Value("TotalNeedPay"));
+ totalRealPay += Funs.GetNewDecimalOrZero(values.Value("TotalRealPay"));
+ }
+ if (contractAmount > 0 && totalRealPay > 0)
+ {
+ totalRealPayRate = totalRealPay / contractAmount * 100;
+ }
+ JObject summary = new JObject();
+ summary.Add("tfPageIndex", "合计:");
+ summary.Add("ContractAmount", contractAmount.ToString("0.####"));
+ summary.Add("ThisNeedPay", thisNeedPay.ToString("0.####"));
+ summary.Add("ThisRealPay", thisRealPay.ToString("0.####"));
+ summary.Add("TotalNeedPay", totalNeedPay.ToString("0.####"));
+ summary.Add("TotalRealPay", totalRealPay.ToString("0.####"));
+ summary.Add("TotalRealPayRate", totalRealPayRate.ToString("0.##"));
+ GridSubCost.SummaryData = summary;
+ }
+ #endregion
+
+ private void BindMainCost()
+ {
+ var list = ConstructionMonthReportMainCostService.getListData(ConstructionMonthReportId);
+ if (list.Count == 0)
+ {
+ List lists = new List();
+ Model.ZHGL_ConstructionMonthReportMainCost mainCost = new Model.ZHGL_ConstructionMonthReportMainCost();
+ mainCost.ConstructionMonthReportMainCostId = SQLHelper.GetNewID();
+ lists.Add(mainCost);
+ GridMainCost.DataSource = lists;
+ GridMainCost.DataBind();
+ }
+ else
+ {
+ GridMainCost.DataSource = list;
+ GridMainCost.DataBind();
+ }
+ }
+
+ private void BindSubCost()
+ {
+ var list = ConstructionMonthReportSubCostService.getListData(ConstructionMonthReportId);
+ if (list.Count == 0)
+ {
+ List lists = new List();
+ List units = UnitService.GetUnitByProjectIdUnitTypeList(CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2);
+ foreach (var unit in units)
+ {
+ Model.ZHGL_ConstructionMonthReportSubCost subCost = new Model.ZHGL_ConstructionMonthReportSubCost();
+ subCost.ConstructionMonthReportSubCostId = SQLHelper.GetNewID();
+ subCost.UnitId = unit.UnitId;
+ lists.Add(subCost);
+ }
+ GridSubCost.DataSource = lists;
+ GridSubCost.DataBind();
+ }
+ else
+ {
+ GridSubCost.DataSource = list;
+ GridSubCost.DataBind();
+ }
+ }
+
+ //
+ //获取单位名称
+ //
+ //
+ //
+ protected string ConvertUnitName(object UnitId)
+ {
+ string unitName = string.Empty;
+ if (UnitId != null)
+ {
+ Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(UnitId.ToString());
+ if (unit != null)
+ {
+ unitName = unit.UnitName;
+ }
+ }
+ return unitName;
+ }
+
+ #region 关闭弹出窗口
+ ///
+ /// 关闭弹出窗口
+ ///
+ ///
+ ///
+ protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ /// 数据绑定
+ ///
+ public void BindGrid()
+ {
+ string strSql = @"select * from AttachFile where ToKeyId='" + this.hdId.Text + "' and MenuId='" + BLL.Const.ConstructionMonthReportMenuId + "'";
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, null);
+ Grid3.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid3.DataSource = table;
+ Grid3.DataBind();
+ }
+
+ ///
+ /// 获取图片(放于Img中)
+ ///
+ ///
+ ///
+ protected string ConvertImageUrlByImage(object CompanyModelId)
+ {
+ string url = string.Empty;
+ if (CompanyModelId != null)
+ {
+ var attachFile = BLL.AttachFileService.GetAttachFileByToKeyId(CompanyModelId.ToString());
+ if (attachFile != null)
+ {
+ url = HttpUtility.HtmlDecode(BLL.UploadAttachmentService.ShowImage("../../", attachFile.AttachUrl));
+ }
+ }
+ return url;
+ }
+ #endregion
+
+ #region 附件上传
+ ///
+ /// 附件上传
+ ///
+ ///
+ ///
+ protected void btnAttach_Click(object sender, EventArgs e)
+ {
+ if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
+ {
+ this.hdId.Text = SQLHelper.GetNewID(typeof(Model.ZHGL_ConstructionMonthReport));
+ }
+ if (!string.IsNullOrEmpty(Request.Params["see"]))
+ {
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/ZHGL/ConstructionMonthReport&menuId={1}", this.hdId.Text, BLL.Const.ConstructionMonthReportMenuId)));
+ }
+ else
+ {
+ PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/ZHGL/ConstructionMonthReport&menuId={1}", this.hdId.Text, BLL.Const.ConstructionMonthReportMenuId)));
+ }
+ }
+ #endregion
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ if (CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, CurrUser.PersonId, Const.ConstructionMonthReportMenuId, Const.BtnSave))
+ {
+ Model.ZHGL_ConstructionMonthReport ConstructionMonthReport = new Model.ZHGL_ConstructionMonthReport();
+ ConstructionMonthReport.ProjectId = CurrUser.LoginProjectId;
+ ConstructionMonthReport.OwnerName = txtOwnerName.Text.Trim();
+ ConstructionMonthReport.ContractScope = txtContractScope.Text.Trim();
+ ConstructionMonthReport.ContractPriceAndPricingModel = txtContractPriceAndPricingModel.Text.Trim();
+ ConstructionMonthReport.ContractStartDate = Funs.GetNewDateTime(txtContractStartDate.Text.Trim());
+ ConstructionMonthReport.ContractEndDate = Funs.GetNewDateTime(txtContractEndDate.Text.Trim());
+ ConstructionMonthReport.MainConstructionActivities = this.txtMainConstructionActivities.Text.Trim();
+ ConstructionMonthReport.ProgressDeviationAndCauseAnalysis = this.txtProgressDeviationAndCauseAnalysis.Text.Trim();
+ ConstructionMonthReport.KeyDeviationAndCauseAnalysis = this.txtKeyDeviationAndCauseAnalysis.Text.Trim();
+ ConstructionMonthReport.TargetedCorrectiveMeasures = this.txtTargetedCorrectiveMeasures.Text.Trim();
+ ConstructionMonthReport.NextMonthWork = this.txtNextMonthWork.Text.Trim();
+ ConstructionMonthReport.NeedCoordinateMatter = this.txtNeedCoordinateMatter.Text.Trim();
+ if (!string.IsNullOrEmpty(ConstructionMonthReportId))
+ {
+ ConstructionMonthReport.ConstructionMonthReportId = ConstructionMonthReportId;
+ ConstructionMonthReportService.UpdateConstructionMonthReport(ConstructionMonthReport);
+ }
+ else
+ {
+ if (string.IsNullOrEmpty(this.hdId.Text))
+ {
+ ConstructionMonthReport.ConstructionMonthReportId = SQLHelper.GetNewID(typeof(Model.ZHGL_ConstructionMonthReport));
+ }
+ else
+ {
+ ConstructionMonthReport.ConstructionMonthReportId = this.hdId.Text;
+ }
+ ConstructionMonthReport.Month = Convert.ToDateTime(Request.Params["month"]);
+ ConstructionMonthReport.CompileMan = CurrUser.PersonId;
+ ConstructionMonthReport.CompileDate = DateTime.Now;
+ ConstructionMonthReportService.AddConstructionMonthReport(ConstructionMonthReport);
+ }
+
+ BLL.ConstructionMonthReportMainCostService.DeleteConstructionMonthReportMainCostsByConstructionMonthReportId(ConstructionMonthReport.ConstructionMonthReportId);
+ foreach (JObject mergedRow in GridMainCost.GetMergedData()) //总包工程施工请款情况表
+ {
+ Model.ZHGL_ConstructionMonthReportMainCost mainCost = new Model.ZHGL_ConstructionMonthReportMainCost();
+ int i = mergedRow.Value("index");
+ JObject values = mergedRow.Value("values");
+ mainCost.ConstructionMonthReportMainCostId = SQLHelper.GetNewID();
+ mainCost.ConstructionMonthReportId = ConstructionMonthReport.ConstructionMonthReportId;
+ mainCost.ContractConstructionCost = Funs.GetNewDecimalOrZero(values.Value("ContractConstructionCost"));
+ mainCost.ThisRequestCost = Funs.GetNewDecimalOrZero(values.Value("ThisRequestCost"));
+ mainCost.TotalRequestCost = Funs.GetNewDecimalOrZero(values.Value("TotalRequestCost"));
+ mainCost.ThisCollection = Funs.GetNewDecimalOrZero(values.Value("ThisCollection"));
+ mainCost.TotalCollection = Funs.GetNewDecimalOrZero(values.Value("TotalCollection"));
+ mainCost.TotalCollectionRate = Funs.GetNewDecimalOrZero(values.Value("TotalCollectionRate"));
+ ConstructionMonthReportMainCostService.AddConstructionMonthReportMainCost(mainCost);
+ }
+ BLL.ConstructionMonthReportSubCostService.DeleteConstructionMonthReportSubCostsByConstructionMonthReportId(ConstructionMonthReport.ConstructionMonthReportId);
+ foreach (JObject mergedRow in GridSubCost.GetMergedData()) //分包工程施工付款情况表
+ {
+ Model.ZHGL_ConstructionMonthReportSubCost subCost = new Model.ZHGL_ConstructionMonthReportSubCost();
+ int i = mergedRow.Value("index");
+ JObject values = mergedRow.Value("values");
+ subCost.ConstructionMonthReportSubCostId = SQLHelper.GetNewID();
+ subCost.ConstructionMonthReportId = ConstructionMonthReport.ConstructionMonthReportId;
+ subCost.UnitId = values.Value("UnitId");
+ subCost.ContractAmount = Funs.GetNewDecimalOrZero(values.Value("ContractAmount"));
+ subCost.ThisNeedPay = Funs.GetNewDecimalOrZero(values.Value("ThisNeedPay"));
+ subCost.ThisRealPay = Funs.GetNewDecimalOrZero(values.Value("ThisRealPay"));
+ subCost.TotalNeedPay = Funs.GetNewDecimalOrZero(values.Value("TotalNeedPay"));
+ subCost.TotalRealPay = Funs.GetNewDecimalOrZero(values.Value("TotalRealPay"));
+ subCost.TotalRealPayRate = Funs.GetNewDecimalOrZero(values.Value("TotalRealPayRate"));
+ ConstructionMonthReportSubCostService.AddConstructionMonthReportSubCost(subCost);
+ }
+ ShowNotify("提交成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ else
+ {
+ Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.designer.cs
new file mode 100644
index 00000000..a6a7ed00
--- /dev/null
+++ b/SGGL/FineUIPro.Web/PZHGL/InformationProject/ConstructionMonthReportEdit.aspx.designer.cs
@@ -0,0 +1,528 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.PZHGL.InformationProject {
+
+
+ public partial class ConstructionMonthReportEdit {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// lbMonths 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox lbMonths;
+
+ ///
+ /// pan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel pan;
+
+ ///
+ /// txtProjectName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label txtProjectName;
+
+ ///
+ /// txtOwnerName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtOwnerName;
+
+ ///
+ /// txtContractScope 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtContractScope;
+
+ ///
+ /// txtContractPriceAndPricingModel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtContractPriceAndPricingModel;
+
+ ///
+ /// txtContractStartDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtContractStartDate;
+
+ ///
+ /// txtContractEndDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtContractEndDate;
+
+ ///
+ /// ContentPanel3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel3;
+
+ ///
+ /// GroupPanel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel2;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// txtMainConstructionActivities 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtMainConstructionActivities;
+
+ ///
+ /// GroupPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel1;
+
+ ///
+ /// txtProgressDeviationAndCauseAnalysis 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtProgressDeviationAndCauseAnalysis;
+
+ ///
+ /// GroupPanel3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel3;
+
+ ///
+ /// txtKeyDeviationAndCauseAnalysis 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtKeyDeviationAndCauseAnalysis;
+
+ ///
+ /// GroupPanel4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel4;
+
+ ///
+ /// txtTargetedCorrectiveMeasures 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtTargetedCorrectiveMeasures;
+
+ ///
+ /// ContentPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel1;
+
+ ///
+ /// GroupPanel5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel5;
+
+ ///
+ /// GridMainCost 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid GridMainCost;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// txtContractConstructionCost 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtContractConstructionCost;
+
+ ///
+ /// txtThisRequestCost 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtThisRequestCost;
+
+ ///
+ /// txtTotalRequestCost 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtTotalRequestCost;
+
+ ///
+ /// txtThisCollection 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtThisCollection;
+
+ ///
+ /// txtTotalCollection 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtTotalCollection;
+
+ ///
+ /// txtTotalCollectionRate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label txtTotalCollectionRate;
+
+ ///
+ /// GroupPanel6 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel6;
+
+ ///
+ /// GridSubCost 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid GridSubCost;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label1;
+
+ ///
+ /// Label3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label3;
+
+ ///
+ /// txtContractAmount 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtContractAmount;
+
+ ///
+ /// txtThisNeedPay 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtThisNeedPay;
+
+ ///
+ /// txtThisRealPay 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtThisRealPay;
+
+ ///
+ /// txtTotalNeedPay 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtTotalNeedPay;
+
+ ///
+ /// txtTotalRealPay 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtTotalRealPay;
+
+ ///
+ /// txtTotalRealPayRate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label txtTotalRealPayRate;
+
+ ///
+ /// ContentPanel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ContentPanel ContentPanel2;
+
+ ///
+ /// GroupPanel7 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel7;
+
+ ///
+ /// Grid2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid2;
+
+ ///
+ /// txtNextMonthWork 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtNextMonthWork;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// txtNeedCoordinateMatter 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtNeedCoordinateMatter;
+
+ ///
+ /// Panel2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel2;
+
+ ///
+ /// Panel3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel3;
+
+ ///
+ /// btnAttach 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAttach;
+
+ ///
+ /// Grid3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid3;
+
+ ///
+ /// Label2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label Label2;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// hdId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdId;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+
+ ///
+ /// WindowAtt 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window WindowAtt;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs
index 94da1b36..8ef1b8de 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs
@@ -384,8 +384,8 @@ namespace FineUIPro.Web.common.ProjectSet
{
if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim()))
{
- CheckMonthStartDay.SetValue = this.txtEndTime.Text.Trim();
- BLL.Project_SysSetService.UpdateSet(CheckMonthStartDay);
+ CheckMonthEndDay.SetValue = this.txtEndTime.Text.Trim();
+ BLL.Project_SysSetService.UpdateSet(CheckMonthEndDay);
}
}
diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.cs b/SGGL/FineUIPro.Web/indexProject.aspx.cs
index f8a5b1d6..de957f77 100644
--- a/SGGL/FineUIPro.Web/indexProject.aspx.cs
+++ b/SGGL/FineUIPro.Web/indexProject.aspx.cs
@@ -586,6 +586,7 @@ namespace FineUIPro.Web
this.leftPanel.Hidden = true;
this.Tab1.IFrameUrl = "~/common/mainProject.aspx";
this.CurrUser.LastProjectId = null;
+ this.Tab1.Title = "首页";
if (!string.IsNullOrEmpty(type))
{
this.CurrUser.LastProjectId = this.CurrUser.LoginProjectId;
@@ -606,7 +607,7 @@ namespace FineUIPro.Web
{
this.Tab1.IFrameUrl = "~/common/mainMenu_HJGL_AVEVA.aspx";
}
- else if (type == Const.Menu_PZHGL)
+ else if (type == Const.Menu_PZHGL)
{
this.Tab1.IFrameUrl = "~/PZHGL/InformationProject/ConstructionPlan.aspx";
this.Tab1.Title = "总承包商施工计划";
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 60b0c919..6610ceba 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -1706,6 +1706,15 @@ namespace Model
partial void InsertZHGL_ConstructionLog(ZHGL_ConstructionLog instance);
partial void UpdateZHGL_ConstructionLog(ZHGL_ConstructionLog instance);
partial void DeleteZHGL_ConstructionLog(ZHGL_ConstructionLog instance);
+ partial void InsertZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport instance);
+ partial void UpdateZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport instance);
+ partial void DeleteZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport instance);
+ partial void InsertZHGL_ConstructionMonthReportMainCost(ZHGL_ConstructionMonthReportMainCost instance);
+ partial void UpdateZHGL_ConstructionMonthReportMainCost(ZHGL_ConstructionMonthReportMainCost instance);
+ partial void DeleteZHGL_ConstructionMonthReportMainCost(ZHGL_ConstructionMonthReportMainCost instance);
+ partial void InsertZHGL_ConstructionMonthReportSubCost(ZHGL_ConstructionMonthReportSubCost instance);
+ partial void UpdateZHGL_ConstructionMonthReportSubCost(ZHGL_ConstructionMonthReportSubCost instance);
+ partial void DeleteZHGL_ConstructionMonthReportSubCost(ZHGL_ConstructionMonthReportSubCost instance);
partial void InsertZHGL_ConstructionPlan(ZHGL_ConstructionPlan instance);
partial void UpdateZHGL_ConstructionPlan(ZHGL_ConstructionPlan instance);
partial void DeleteZHGL_ConstructionPlan(ZHGL_ConstructionPlan instance);
@@ -7001,6 +7010,30 @@ namespace Model
}
}
+ public System.Data.Linq.Table ZHGL_ConstructionMonthReport
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
+ public System.Data.Linq.Table ZHGL_ConstructionMonthReportMainCost
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
+ public System.Data.Linq.Table ZHGL_ConstructionMonthReportSubCost
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table ZHGL_ConstructionPlan
{
get
@@ -23974,6 +24007,8 @@ namespace Model
private EntitySet _ZHGL_ConstructionLog;
+ private EntitySet _ZHGL_ConstructionMonthReport;
+
private EntitySet _ZHGL_ConstructionPlan;
private EntitySet _ZHGL_ConstructionReport;
@@ -24215,6 +24250,7 @@ namespace Model
this._WPQ_WPQList = new EntitySet(new Action(this.attach_WPQ_WPQList), new Action(this.detach_WPQ_WPQList));
this._Wx_PageData = new EntitySet(new Action(this.attach_Wx_PageData), new Action(this.detach_Wx_PageData));
this._ZHGL_ConstructionLog = new EntitySet(new Action(this.attach_ZHGL_ConstructionLog), new Action(this.detach_ZHGL_ConstructionLog));
+ this._ZHGL_ConstructionMonthReport = new EntitySet(new Action(this.attach_ZHGL_ConstructionMonthReport), new Action(this.detach_ZHGL_ConstructionMonthReport));
this._ZHGL_ConstructionPlan = new EntitySet(new Action(this.attach_ZHGL_ConstructionPlan), new Action(this.detach_ZHGL_ConstructionPlan));
this._ZHGL_ConstructionReport = new EntitySet(new Action(this.attach_ZHGL_ConstructionReport), new Action(this.detach_ZHGL_ConstructionReport));
this._ZHGL_WorkHandover = new EntitySet(new Action(this.attach_ZHGL_WorkHandover), new Action(this.detach_ZHGL_WorkHandover));
@@ -27054,6 +27090,19 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReport_Base_Project", Storage="_ZHGL_ConstructionMonthReport", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
+ public EntitySet ZHGL_ConstructionMonthReport
+ {
+ get
+ {
+ return this._ZHGL_ConstructionMonthReport;
+ }
+ set
+ {
+ this._ZHGL_ConstructionMonthReport.Assign(value);
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionPlan_Base_Project", Storage="_ZHGL_ConstructionPlan", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet ZHGL_ConstructionPlan
{
@@ -29141,6 +29190,18 @@ namespace Model
entity.Base_Project = null;
}
+ private void attach_ZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport entity)
+ {
+ this.SendPropertyChanging();
+ entity.Base_Project = this;
+ }
+
+ private void detach_ZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport entity)
+ {
+ this.SendPropertyChanging();
+ entity.Base_Project = null;
+ }
+
private void attach_ZHGL_ConstructionPlan(ZHGL_ConstructionPlan entity)
{
this.SendPropertyChanging();
@@ -32987,6 +33048,8 @@ namespace Model
private EntitySet _WBS_UnitWork_Base_Unit_Unit;
+ private EntitySet _ZHGL_ConstructionMonthReportSubCost;
+
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -33165,6 +33228,7 @@ namespace Model
this._WBS_UnitWork = new EntitySet(new Action(this.attach_WBS_UnitWork), new Action(this.detach_WBS_UnitWork));
this._WBS_UnitWork_Base_Unit_SupervisorUnit = new EntitySet(new Action(this.attach_WBS_UnitWork_Base_Unit_SupervisorUnit), new Action(this.detach_WBS_UnitWork_Base_Unit_SupervisorUnit));
this._WBS_UnitWork_Base_Unit_Unit = new EntitySet(new Action(this.attach_WBS_UnitWork_Base_Unit_Unit), new Action(this.detach_WBS_UnitWork_Base_Unit_Unit));
+ this._ZHGL_ConstructionMonthReportSubCost = new EntitySet(new Action(this.attach_ZHGL_ConstructionMonthReportSubCost), new Action(this.detach_ZHGL_ConstructionMonthReportSubCost));
OnCreated();
}
@@ -35234,6 +35298,19 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReportSubCost_Base_Unit", Storage="_ZHGL_ConstructionMonthReportSubCost", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")]
+ public EntitySet ZHGL_ConstructionMonthReportSubCost
+ {
+ get
+ {
+ return this._ZHGL_ConstructionMonthReportSubCost;
+ }
+ set
+ {
+ this._ZHGL_ConstructionMonthReportSubCost.Assign(value);
+ }
+ }
+
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -36717,6 +36794,18 @@ namespace Model
this.SendPropertyChanging();
entity.Unit = null;
}
+
+ private void attach_ZHGL_ConstructionMonthReportSubCost(ZHGL_ConstructionMonthReportSubCost entity)
+ {
+ this.SendPropertyChanging();
+ entity.Base_Unit = this;
+ }
+
+ private void detach_ZHGL_ConstructionMonthReportSubCost(ZHGL_ConstructionMonthReportSubCost entity)
+ {
+ this.SendPropertyChanging();
+ entity.Base_Unit = null;
+ }
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_UnitType")]
@@ -155087,6 +155176,8 @@ namespace Model
private EntitySet _ZHGL_ConstructionLog;
+ private EntitySet _ZHGL_ConstructionMonthReport;
+
private EntitySet _ZHGL_ConstructionPlan;
private EntitySet _ZHGL_ConstructionPlanApprove;
@@ -155467,6 +155558,7 @@ namespace Model
this._WPQ_WPQList = new EntitySet(new Action(this.attach_WPQ_WPQList), new Action(this.detach_WPQ_WPQList));
this._Wx_PageData = new EntitySet(new Action(this.attach_Wx_PageData), new Action(this.detach_Wx_PageData));
this._ZHGL_ConstructionLog = new EntitySet(new Action(this.attach_ZHGL_ConstructionLog), new Action(this.detach_ZHGL_ConstructionLog));
+ this._ZHGL_ConstructionMonthReport = new EntitySet(new Action(this.attach_ZHGL_ConstructionMonthReport), new Action(this.detach_ZHGL_ConstructionMonthReport));
this._ZHGL_ConstructionPlan = new EntitySet(new Action(this.attach_ZHGL_ConstructionPlan), new Action(this.detach_ZHGL_ConstructionPlan));
this._ZHGL_ConstructionPlanApprove = new EntitySet(new Action(this.attach_ZHGL_ConstructionPlanApprove), new Action(this.detach_ZHGL_ConstructionPlanApprove));
this._ZHGL_ConstructionReport = new EntitySet(new Action(this.attach_ZHGL_ConstructionReport), new Action(this.detach_ZHGL_ConstructionReport));
@@ -159853,6 +159945,19 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReport_Person_Persons", Storage="_ZHGL_ConstructionMonthReport", ThisKey="PersonId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
+ public EntitySet ZHGL_ConstructionMonthReport
+ {
+ get
+ {
+ return this._ZHGL_ConstructionMonthReport;
+ }
+ set
+ {
+ this._ZHGL_ConstructionMonthReport.Assign(value);
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionPlan_Person_Persons_CompileMan", Storage="_ZHGL_ConstructionPlan", ThisKey="PersonId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
public EntitySet ZHGL_ConstructionPlan
{
@@ -162700,6 +162805,18 @@ namespace Model
entity.Person_Persons = null;
}
+ private void attach_ZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport entity)
+ {
+ this.SendPropertyChanging();
+ entity.Person_Persons = this;
+ }
+
+ private void detach_ZHGL_ConstructionMonthReport(ZHGL_ConstructionMonthReport entity)
+ {
+ this.SendPropertyChanging();
+ entity.Person_Persons = null;
+ }
+
private void attach_ZHGL_ConstructionPlan(ZHGL_ConstructionPlan entity)
{
this.SendPropertyChanging();
@@ -302270,6 +302387,1173 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ZHGL_ConstructionMonthReport")]
+ public partial class ZHGL_ConstructionMonthReport : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _ConstructionMonthReportId;
+
+ private string _ProjectId;
+
+ private System.Nullable _Month;
+
+ private string _OwnerName;
+
+ private string _ContractScope;
+
+ private string _ContractPriceAndPricingModel;
+
+ private System.Nullable _ContractStartDate;
+
+ private System.Nullable _ContractEndDate;
+
+ private string _MainConstructionActivities;
+
+ private string _ProgressDeviationAndCauseAnalysis;
+
+ private string _KeyDeviationAndCauseAnalysis;
+
+ private string _TargetedCorrectiveMeasures;
+
+ private string _NextMonthWork;
+
+ private string _NeedCoordinateMatter;
+
+ private string _CompileMan;
+
+ private System.Nullable _CompileDate;
+
+ private EntityRef _Base_Project;
+
+ private EntityRef _Person_Persons;
+
+ private EntitySet _ZHGL_ConstructionMonthReportMainCost;
+
+ private EntitySet _ZHGL_ConstructionMonthReportSubCost;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnConstructionMonthReportIdChanging(string value);
+ partial void OnConstructionMonthReportIdChanged();
+ partial void OnProjectIdChanging(string value);
+ partial void OnProjectIdChanged();
+ partial void OnMonthChanging(System.Nullable value);
+ partial void OnMonthChanged();
+ partial void OnOwnerNameChanging(string value);
+ partial void OnOwnerNameChanged();
+ partial void OnContractScopeChanging(string value);
+ partial void OnContractScopeChanged();
+ partial void OnContractPriceAndPricingModelChanging(string value);
+ partial void OnContractPriceAndPricingModelChanged();
+ partial void OnContractStartDateChanging(System.Nullable value);
+ partial void OnContractStartDateChanged();
+ partial void OnContractEndDateChanging(System.Nullable value);
+ partial void OnContractEndDateChanged();
+ partial void OnMainConstructionActivitiesChanging(string value);
+ partial void OnMainConstructionActivitiesChanged();
+ partial void OnProgressDeviationAndCauseAnalysisChanging(string value);
+ partial void OnProgressDeviationAndCauseAnalysisChanged();
+ partial void OnKeyDeviationAndCauseAnalysisChanging(string value);
+ partial void OnKeyDeviationAndCauseAnalysisChanged();
+ partial void OnTargetedCorrectiveMeasuresChanging(string value);
+ partial void OnTargetedCorrectiveMeasuresChanged();
+ partial void OnNextMonthWorkChanging(string value);
+ partial void OnNextMonthWorkChanged();
+ partial void OnNeedCoordinateMatterChanging(string value);
+ partial void OnNeedCoordinateMatterChanged();
+ partial void OnCompileManChanging(string value);
+ partial void OnCompileManChanged();
+ partial void OnCompileDateChanging(System.Nullable value);
+ partial void OnCompileDateChanged();
+ #endregion
+
+ public ZHGL_ConstructionMonthReport()
+ {
+ this._Base_Project = default(EntityRef);
+ this._Person_Persons = default(EntityRef);
+ this._ZHGL_ConstructionMonthReportMainCost = new EntitySet(new Action(this.attach_ZHGL_ConstructionMonthReportMainCost), new Action(this.detach_ZHGL_ConstructionMonthReportMainCost));
+ this._ZHGL_ConstructionMonthReportSubCost = new EntitySet(new Action(this.attach_ZHGL_ConstructionMonthReportSubCost), new Action(this.detach_ZHGL_ConstructionMonthReportSubCost));
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionMonthReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string ConstructionMonthReportId
+ {
+ get
+ {
+ return this._ConstructionMonthReportId;
+ }
+ set
+ {
+ if ((this._ConstructionMonthReportId != value))
+ {
+ this.OnConstructionMonthReportIdChanging(value);
+ this.SendPropertyChanging();
+ this._ConstructionMonthReportId = value;
+ this.SendPropertyChanged("ConstructionMonthReportId");
+ this.OnConstructionMonthReportIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
+ public string ProjectId
+ {
+ get
+ {
+ return this._ProjectId;
+ }
+ set
+ {
+ if ((this._ProjectId != value))
+ {
+ if (this._Base_Project.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnProjectIdChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectId = value;
+ this.SendPropertyChanged("ProjectId");
+ this.OnProjectIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="DateTime")]
+ public System.Nullable Month
+ {
+ get
+ {
+ return this._Month;
+ }
+ set
+ {
+ if ((this._Month != value))
+ {
+ this.OnMonthChanging(value);
+ this.SendPropertyChanging();
+ this._Month = value;
+ this.SendPropertyChanged("Month");
+ this.OnMonthChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OwnerName", DbType="NVarChar(100)")]
+ public string OwnerName
+ {
+ get
+ {
+ return this._OwnerName;
+ }
+ set
+ {
+ if ((this._OwnerName != value))
+ {
+ this.OnOwnerNameChanging(value);
+ this.SendPropertyChanging();
+ this._OwnerName = value;
+ this.SendPropertyChanged("OwnerName");
+ this.OnOwnerNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractScope", DbType="NVarChar(1000)")]
+ public string ContractScope
+ {
+ get
+ {
+ return this._ContractScope;
+ }
+ set
+ {
+ if ((this._ContractScope != value))
+ {
+ this.OnContractScopeChanging(value);
+ this.SendPropertyChanging();
+ this._ContractScope = value;
+ this.SendPropertyChanged("ContractScope");
+ this.OnContractScopeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractPriceAndPricingModel", DbType="NVarChar(300)")]
+ public string ContractPriceAndPricingModel
+ {
+ get
+ {
+ return this._ContractPriceAndPricingModel;
+ }
+ set
+ {
+ if ((this._ContractPriceAndPricingModel != value))
+ {
+ this.OnContractPriceAndPricingModelChanging(value);
+ this.SendPropertyChanging();
+ this._ContractPriceAndPricingModel = value;
+ this.SendPropertyChanged("ContractPriceAndPricingModel");
+ this.OnContractPriceAndPricingModelChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractStartDate", DbType="DateTime")]
+ public System.Nullable ContractStartDate
+ {
+ get
+ {
+ return this._ContractStartDate;
+ }
+ set
+ {
+ if ((this._ContractStartDate != value))
+ {
+ this.OnContractStartDateChanging(value);
+ this.SendPropertyChanging();
+ this._ContractStartDate = value;
+ this.SendPropertyChanged("ContractStartDate");
+ this.OnContractStartDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractEndDate", DbType="DateTime")]
+ public System.Nullable ContractEndDate
+ {
+ get
+ {
+ return this._ContractEndDate;
+ }
+ set
+ {
+ if ((this._ContractEndDate != value))
+ {
+ this.OnContractEndDateChanging(value);
+ this.SendPropertyChanging();
+ this._ContractEndDate = value;
+ this.SendPropertyChanged("ContractEndDate");
+ this.OnContractEndDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainConstructionActivities", DbType="NVarChar(3000)")]
+ public string MainConstructionActivities
+ {
+ get
+ {
+ return this._MainConstructionActivities;
+ }
+ set
+ {
+ if ((this._MainConstructionActivities != value))
+ {
+ this.OnMainConstructionActivitiesChanging(value);
+ this.SendPropertyChanging();
+ this._MainConstructionActivities = value;
+ this.SendPropertyChanged("MainConstructionActivities");
+ this.OnMainConstructionActivitiesChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProgressDeviationAndCauseAnalysis", DbType="NVarChar(3000)")]
+ public string ProgressDeviationAndCauseAnalysis
+ {
+ get
+ {
+ return this._ProgressDeviationAndCauseAnalysis;
+ }
+ set
+ {
+ if ((this._ProgressDeviationAndCauseAnalysis != value))
+ {
+ this.OnProgressDeviationAndCauseAnalysisChanging(value);
+ this.SendPropertyChanging();
+ this._ProgressDeviationAndCauseAnalysis = value;
+ this.SendPropertyChanged("ProgressDeviationAndCauseAnalysis");
+ this.OnProgressDeviationAndCauseAnalysisChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyDeviationAndCauseAnalysis", DbType="NVarChar(3000)")]
+ public string KeyDeviationAndCauseAnalysis
+ {
+ get
+ {
+ return this._KeyDeviationAndCauseAnalysis;
+ }
+ set
+ {
+ if ((this._KeyDeviationAndCauseAnalysis != value))
+ {
+ this.OnKeyDeviationAndCauseAnalysisChanging(value);
+ this.SendPropertyChanging();
+ this._KeyDeviationAndCauseAnalysis = value;
+ this.SendPropertyChanged("KeyDeviationAndCauseAnalysis");
+ this.OnKeyDeviationAndCauseAnalysisChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TargetedCorrectiveMeasures", DbType="NVarChar(3000)")]
+ public string TargetedCorrectiveMeasures
+ {
+ get
+ {
+ return this._TargetedCorrectiveMeasures;
+ }
+ set
+ {
+ if ((this._TargetedCorrectiveMeasures != value))
+ {
+ this.OnTargetedCorrectiveMeasuresChanging(value);
+ this.SendPropertyChanging();
+ this._TargetedCorrectiveMeasures = value;
+ this.SendPropertyChanged("TargetedCorrectiveMeasures");
+ this.OnTargetedCorrectiveMeasuresChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NextMonthWork", DbType="NVarChar(3000)")]
+ public string NextMonthWork
+ {
+ get
+ {
+ return this._NextMonthWork;
+ }
+ set
+ {
+ if ((this._NextMonthWork != value))
+ {
+ this.OnNextMonthWorkChanging(value);
+ this.SendPropertyChanging();
+ this._NextMonthWork = value;
+ this.SendPropertyChanged("NextMonthWork");
+ this.OnNextMonthWorkChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NeedCoordinateMatter", DbType="NVarChar(3000)")]
+ public string NeedCoordinateMatter
+ {
+ get
+ {
+ return this._NeedCoordinateMatter;
+ }
+ set
+ {
+ if ((this._NeedCoordinateMatter != value))
+ {
+ this.OnNeedCoordinateMatterChanging(value);
+ this.SendPropertyChanging();
+ this._NeedCoordinateMatter = value;
+ this.SendPropertyChanged("NeedCoordinateMatter");
+ this.OnNeedCoordinateMatterChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
+ public string CompileMan
+ {
+ get
+ {
+ return this._CompileMan;
+ }
+ set
+ {
+ if ((this._CompileMan != value))
+ {
+ if (this._Person_Persons.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnCompileManChanging(value);
+ this.SendPropertyChanging();
+ this._CompileMan = value;
+ this.SendPropertyChanged("CompileMan");
+ this.OnCompileManChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")]
+ public System.Nullable CompileDate
+ {
+ get
+ {
+ return this._CompileDate;
+ }
+ set
+ {
+ if ((this._CompileDate != value))
+ {
+ this.OnCompileDateChanging(value);
+ this.SendPropertyChanging();
+ this._CompileDate = value;
+ this.SendPropertyChanged("CompileDate");
+ this.OnCompileDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReport_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
+ public Base_Project Base_Project
+ {
+ get
+ {
+ return this._Base_Project.Entity;
+ }
+ set
+ {
+ Base_Project previousValue = this._Base_Project.Entity;
+ if (((previousValue != value)
+ || (this._Base_Project.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._Base_Project.Entity = null;
+ previousValue.ZHGL_ConstructionMonthReport.Remove(this);
+ }
+ this._Base_Project.Entity = value;
+ if ((value != null))
+ {
+ value.ZHGL_ConstructionMonthReport.Add(this);
+ this._ProjectId = value.ProjectId;
+ }
+ else
+ {
+ this._ProjectId = default(string);
+ }
+ this.SendPropertyChanged("Base_Project");
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReport_Person_Persons", Storage="_Person_Persons", ThisKey="CompileMan", OtherKey="PersonId", IsForeignKey=true)]
+ public Person_Persons Person_Persons
+ {
+ get
+ {
+ return this._Person_Persons.Entity;
+ }
+ set
+ {
+ Person_Persons previousValue = this._Person_Persons.Entity;
+ if (((previousValue != value)
+ || (this._Person_Persons.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._Person_Persons.Entity = null;
+ previousValue.ZHGL_ConstructionMonthReport.Remove(this);
+ }
+ this._Person_Persons.Entity = value;
+ if ((value != null))
+ {
+ value.ZHGL_ConstructionMonthReport.Add(this);
+ this._CompileMan = value.PersonId;
+ }
+ else
+ {
+ this._CompileMan = default(string);
+ }
+ this.SendPropertyChanged("Person_Persons");
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReportMainCost_ZHGL_ConstructionMonthReport", Storage="_ZHGL_ConstructionMonthReportMainCost", ThisKey="ConstructionMonthReportId", OtherKey="ConstructionMonthReportId", DeleteRule="NO ACTION")]
+ public EntitySet ZHGL_ConstructionMonthReportMainCost
+ {
+ get
+ {
+ return this._ZHGL_ConstructionMonthReportMainCost;
+ }
+ set
+ {
+ this._ZHGL_ConstructionMonthReportMainCost.Assign(value);
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReportSubCost_ZHGL_ConstructionMonthReport", Storage="_ZHGL_ConstructionMonthReportSubCost", ThisKey="ConstructionMonthReportId", OtherKey="ConstructionMonthReportId", DeleteRule="NO ACTION")]
+ public EntitySet ZHGL_ConstructionMonthReportSubCost
+ {
+ get
+ {
+ return this._ZHGL_ConstructionMonthReportSubCost;
+ }
+ set
+ {
+ this._ZHGL_ConstructionMonthReportSubCost.Assign(value);
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+
+ private void attach_ZHGL_ConstructionMonthReportMainCost(ZHGL_ConstructionMonthReportMainCost entity)
+ {
+ this.SendPropertyChanging();
+ entity.ZHGL_ConstructionMonthReport = this;
+ }
+
+ private void detach_ZHGL_ConstructionMonthReportMainCost(ZHGL_ConstructionMonthReportMainCost entity)
+ {
+ this.SendPropertyChanging();
+ entity.ZHGL_ConstructionMonthReport = null;
+ }
+
+ private void attach_ZHGL_ConstructionMonthReportSubCost(ZHGL_ConstructionMonthReportSubCost entity)
+ {
+ this.SendPropertyChanging();
+ entity.ZHGL_ConstructionMonthReport = this;
+ }
+
+ private void detach_ZHGL_ConstructionMonthReportSubCost(ZHGL_ConstructionMonthReportSubCost entity)
+ {
+ this.SendPropertyChanging();
+ entity.ZHGL_ConstructionMonthReport = null;
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ZHGL_ConstructionMonthReportMainCost")]
+ public partial class ZHGL_ConstructionMonthReportMainCost : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _ConstructionMonthReportMainCostId;
+
+ private string _ConstructionMonthReportId;
+
+ private System.Nullable _ContractConstructionCost;
+
+ private System.Nullable _ThisRequestCost;
+
+ private System.Nullable _TotalRequestCost;
+
+ private System.Nullable _ThisCollection;
+
+ private System.Nullable _TotalCollection;
+
+ private System.Nullable _TotalCollectionRate;
+
+ private EntityRef _ZHGL_ConstructionMonthReport;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnConstructionMonthReportMainCostIdChanging(string value);
+ partial void OnConstructionMonthReportMainCostIdChanged();
+ partial void OnConstructionMonthReportIdChanging(string value);
+ partial void OnConstructionMonthReportIdChanged();
+ partial void OnContractConstructionCostChanging(System.Nullable value);
+ partial void OnContractConstructionCostChanged();
+ partial void OnThisRequestCostChanging(System.Nullable value);
+ partial void OnThisRequestCostChanged();
+ partial void OnTotalRequestCostChanging(System.Nullable value);
+ partial void OnTotalRequestCostChanged();
+ partial void OnThisCollectionChanging(System.Nullable value);
+ partial void OnThisCollectionChanged();
+ partial void OnTotalCollectionChanging(System.Nullable value);
+ partial void OnTotalCollectionChanged();
+ partial void OnTotalCollectionRateChanging(System.Nullable value);
+ partial void OnTotalCollectionRateChanged();
+ #endregion
+
+ public ZHGL_ConstructionMonthReportMainCost()
+ {
+ this._ZHGL_ConstructionMonthReport = default(EntityRef);
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionMonthReportMainCostId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string ConstructionMonthReportMainCostId
+ {
+ get
+ {
+ return this._ConstructionMonthReportMainCostId;
+ }
+ set
+ {
+ if ((this._ConstructionMonthReportMainCostId != value))
+ {
+ this.OnConstructionMonthReportMainCostIdChanging(value);
+ this.SendPropertyChanging();
+ this._ConstructionMonthReportMainCostId = value;
+ this.SendPropertyChanged("ConstructionMonthReportMainCostId");
+ this.OnConstructionMonthReportMainCostIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionMonthReportId", DbType="NVarChar(50)")]
+ public string ConstructionMonthReportId
+ {
+ get
+ {
+ return this._ConstructionMonthReportId;
+ }
+ set
+ {
+ if ((this._ConstructionMonthReportId != value))
+ {
+ if (this._ZHGL_ConstructionMonthReport.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnConstructionMonthReportIdChanging(value);
+ this.SendPropertyChanging();
+ this._ConstructionMonthReportId = value;
+ this.SendPropertyChanged("ConstructionMonthReportId");
+ this.OnConstructionMonthReportIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractConstructionCost", DbType="Decimal(18,4)")]
+ public System.Nullable ContractConstructionCost
+ {
+ get
+ {
+ return this._ContractConstructionCost;
+ }
+ set
+ {
+ if ((this._ContractConstructionCost != value))
+ {
+ this.OnContractConstructionCostChanging(value);
+ this.SendPropertyChanging();
+ this._ContractConstructionCost = value;
+ this.SendPropertyChanged("ContractConstructionCost");
+ this.OnContractConstructionCostChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisRequestCost", DbType="Decimal(18,4)")]
+ public System.Nullable ThisRequestCost
+ {
+ get
+ {
+ return this._ThisRequestCost;
+ }
+ set
+ {
+ if ((this._ThisRequestCost != value))
+ {
+ this.OnThisRequestCostChanging(value);
+ this.SendPropertyChanging();
+ this._ThisRequestCost = value;
+ this.SendPropertyChanged("ThisRequestCost");
+ this.OnThisRequestCostChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRequestCost", DbType="Decimal(18,4)")]
+ public System.Nullable TotalRequestCost
+ {
+ get
+ {
+ return this._TotalRequestCost;
+ }
+ set
+ {
+ if ((this._TotalRequestCost != value))
+ {
+ this.OnTotalRequestCostChanging(value);
+ this.SendPropertyChanging();
+ this._TotalRequestCost = value;
+ this.SendPropertyChanged("TotalRequestCost");
+ this.OnTotalRequestCostChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisCollection", DbType="Decimal(18,4)")]
+ public System.Nullable ThisCollection
+ {
+ get
+ {
+ return this._ThisCollection;
+ }
+ set
+ {
+ if ((this._ThisCollection != value))
+ {
+ this.OnThisCollectionChanging(value);
+ this.SendPropertyChanging();
+ this._ThisCollection = value;
+ this.SendPropertyChanged("ThisCollection");
+ this.OnThisCollectionChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalCollection", DbType="Decimal(18,4)")]
+ public System.Nullable TotalCollection
+ {
+ get
+ {
+ return this._TotalCollection;
+ }
+ set
+ {
+ if ((this._TotalCollection != value))
+ {
+ this.OnTotalCollectionChanging(value);
+ this.SendPropertyChanging();
+ this._TotalCollection = value;
+ this.SendPropertyChanged("TotalCollection");
+ this.OnTotalCollectionChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalCollectionRate", DbType="Decimal(9,2)")]
+ public System.Nullable TotalCollectionRate
+ {
+ get
+ {
+ return this._TotalCollectionRate;
+ }
+ set
+ {
+ if ((this._TotalCollectionRate != value))
+ {
+ this.OnTotalCollectionRateChanging(value);
+ this.SendPropertyChanging();
+ this._TotalCollectionRate = value;
+ this.SendPropertyChanged("TotalCollectionRate");
+ this.OnTotalCollectionRateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReportMainCost_ZHGL_ConstructionMonthReport", Storage="_ZHGL_ConstructionMonthReport", ThisKey="ConstructionMonthReportId", OtherKey="ConstructionMonthReportId", IsForeignKey=true)]
+ public ZHGL_ConstructionMonthReport ZHGL_ConstructionMonthReport
+ {
+ get
+ {
+ return this._ZHGL_ConstructionMonthReport.Entity;
+ }
+ set
+ {
+ ZHGL_ConstructionMonthReport previousValue = this._ZHGL_ConstructionMonthReport.Entity;
+ if (((previousValue != value)
+ || (this._ZHGL_ConstructionMonthReport.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._ZHGL_ConstructionMonthReport.Entity = null;
+ previousValue.ZHGL_ConstructionMonthReportMainCost.Remove(this);
+ }
+ this._ZHGL_ConstructionMonthReport.Entity = value;
+ if ((value != null))
+ {
+ value.ZHGL_ConstructionMonthReportMainCost.Add(this);
+ this._ConstructionMonthReportId = value.ConstructionMonthReportId;
+ }
+ else
+ {
+ this._ConstructionMonthReportId = default(string);
+ }
+ this.SendPropertyChanged("ZHGL_ConstructionMonthReport");
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ZHGL_ConstructionMonthReportSubCost")]
+ public partial class ZHGL_ConstructionMonthReportSubCost : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _ConstructionMonthReportSubCostId;
+
+ private string _ConstructionMonthReportId;
+
+ private string _UnitId;
+
+ private System.Nullable _ContractAmount;
+
+ private System.Nullable _ThisNeedPay;
+
+ private System.Nullable _ThisRealPay;
+
+ private System.Nullable _TotalNeedPay;
+
+ private System.Nullable _TotalRealPay;
+
+ private System.Nullable _TotalRealPayRate;
+
+ private EntityRef _Base_Unit;
+
+ private EntityRef _ZHGL_ConstructionMonthReport;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnConstructionMonthReportSubCostIdChanging(string value);
+ partial void OnConstructionMonthReportSubCostIdChanged();
+ partial void OnConstructionMonthReportIdChanging(string value);
+ partial void OnConstructionMonthReportIdChanged();
+ partial void OnUnitIdChanging(string value);
+ partial void OnUnitIdChanged();
+ partial void OnContractAmountChanging(System.Nullable value);
+ partial void OnContractAmountChanged();
+ partial void OnThisNeedPayChanging(System.Nullable value);
+ partial void OnThisNeedPayChanged();
+ partial void OnThisRealPayChanging(System.Nullable value);
+ partial void OnThisRealPayChanged();
+ partial void OnTotalNeedPayChanging(System.Nullable value);
+ partial void OnTotalNeedPayChanged();
+ partial void OnTotalRealPayChanging(System.Nullable value);
+ partial void OnTotalRealPayChanged();
+ partial void OnTotalRealPayRateChanging(System.Nullable value);
+ partial void OnTotalRealPayRateChanged();
+ #endregion
+
+ public ZHGL_ConstructionMonthReportSubCost()
+ {
+ this._Base_Unit = default(EntityRef);
+ this._ZHGL_ConstructionMonthReport = default(EntityRef);
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionMonthReportSubCostId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string ConstructionMonthReportSubCostId
+ {
+ get
+ {
+ return this._ConstructionMonthReportSubCostId;
+ }
+ set
+ {
+ if ((this._ConstructionMonthReportSubCostId != value))
+ {
+ this.OnConstructionMonthReportSubCostIdChanging(value);
+ this.SendPropertyChanging();
+ this._ConstructionMonthReportSubCostId = value;
+ this.SendPropertyChanged("ConstructionMonthReportSubCostId");
+ this.OnConstructionMonthReportSubCostIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionMonthReportId", DbType="NVarChar(50)")]
+ public string ConstructionMonthReportId
+ {
+ get
+ {
+ return this._ConstructionMonthReportId;
+ }
+ set
+ {
+ if ((this._ConstructionMonthReportId != value))
+ {
+ if (this._ZHGL_ConstructionMonthReport.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnConstructionMonthReportIdChanging(value);
+ this.SendPropertyChanging();
+ this._ConstructionMonthReportId = value;
+ this.SendPropertyChanged("ConstructionMonthReportId");
+ this.OnConstructionMonthReportIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")]
+ public string UnitId
+ {
+ get
+ {
+ return this._UnitId;
+ }
+ set
+ {
+ if ((this._UnitId != value))
+ {
+ if (this._Base_Unit.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnUnitIdChanging(value);
+ this.SendPropertyChanging();
+ this._UnitId = value;
+ this.SendPropertyChanged("UnitId");
+ this.OnUnitIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractAmount", DbType="Decimal(18,4)")]
+ public System.Nullable ContractAmount
+ {
+ get
+ {
+ return this._ContractAmount;
+ }
+ set
+ {
+ if ((this._ContractAmount != value))
+ {
+ this.OnContractAmountChanging(value);
+ this.SendPropertyChanging();
+ this._ContractAmount = value;
+ this.SendPropertyChanged("ContractAmount");
+ this.OnContractAmountChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisNeedPay", DbType="Decimal(18,4)")]
+ public System.Nullable ThisNeedPay
+ {
+ get
+ {
+ return this._ThisNeedPay;
+ }
+ set
+ {
+ if ((this._ThisNeedPay != value))
+ {
+ this.OnThisNeedPayChanging(value);
+ this.SendPropertyChanging();
+ this._ThisNeedPay = value;
+ this.SendPropertyChanged("ThisNeedPay");
+ this.OnThisNeedPayChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThisRealPay", DbType="Decimal(18,4)")]
+ public System.Nullable ThisRealPay
+ {
+ get
+ {
+ return this._ThisRealPay;
+ }
+ set
+ {
+ if ((this._ThisRealPay != value))
+ {
+ this.OnThisRealPayChanging(value);
+ this.SendPropertyChanging();
+ this._ThisRealPay = value;
+ this.SendPropertyChanged("ThisRealPay");
+ this.OnThisRealPayChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalNeedPay", DbType="Decimal(18,4)")]
+ public System.Nullable TotalNeedPay
+ {
+ get
+ {
+ return this._TotalNeedPay;
+ }
+ set
+ {
+ if ((this._TotalNeedPay != value))
+ {
+ this.OnTotalNeedPayChanging(value);
+ this.SendPropertyChanging();
+ this._TotalNeedPay = value;
+ this.SendPropertyChanged("TotalNeedPay");
+ this.OnTotalNeedPayChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRealPay", DbType="Decimal(18,4)")]
+ public System.Nullable TotalRealPay
+ {
+ get
+ {
+ return this._TotalRealPay;
+ }
+ set
+ {
+ if ((this._TotalRealPay != value))
+ {
+ this.OnTotalRealPayChanging(value);
+ this.SendPropertyChanging();
+ this._TotalRealPay = value;
+ this.SendPropertyChanged("TotalRealPay");
+ this.OnTotalRealPayChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalRealPayRate", DbType="Decimal(9,2)")]
+ public System.Nullable TotalRealPayRate
+ {
+ get
+ {
+ return this._TotalRealPayRate;
+ }
+ set
+ {
+ if ((this._TotalRealPayRate != value))
+ {
+ this.OnTotalRealPayRateChanging(value);
+ this.SendPropertyChanging();
+ this._TotalRealPayRate = value;
+ this.SendPropertyChanged("TotalRealPayRate");
+ this.OnTotalRealPayRateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReportSubCost_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)]
+ public Base_Unit Base_Unit
+ {
+ get
+ {
+ return this._Base_Unit.Entity;
+ }
+ set
+ {
+ Base_Unit previousValue = this._Base_Unit.Entity;
+ if (((previousValue != value)
+ || (this._Base_Unit.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._Base_Unit.Entity = null;
+ previousValue.ZHGL_ConstructionMonthReportSubCost.Remove(this);
+ }
+ this._Base_Unit.Entity = value;
+ if ((value != null))
+ {
+ value.ZHGL_ConstructionMonthReportSubCost.Add(this);
+ this._UnitId = value.UnitId;
+ }
+ else
+ {
+ this._UnitId = default(string);
+ }
+ this.SendPropertyChanged("Base_Unit");
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_ZHGL_ConstructionMonthReportSubCost_ZHGL_ConstructionMonthReport", Storage="_ZHGL_ConstructionMonthReport", ThisKey="ConstructionMonthReportId", OtherKey="ConstructionMonthReportId", IsForeignKey=true)]
+ public ZHGL_ConstructionMonthReport ZHGL_ConstructionMonthReport
+ {
+ get
+ {
+ return this._ZHGL_ConstructionMonthReport.Entity;
+ }
+ set
+ {
+ ZHGL_ConstructionMonthReport previousValue = this._ZHGL_ConstructionMonthReport.Entity;
+ if (((previousValue != value)
+ || (this._ZHGL_ConstructionMonthReport.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._ZHGL_ConstructionMonthReport.Entity = null;
+ previousValue.ZHGL_ConstructionMonthReportSubCost.Remove(this);
+ }
+ this._ZHGL_ConstructionMonthReport.Entity = value;
+ if ((value != null))
+ {
+ value.ZHGL_ConstructionMonthReportSubCost.Add(this);
+ this._ConstructionMonthReportId = value.ConstructionMonthReportId;
+ }
+ else
+ {
+ this._ConstructionMonthReportId = default(string);
+ }
+ this.SendPropertyChanged("ZHGL_ConstructionMonthReport");
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.ZHGL_ConstructionPlan")]
public partial class ZHGL_ConstructionPlan : INotifyPropertyChanging, INotifyPropertyChanged
{