diff --git a/DataBase/版本日志/SGGLDB_WH_2024-04-17-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-04-17-bwj.sql new file mode 100644 index 00000000..d9f7c2f4 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-04-17-bwj.sql @@ -0,0 +1,76 @@ + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('CFD19410-DF80-494A-A2DD-D23A03438742','ѵ¼','CQMS/Comprehensive/TrainingRecords.aspx',105,'4a0e62cb-ee50-4a14-80b7-377602e9902c','Menu_CQMS',0,1,1) +go + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('5FE760BC-6496-42C2-8091-F9704DF0CCD2','CFD19410-DF80-494A-A2DD-D23A03438742','',1) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('93B46D7D-AAE0-4D27-A7D6-0A3DE875DAC3','CFD19410-DF80-494A-A2DD-D23A03438742','޸',2) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('7FC2CA0A-9D93-45BE-8A17-0FB17A644496','CFD19410-DF80-494A-A2DD-D23A03438742','ɾ',3) + insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + values('7F3CF7C1-9916-4F12-BBB6-CA892EDDD351','CFD19410-DF80-494A-A2DD-D23A03438742','',4) + go + +CREATE TABLE [dbo].[Comprehensive_TrainingRecords]( + [TrainingRecordsId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [TrainingContents] [nvarchar](100) NULL, + [CNProfessionalId] [nvarchar](50) NULL, + [TrainingObject] [nvarchar](50) NULL, + [TrainingAddress] [nvarchar](50) NULL, + [Hours] [decimal](18, 1) NULL, + [KeynoteSpeaker] [nvarchar](50) NULL, + [Remark] [nvarchar](50) NULL, + CONSTRAINT [PK_Comprehensive_TrainingRecords] PRIMARY KEY CLUSTERED +( + [TrainingRecordsId] 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].[Comprehensive_TrainingRecords] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_TrainingRecords_Base_CNProfessional] FOREIGN KEY([CNProfessionalId]) +REFERENCES [dbo].[Base_CNProfessional] ([CNProfessionalId]) +GO + +ALTER TABLE [dbo].[Comprehensive_TrainingRecords] CHECK CONSTRAINT [FK_Comprehensive_TrainingRecords_Base_CNProfessional] +GO + +ALTER TABLE [dbo].[Comprehensive_TrainingRecords] WITH CHECK ADD CONSTRAINT [FK_Comprehensive_TrainingRecords_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[Comprehensive_TrainingRecords] CHECK CONSTRAINT [FK_Comprehensive_TrainingRecords_Base_Project] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'TrainingRecordsId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @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'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'TrainingContents' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'רҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'CNProfessionalId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'TrainingObject' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѵַ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'TrainingAddress' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'Hours' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'KeynoteSpeaker' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords', @level2type=N'COLUMN',@level2name=N'Remark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ѵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_TrainingRecords' +GO + + diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index a2279f0b..a0b53214 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -246,6 +246,7 @@ + diff --git a/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs b/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs new file mode 100644 index 00000000..f9f008b1 --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/TrainingRecordsService.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 培训记录 + /// + public class TrainingRecordsService + { + /// + /// 根据主键获取培训记录 + /// + /// + /// + public static Model.Comprehensive_TrainingRecords GetTrainingRecordsById(string trainingRecordsId) + { + return Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(e => e.TrainingRecordsId == trainingRecordsId); + } + + /// + /// 添加培训记录 + /// + /// + public static void AddTrainingRecords(Model.Comprehensive_TrainingRecords trainingRecords) + { + Model.Comprehensive_TrainingRecords newTraining = new Model.Comprehensive_TrainingRecords + { + TrainingRecordsId = trainingRecords.TrainingRecordsId, + ProjectId = trainingRecords.ProjectId, + TrainingContents = trainingRecords.TrainingContents, + CNProfessionalId = trainingRecords.CNProfessionalId, + TrainingObject = trainingRecords.TrainingObject, + TrainingAddress = trainingRecords.TrainingAddress, + Hours = trainingRecords.Hours, + KeynoteSpeaker = trainingRecords.KeynoteSpeaker, + Remark = trainingRecords.Remark + }; + Funs.DB.Comprehensive_TrainingRecords.InsertOnSubmit(newTraining); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改培训记录 + /// + /// + public static void UpdateTrainingRecords(Model.Comprehensive_TrainingRecords trainingRecords) + { + Model.Comprehensive_TrainingRecords newTraining = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(e => e.TrainingRecordsId == trainingRecords.TrainingRecordsId); + if (newTraining != null) + { + newTraining.TrainingContents = trainingRecords.TrainingContents; + newTraining.CNProfessionalId = trainingRecords.CNProfessionalId; + newTraining.TrainingObject = trainingRecords.TrainingObject; + newTraining.TrainingAddress = trainingRecords.TrainingAddress; + newTraining.Hours = trainingRecords.Hours; + newTraining.KeynoteSpeaker = trainingRecords.KeynoteSpeaker; + newTraining.Remark = trainingRecords.Remark; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除培训记录 + /// + /// + public static void DeleteTrainingRecordsById(string trainingRecordsId) + { + Model.Comprehensive_TrainingRecords training = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(e => e.TrainingRecordsId == trainingRecordsId); + if (training != null) + { + Funs.DB.Comprehensive_TrainingRecords.DeleteOnSubmit(training); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx new file mode 100644 index 00000000..660d8410 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecords.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecords" %> + + + + + + + 培训记录 + + +
+
+
+
+ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs new file mode 100644 index 00000000..ffd327a9 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class TrainingRecords : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.designer.cs new file mode 100644 index 00000000..ea703d60 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.designer.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive { + + + public partial class TrainingRecords { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs index 791b6249..5bae9b6e 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs @@ -1344,7 +1344,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 10-1 土建 var TJInspection = reportItem.Where(x => x.ReType == "10-1").ToList(); - if (TJInspection.Count > 0) + if (TJInspection != null || TJInspection.Count > 0) { isYm = true; //whileIndex += 1; @@ -1472,7 +1472,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 10-2 设备 var SBInspection = reportItem.Where(x => x.ReType == "10-2").ToList(); - if (SBInspection.Count > 0) + if (SBInspection != null || SBInspection.Count > 0) { isYm = true; //whileIndex += 1; @@ -1600,7 +1600,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 10-3 管道 var GDInspection = reportItem.Where(x => x.ReType == "10-3").ToList(); - if (GDInspection.Count > 0) + if (GDInspection != null || GDInspection.Count > 0) { isYm = true; //whileIndex += 1; @@ -1728,7 +1728,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 10-4 电气 var DQInspection = reportItem.Where(x => x.ReType == "10-4").ToList(); - if (DQInspection.Count > 0) + if (DQInspection != null || DQInspection.Count > 0) { isYm = true; //whileIndex += 1; @@ -1856,7 +1856,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 10-5.仪表 var YBInspection = reportItem.Where(x => x.ReType == "10-5").ToList(); - if (YBInspection.Count > 0) + if (YBInspection != null || YBInspection.Count > 0) { isYm = true; //whileIndex += 1; @@ -1984,7 +1984,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 10-6.防腐 var FFInspection = reportItem.Where(x => x.ReType == "10-6").ToList(); - if (FFInspection.Count > 0) + if (FFInspection != null || FFInspection.Count > 0) { isYm = true; //whileIndex += 1; @@ -2112,7 +2112,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 10-7.消防 var XFInspection = reportItem.Where(x => x.ReType == "10-7").ToList(); - if (XFInspection.Count > 0) + if (XFInspection != null || XFInspection.Count > 0) { isYm = true; //whileIndex += 1; @@ -2240,7 +2240,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 10.总数 var InspectionDataInspection = reportItem.Where(x => x.ReType == "10").ToList(); - if (InspectionDataInspection.Count > 0) + if (InspectionDataInspection != null || InspectionDataInspection.Count > 0) { isYm = true; //whileIndex += 1; @@ -2260,48 +2260,67 @@ namespace FineUIPro.Web.CQMS.ManageReportNew } } numberIndex = 1; - decimal? num1 = 0, num2 = 0; - decimal MonthsCountstring = 0, ProjectCountstring = 0; + //decimal? num1 = 0, num2 = 0; + //decimal MonthsCountstring = 0, ProjectCountstring = 0; + int CheckNum = 0, OKNum = 0, TotalCheckNum = 0, TotalOKNum = 0; + string QuantitySum1 = String.Empty;//本月检查合格点数/本月检查点数 + string QuantitySum2 = String.Empty;//累计检查合格点数/累计检查点数 foreach (var item in InspectionDataInspection) { - if (!string.IsNullOrEmpty(item.RectificationRate)) + if (string.IsNullOrEmpty(item.RectificationRate)) { - MonthsCountstring = Convert.ToDecimal(item.RectificationRate.Replace("%", "")); - } - else { item.RectificationRate = "0%"; - MonthsCountstring= Convert.ToDecimal(item.RectificationRate.Replace("%", "")); } - if (!string.IsNullOrEmpty(item.TotationRate)) + if (string.IsNullOrEmpty(item.TotationRate)) { - ProjectCountstring = Convert.ToDecimal(item.TotationRate.Replace("%", "")); - } - else { item.TotationRate = "0%"; - ProjectCountstring = Convert.ToDecimal(item.TotationRate.Replace("%", "")); } //创建行 Row row = new Row(doc); row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1")); row.Cells.Add(CreateCell(item.ContentName, doc, table.FirstRow.Cells[1].CellFormat.Width)); - row.Cells.Add(CreateCell(item.RectificationRate.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width)); - row.Cells.Add(CreateCell(item.TotationRate.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width)); + row.Cells.Add(CreateCell(Convert.ToString(item.RectificationRate), doc, table.FirstRow.Cells[2].CellFormat.Width)); + row.Cells.Add(CreateCell(Convert.ToString(item.TotationRate), doc, table.FirstRow.Cells[3].CellFormat.Width)); row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width)); table.Rows.Insert(numberIndex, row); - num1 += MonthsCountstring; - num2 += ProjectCountstring; + //num1 += MonthsCountstring; + //num2 += ProjectCountstring; + CheckNum += Convert.ToInt32(item.MonthsCount); + OKNum += Convert.ToInt32(item.ProjectCount); + TotalCheckNum += Convert.ToInt32(item.MonthsBackCount); + TotalOKNum += Convert.ToInt32(item.TotalNoBackCount); + numberIndex += 1; } //自动设置表格样式 table.AutoFit(AutoFitBehavior.FixedColumnWidths); + + if (CheckNum != 0)//被除数不能为零 + { + QuantitySum1 = Math.Round((decimal)OKNum / (decimal)CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + QuantitySum1 = "0%"; + } + if (TotalCheckNum != 0)//被除数不能为零 + { + QuantitySum2 = Math.Round((decimal)TotalOKNum / (decimal)TotalCheckNum * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + QuantitySum2 = "0%"; + } + + //创建合计 Row rowhj = new Row(doc); rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[0].CellFormat.Width)); rowhj.Cells.Add(CreateCell("合计", doc, table.FirstRow.Cells[1].CellFormat.Width)); - rowhj.Cells.Add(CreateCell(num1.ToString() + "%", doc, table.FirstRow.Cells[2].CellFormat.Width)); - rowhj.Cells.Add(CreateCell(num2.ToString() + "%", doc, table.FirstRow.Cells[3].CellFormat.Width)); + rowhj.Cells.Add(CreateCell(QuantitySum1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width)); + rowhj.Cells.Add(CreateCell(QuantitySum2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width)); rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width)); table.Rows.Insert(numberIndex, rowhj); @@ -2473,7 +2492,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew rowhj.Cells.Add(CreateCell(num3.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width)); rowhj.Cells.Add(CreateCell(num1.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width)); rowhj.Cells.Add(CreateCell(num2.ToString(), doc, table.FirstRow.Cells[4].CellFormat.Width)); - rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[4].CellFormat.Width)); + rowhj.Cells.Add(CreateCell("", doc, table.FirstRow.Cells[5].CellFormat.Width)); table.Rows.Insert(numberIndex, rowhj); //自动设置表格样式 @@ -3026,8 +3045,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 设置页眉上的数据 whileIndex = 1; table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, 1, true); - //业主名称 - table.Rows[0].Cells[2].FirstParagraph.Runs[0].Text = unitsYz.UnitName; + if (unitsYz != null) + { + //业主名称 + table.Rows[0].Cells[2].FirstParagraph.Runs[0].Text = unitsYz.UnitName; + } //项目号 table.Rows[0].Cells[4].FirstParagraph.Runs[0].Text = pModel.ProjectCode; diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx index 7c94fc41..7b4bbc32 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx @@ -1318,6 +1318,18 @@ + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs index 4dabc220..7f406d21 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs @@ -2781,6 +2781,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //保存9.计量器具报验管理情况 saveMeasuringInspection(); //保存10.现场质量共检数据 + saveTjInspection(); + saveSbInspection(); + saveGDInspection(); + saveDQInspection(); + saveYBInspection(); + saveFFInspection(); + saveXFInspection(); saveInspectionDataInspection(); //保存11.压力管道监检情况 savePressureInspection(); @@ -3457,10 +3464,16 @@ namespace FineUIPro.Web.CQMS.ManageReportNew ReportId = ReportId, ReType = "10", ContentName = values.Value("WorkName"), - RectificationRate = values.Value("OneOKRate"), - TotationRate = values.Value("TotalOneOKRate"), + MonthsCount = values.Value("CheckNum"), //当前检查点数 + MonthsBackCount = values.Value("TotalCheckNum"),//累计点数 - Remarks = values.Value("Remarks"), + ProjectCount = values.Value("OKNum"),//当前合格点数 + TotalNoBackCount = values.Value("TotalOKNum"),//累计合格点数 + + RectificationRate = values.Value("OneOKRate"),//本月合格点数 + TotationRate = values.Value("TotalOneOKRate"), + Remarks = values.Value("Remarks"),//本月累计合格点数 + }; if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0) { diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportNewEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportNewEdit.aspx.cs index 9e1de78c..b57f6565 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportNewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportNewEdit.aspx.cs @@ -311,6 +311,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //保存9.计量器具报验管理情况 saveMeasuringInspection(); //保存10.现场质量共检数据 + saveTjInspection(); + saveSbInspection(); + saveGDInspection(); + saveDQInspection(); + saveYBInspection(); + saveFFInspection(); + saveXFInspection(); saveInspectionDataInspection(); //保存11.压力管道监检情况 savePressureInspection(); @@ -450,7 +457,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //加载13.特种设备监检情况 loadSpecialInspection(objType); ////加载14.NCR管理情况 - loadNcrManagementInspection(); + loadNcrManagementInspection(objType); //加载15.质量巡检情况 loadQualityInspection(objType); @@ -1083,7 +1090,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew /// /// NCR管理情况 /// - void loadNcrManagementInspection() + void loadNcrManagementInspection(string objType) { DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); @@ -1121,7 +1128,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew u.UnitId, u.UnitName, c.IssuedDate, - c.Status + c.Status, + c.ImplementationFrontState, }; var AllList = query.ToList(); @@ -1131,9 +1139,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew Model.NCRReportStatisc NCRStatisc = new Model.NCRReportStatisc(); NCRStatisc.Id = Guid.NewGuid().ToString(); NCRStatisc.WorkName = item.UnitName; - NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3"); - NCRStatisc.OKNum = AllList.Count(x => x.Status == "3"); + //NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Count(x => x.Status == "3"); + //NCRStatisc.OKNum = AllList.Count(x => x.Status == "3"); + NCRStatisc.CurrentPeriodOkNum = unitNCRStatic.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count(); + NCRStatisc.OKNum = AllList.Where(x => x.ImplementationFrontState.Trim().Equals("已闭合")).Count(); + NCRStatisc.CheckNum = AllList.Count(); + if (NCRStatisc.CheckNum != 0)//被除数不能为零 { NCRStatisc.OKRate = Math.Round((double)NCRStatisc.OKNum / (double)NCRStatisc.CheckNum * 100, 2) + "%";//保留两位小数、后四舍五入 @@ -1142,11 +1154,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew { NCRStatisc.OKRate = "0%"; } + StatisticsList.Add(NCRStatisc); CurrentPeriodOkNumSum += NCRStatisc.CurrentPeriodOkNum; OKNumSum += NCRStatisc.OKNum; - CheckNumSum += NCRStatisc.CheckNum; + CheckNumSum += NCRStatisc.CheckNum; i++; } @@ -1171,8 +1184,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew summary.Add("OKRate", OKRateSum.ToString()); gvNcrManagementInspection.SummaryData = summary; - } - #endregion + } + #endregion #region 15.质量巡检情况 gvQualityInspection方法 /// @@ -1590,6 +1603,246 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #endregion #region 10.现场质量共检数据 + void saveTjInspection() //检验批统计:土建 + { + List detailLists = new List(); + JArray teamGroupData = gvTj.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem + { + ReportId = ReportId, + ReType = "10-1", + ContentName = values.Value("WorkName"), + + MonthsCount = values.Value("CheckNum"), //当前检查点数 + MonthsBackCount = values.Value("TotalCheckNum"),//累计点数 + + ProjectCount = values.Value("OKNum"),//当前合格点数 + TotalNoBackCount = values.Value("TotalOKNum"),//累计合格点数 + + RectificationRate = values.Value("OneOKRate"),//本月合格点数 + Remarks = values.Value("TotalOneOKRate"),//本月累计合格点数 + }; + if (gvTj.Rows[rowIndex].DataKeys.Length > 0) + { + newDetail.Id = gvTj.Rows[rowIndex].DataKeys[0].ToString(); + } + detailLists.Add(newDetail); + } + if (detailLists.Count > 0) + { + Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists); + Funs.DB.SubmitChanges(); + } + } + void saveSbInspection() //检验批统计:设备 + { + List detailLists = new List(); + JArray teamGroupData = GvSb.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem + { + ReportId = ReportId, + ReType = "10-2", + ContentName = values.Value("WorkName"), + MonthsCount = values.Value("CheckNum"), //当前检查点数 + MonthsBackCount = values.Value("TotalCheckNum"),//累计点数 + + ProjectCount = values.Value("OKNum"),//当前合格点数 + TotalNoBackCount = values.Value("TotalOKNum"),//累计合格点数 + + RectificationRate = values.Value("OneOKRate"),//本月合格点数 + Remarks = values.Value("TotalOneOKRate"),//本月累计合格点数 + }; + if (GvSb.Rows[rowIndex].DataKeys.Length > 0) + { + newDetail.Id = GvSb.Rows[rowIndex].DataKeys[0].ToString(); + } + detailLists.Add(newDetail); + } + if (detailLists.Count > 0) + { + Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists); + Funs.DB.SubmitChanges(); + } + } + void saveGDInspection() //检验批统计:管道 + { + List detailLists = new List(); + JArray teamGroupData = GvGD.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem + { + ReportId = ReportId, + ReType = "10-3", + ContentName = values.Value("WorkName"), + MonthsCount = values.Value("CheckNum"), //当前检查点数 + MonthsBackCount = values.Value("TotalCheckNum"),//累计点数 + + ProjectCount = values.Value("OKNum"),//当前合格点数 + TotalNoBackCount = values.Value("TotalOKNum"),//累计合格点数 + + RectificationRate = values.Value("OneOKRate"),//本月合格点数 + Remarks = values.Value("TotalOneOKRate"),//本月累计合格点数 + }; + if (GvGD.Rows[rowIndex].DataKeys.Length > 0) + { + newDetail.Id = GvGD.Rows[rowIndex].DataKeys[0].ToString(); + } + detailLists.Add(newDetail); + } + if (detailLists.Count > 0) + { + Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists); + Funs.DB.SubmitChanges(); + } + } + + void saveDQInspection() //检验批统计:电气 + { + List detailLists = new List(); + JArray teamGroupData = GvDq.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem + { + ReportId = ReportId, + ReType = "10-4", + ContentName = values.Value("WorkName"), + MonthsCount = values.Value("CheckNum"), //当前检查点数 + MonthsBackCount = values.Value("TotalCheckNum"),//累计点数 + + ProjectCount = values.Value("OKNum"),//当前合格点数 + TotalNoBackCount = values.Value("TotalOKNum"),//累计合格点数 + + RectificationRate = values.Value("OneOKRate"),//本月合格点数 + Remarks = values.Value("TotalOneOKRate"),//本月累计合格点数 + }; + if (GvDq.Rows[rowIndex].DataKeys.Length > 0) + { + newDetail.Id = GvDq.Rows[rowIndex].DataKeys[0].ToString(); + } + detailLists.Add(newDetail); + } + if (detailLists.Count > 0) + { + Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists); + Funs.DB.SubmitChanges(); + } + } + void saveYBInspection() //检验批统计:仪表 + { + List detailLists = new List(); + JArray teamGroupData = GvYb.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem + { + ReportId = ReportId, + ReType = "10-5", + ContentName = values.Value("WorkName"), + MonthsCount = values.Value("CheckNum"), //当前检查点数 + MonthsBackCount = values.Value("TotalCheckNum"),//累计点数 + + ProjectCount = values.Value("OKNum"),//当前合格点数 + TotalNoBackCount = values.Value("TotalOKNum"),//累计合格点数 + + RectificationRate = values.Value("OneOKRate"),//本月合格点数 + Remarks = values.Value("TotalOneOKRate"),//本月累计合格点数 + }; + if (GvYb.Rows[rowIndex].DataKeys.Length > 0) + { + newDetail.Id = GvYb.Rows[rowIndex].DataKeys[0].ToString(); + } + detailLists.Add(newDetail); + } + if (detailLists.Count > 0) + { + Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists); + Funs.DB.SubmitChanges(); + } + } + void saveFFInspection() //检验批统计:防腐 + { + List detailLists = new List(); + JArray teamGroupData = GvFf.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem + { + ReportId = ReportId, + ReType = "10-6", + ContentName = values.Value("WorkName"), + MonthsCount = values.Value("CheckNum"), //当前检查点数 + MonthsBackCount = values.Value("TotalCheckNum"),//累计点数 + + ProjectCount = values.Value("OKNum"),//当前合格点数 + TotalNoBackCount = values.Value("TotalOKNum"),//累计合格点数 + + RectificationRate = values.Value("OneOKRate"),//本月合格点数 + Remarks = values.Value("TotalOneOKRate"),//本月累计合格点数 + }; + if (GvFf.Rows[rowIndex].DataKeys.Length > 0) + { + newDetail.Id = GvFf.Rows[rowIndex].DataKeys[0].ToString(); + } + detailLists.Add(newDetail); + } + if (detailLists.Count > 0) + { + Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists); + Funs.DB.SubmitChanges(); + } + } + void saveXFInspection() //检验批统计:消防 + { + List detailLists = new List(); + JArray teamGroupData = GvXf.GetMergedData(); + foreach (JObject teamGroupRow in teamGroupData) + { + JObject values = teamGroupRow.Value("values"); + int rowIndex = teamGroupRow.Value("index"); + Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem + { + ReportId = ReportId, + ReType = "10-7", + ContentName = values.Value("WorkName"), + MonthsCount = values.Value("CheckNum"), //当前检查点数 + MonthsBackCount = values.Value("TotalCheckNum"),//累计点数 + + ProjectCount = values.Value("OKNum"),//当前合格点数 + TotalNoBackCount = values.Value("TotalOKNum"),//累计合格点数 + + RectificationRate = values.Value("OneOKRate"),//本月合格点数 + Remarks = values.Value("TotalOneOKRate"),//本月累计合格点数 + }; + if (GvXf.Rows[rowIndex].DataKeys.Length > 0) + { + newDetail.Id = GvXf.Rows[rowIndex].DataKeys[0].ToString(); + } + detailLists.Add(newDetail); + } + if (detailLists.Count > 0) + { + Funs.DB.Report_CQMS_MonthReportItem.InsertAllOnSubmit(detailLists); + Funs.DB.SubmitChanges(); + } + } void saveInspectionDataInspection() { List detailLists = new List(); @@ -1602,11 +1855,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew { ReportId = ReportId, ReType = "10", - ContentName = values.Value("ContentName"), - MonthsCount = values.Value("MonthsCount"), - ProjectCount = values.Value("ProjectCount"), - //RectificationRate = values.Value("RectificationRate"), - Remarks = values.Value("Remarks") + ContentName = values.Value("WorkName"), + RectificationRate = values.Value("OneOKRate"), + TotationRate = values.Value("TotalOneOKRate"), + + Remarks = values.Value("Remarks"), }; if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0) { diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 220a1a5c..dba04c82 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -479,6 +479,7 @@ + @@ -7721,6 +7722,13 @@ SpecialEquipmentEdit.aspx + + TrainingRecords.aspx + ASPXCodeBehind + + + TrainingRecords.aspx + ConstructionStandardList.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index 63ca13cc..9e91deff 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true false diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index 963148f2..9fc55c34 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -12,7 +12,7 @@ - + @@ -77,7 +77,7 @@ - + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 98e0f115..b95a6e6d 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -614,6 +614,9 @@ namespace Model partial void InsertComprehensive_SpecialEquipmentApprove(Comprehensive_SpecialEquipmentApprove instance); partial void UpdateComprehensive_SpecialEquipmentApprove(Comprehensive_SpecialEquipmentApprove instance); partial void DeleteComprehensive_SpecialEquipmentApprove(Comprehensive_SpecialEquipmentApprove instance); + partial void InsertComprehensive_TrainingRecords(Comprehensive_TrainingRecords instance); + partial void UpdateComprehensive_TrainingRecords(Comprehensive_TrainingRecords instance); + partial void DeleteComprehensive_TrainingRecords(Comprehensive_TrainingRecords instance); partial void InsertCostGoods_CostManage(CostGoods_CostManage instance); partial void UpdateCostGoods_CostManage(CostGoods_CostManage instance); partial void DeleteCostGoods_CostManage(CostGoods_CostManage instance); @@ -4240,6 +4243,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_TrainingRecords + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table CostGoods_CostManage { get @@ -18719,6 +18730,8 @@ namespace Model private EntitySet _Comprehensive_SiteVisaManagement; + private EntitySet _Comprehensive_TrainingRecords; + private EntitySet _CQMS_DataBase_InspectionLot; private EntitySet _DataBase_StartWorkReport; @@ -18757,6 +18770,7 @@ namespace Model this._Comprehensive_MajorPlanApproval = new EntitySet(new Action(this.attach_Comprehensive_MajorPlanApproval), new Action(this.detach_Comprehensive_MajorPlanApproval)); this._Comprehensive_NCRManagement = new EntitySet(new Action(this.attach_Comprehensive_NCRManagement), new Action(this.detach_Comprehensive_NCRManagement)); this._Comprehensive_SiteVisaManagement = new EntitySet(new Action(this.attach_Comprehensive_SiteVisaManagement), new Action(this.detach_Comprehensive_SiteVisaManagement)); + this._Comprehensive_TrainingRecords = new EntitySet(new Action(this.attach_Comprehensive_TrainingRecords), new Action(this.detach_Comprehensive_TrainingRecords)); this._CQMS_DataBase_InspectionLot = new EntitySet(new Action(this.attach_CQMS_DataBase_InspectionLot), new Action(this.detach_CQMS_DataBase_InspectionLot)); this._DataBase_StartWorkReport = new EntitySet(new Action(this.attach_DataBase_StartWorkReport), new Action(this.detach_DataBase_StartWorkReport)); this._Doc_DocManage = new EntitySet(new Action(this.attach_Doc_DocManage), new Action(this.detach_Doc_DocManage)); @@ -18976,6 +18990,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_TrainingRecords_Base_CNProfessional", Storage="_Comprehensive_TrainingRecords", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_TrainingRecords + { + get + { + return this._Comprehensive_TrainingRecords; + } + set + { + this._Comprehensive_TrainingRecords.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_CQMS_DataBase_InspectionLot_Base_CNProfessional", Storage="_CQMS_DataBase_InspectionLot", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", DeleteRule="NO ACTION")] public EntitySet CQMS_DataBase_InspectionLot { @@ -19194,6 +19221,18 @@ namespace Model entity.Base_CNProfessional = null; } + private void attach_Comprehensive_TrainingRecords(Comprehensive_TrainingRecords entity) + { + this.SendPropertyChanging(); + entity.Base_CNProfessional = this; + } + + private void detach_Comprehensive_TrainingRecords(Comprehensive_TrainingRecords entity) + { + this.SendPropertyChanging(); + entity.Base_CNProfessional = null; + } + private void attach_CQMS_DataBase_InspectionLot(CQMS_DataBase_InspectionLot entity) { this.SendPropertyChanging(); @@ -26048,6 +26087,8 @@ namespace Model private EntitySet _Comprehensive_SpecialEquipment; + private EntitySet _Comprehensive_TrainingRecords; + private EntitySet _CostGoods_CostManage; private EntitySet _CostGoods_CostSmallDetail; @@ -26671,6 +26712,7 @@ namespace Model this._Comprehensive_QualityAccident = new EntitySet(new Action(this.attach_Comprehensive_QualityAccident), new Action(this.detach_Comprehensive_QualityAccident)); this._Comprehensive_SiteVisaManagement = new EntitySet(new Action(this.attach_Comprehensive_SiteVisaManagement), new Action(this.detach_Comprehensive_SiteVisaManagement)); this._Comprehensive_SpecialEquipment = new EntitySet(new Action(this.attach_Comprehensive_SpecialEquipment), new Action(this.detach_Comprehensive_SpecialEquipment)); + this._Comprehensive_TrainingRecords = new EntitySet(new Action(this.attach_Comprehensive_TrainingRecords), new Action(this.detach_Comprehensive_TrainingRecords)); this._CostGoods_CostManage = new EntitySet(new Action(this.attach_CostGoods_CostManage), new Action(this.detach_CostGoods_CostManage)); this._CostGoods_CostSmallDetail = new EntitySet(new Action(this.attach_CostGoods_CostSmallDetail), new Action(this.detach_CostGoods_CostSmallDetail)); this._CostGoods_Expense = new EntitySet(new Action(this.attach_CostGoods_Expense), new Action(this.detach_CostGoods_Expense)); @@ -28579,6 +28621,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_TrainingRecords_Base_Project", Storage="_Comprehensive_TrainingRecords", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Comprehensive_TrainingRecords + { + get + { + return this._Comprehensive_TrainingRecords; + } + set + { + this._Comprehensive_TrainingRecords.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_CostGoods_CostManage_Base_Project", Storage="_CostGoods_CostManage", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet CostGoods_CostManage { @@ -32399,6 +32454,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Comprehensive_TrainingRecords(Comprehensive_TrainingRecords entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Comprehensive_TrainingRecords(Comprehensive_TrainingRecords entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_CostGoods_CostManage(CostGoods_CostManage entity) { this.SendPropertyChanging(); @@ -101743,6 +101810,342 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_TrainingRecords")] + public partial class Comprehensive_TrainingRecords : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _TrainingRecordsId; + + private string _ProjectId; + + private string _TrainingContents; + + private string _CNProfessionalId; + + private string _TrainingObject; + + private string _TrainingAddress; + + private System.Nullable _Hours; + + private string _KeynoteSpeaker; + + private string _Remark; + + private EntityRef _Base_CNProfessional; + + private EntityRef _Base_Project; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnTrainingRecordsIdChanging(string value); + partial void OnTrainingRecordsIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnTrainingContentsChanging(string value); + partial void OnTrainingContentsChanged(); + partial void OnCNProfessionalIdChanging(string value); + partial void OnCNProfessionalIdChanged(); + partial void OnTrainingObjectChanging(string value); + partial void OnTrainingObjectChanged(); + partial void OnTrainingAddressChanging(string value); + partial void OnTrainingAddressChanged(); + partial void OnHoursChanging(System.Nullable value); + partial void OnHoursChanged(); + partial void OnKeynoteSpeakerChanging(string value); + partial void OnKeynoteSpeakerChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Comprehensive_TrainingRecords() + { + this._Base_CNProfessional = default(EntityRef); + this._Base_Project = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainingRecordsId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string TrainingRecordsId + { + get + { + return this._TrainingRecordsId; + } + set + { + if ((this._TrainingRecordsId != value)) + { + this.OnTrainingRecordsIdChanging(value); + this.SendPropertyChanging(); + this._TrainingRecordsId = value; + this.SendPropertyChanged("TrainingRecordsId"); + this.OnTrainingRecordsIdChanged(); + } + } + } + + [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="_TrainingContents", DbType="NVarChar(100)")] + public string TrainingContents + { + get + { + return this._TrainingContents; + } + set + { + if ((this._TrainingContents != value)) + { + this.OnTrainingContentsChanging(value); + this.SendPropertyChanging(); + this._TrainingContents = value; + this.SendPropertyChanged("TrainingContents"); + this.OnTrainingContentsChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CNProfessionalId", DbType="NVarChar(50)")] + public string CNProfessionalId + { + get + { + return this._CNProfessionalId; + } + set + { + if ((this._CNProfessionalId != value)) + { + if (this._Base_CNProfessional.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCNProfessionalIdChanging(value); + this.SendPropertyChanging(); + this._CNProfessionalId = value; + this.SendPropertyChanged("CNProfessionalId"); + this.OnCNProfessionalIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainingObject", DbType="NVarChar(50)")] + public string TrainingObject + { + get + { + return this._TrainingObject; + } + set + { + if ((this._TrainingObject != value)) + { + this.OnTrainingObjectChanging(value); + this.SendPropertyChanging(); + this._TrainingObject = value; + this.SendPropertyChanged("TrainingObject"); + this.OnTrainingObjectChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainingAddress", DbType="NVarChar(50)")] + public string TrainingAddress + { + get + { + return this._TrainingAddress; + } + set + { + if ((this._TrainingAddress != value)) + { + this.OnTrainingAddressChanging(value); + this.SendPropertyChanging(); + this._TrainingAddress = value; + this.SendPropertyChanged("TrainingAddress"); + this.OnTrainingAddressChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Hours", DbType="Decimal(18,1)")] + public System.Nullable Hours + { + get + { + return this._Hours; + } + set + { + if ((this._Hours != value)) + { + this.OnHoursChanging(value); + this.SendPropertyChanging(); + this._Hours = value; + this.SendPropertyChanged("Hours"); + this.OnHoursChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeynoteSpeaker", DbType="NVarChar(50)")] + public string KeynoteSpeaker + { + get + { + return this._KeynoteSpeaker; + } + set + { + if ((this._KeynoteSpeaker != value)) + { + this.OnKeynoteSpeakerChanging(value); + this.SendPropertyChanging(); + this._KeynoteSpeaker = value; + this.SendPropertyChanged("KeynoteSpeaker"); + this.OnKeynoteSpeakerChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(50)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_TrainingRecords_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] + public Base_CNProfessional Base_CNProfessional + { + get + { + return this._Base_CNProfessional.Entity; + } + set + { + Base_CNProfessional previousValue = this._Base_CNProfessional.Entity; + if (((previousValue != value) + || (this._Base_CNProfessional.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_CNProfessional.Entity = null; + previousValue.Comprehensive_TrainingRecords.Remove(this); + } + this._Base_CNProfessional.Entity = value; + if ((value != null)) + { + value.Comprehensive_TrainingRecords.Add(this); + this._CNProfessionalId = value.CNProfessionalId; + } + else + { + this._CNProfessionalId = default(string); + } + this.SendPropertyChanged("Base_CNProfessional"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_TrainingRecords_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.Comprehensive_TrainingRecords.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Comprehensive_TrainingRecords.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + 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.CostGoods_CostManage")] public partial class CostGoods_CostManage : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index bd497c6b..5fe155da 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true