20240417 质量月报

This commit is contained in:
毕文静 2024-04-17 15:00:48 +08:00
parent dd3878fd82
commit e3868bc164
15 changed files with 974 additions and 49 deletions

View File

@ -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

View File

@ -246,6 +246,7 @@
<Compile Include="CQMS\Check\SpotCheckService.cs" />
<Compile Include="CQMS\Check\TechnicalContactListApproveService.cs" />
<Compile Include="CQMS\Check\TechnicalContactListService.cs" />
<Compile Include="CQMS\Comprehensive\TrainingRecordsService.cs" />
<Compile Include="CQMS\DataBase\ConstructionStandardListProjectService.cs" />
<Compile Include="CQMS\DataBase\ConstructionStandardListService.cs" />
<Compile Include="CQMS\DataBase\DataTypeProjectService.cs" />

View File

@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 培训记录
/// </summary>
public class TrainingRecordsService
{
/// <summary>
/// 根据主键获取培训记录
/// </summary>
/// <param name="trainingRecordsId"></param>
/// <returns></returns>
public static Model.Comprehensive_TrainingRecords GetTrainingRecordsById(string trainingRecordsId)
{
return Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(e => e.TrainingRecordsId == trainingRecordsId);
}
/// <summary>
/// 添加培训记录
/// </summary>
/// <param name="trainingRecords"></param>
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();
}
/// <summary>
/// 修改培训记录
/// </summary>
/// <param name="trainingRecords"></param>
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();
}
}
/// <summary>
/// 根据主键删除培训记录
/// </summary>
/// <param name="trainingRecordsId"></param>
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();
}
}
}
}

View File

@ -0,0 +1,16 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TrainingRecords.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.TrainingRecords" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>培训记录</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>

View File

@ -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)
{
}
}
}

View File

@ -0,0 +1,24 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.Comprehensive {
public partial class TrainingRecords {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
}
}

View File

@ -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;

View File

@ -1318,6 +1318,18 @@
</f:TextBox>
</Editor>
</f:RenderField>
<f:RenderField Width="150px" ColumnID="CheckNum" DataField="CheckNum" Hidden="true"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="TotalCheckNum" DataField="TotalCheckNum" Hidden="true"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="累计">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="OKNum" DataField="OKNum" Hidden="true"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="本月">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="TotalOKNum" DataField="TotalOKNum" Hidden="true"
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" HeaderText="累计">
</f:RenderField>
</Columns>
</f:Grid>
</Items>

View File

@ -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<string>("WorkName"),
RectificationRate = values.Value<string>("OneOKRate"),
TotationRate = values.Value<string>("TotalOneOKRate"),
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
Remarks = values.Value<string>("Remarks"),
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
TotationRate = values.Value<string>("TotalOneOKRate"),
Remarks = values.Value<string>("Remarks"),//本月累计合格点数
};
if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
{

View File

@ -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
/// <summary>
/// NCR管理情况
/// </summary>
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方法
/// <summary>
@ -1590,6 +1603,246 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
#endregion
#region 10.
void saveTjInspection() //检验批统计:土建
{
List<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
JArray teamGroupData = gvTj.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
{
ReportId = ReportId,
ReType = "10-1",
ContentName = values.Value<string>("WorkName"),
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
Remarks = values.Value<string>("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<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
JArray teamGroupData = GvSb.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
{
ReportId = ReportId,
ReType = "10-2",
ContentName = values.Value<string>("WorkName"),
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
Remarks = values.Value<string>("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<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
JArray teamGroupData = GvGD.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
{
ReportId = ReportId,
ReType = "10-3",
ContentName = values.Value<string>("WorkName"),
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
Remarks = values.Value<string>("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<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
JArray teamGroupData = GvDq.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
{
ReportId = ReportId,
ReType = "10-4",
ContentName = values.Value<string>("WorkName"),
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
Remarks = values.Value<string>("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<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
JArray teamGroupData = GvYb.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
{
ReportId = ReportId,
ReType = "10-5",
ContentName = values.Value<string>("WorkName"),
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
Remarks = values.Value<string>("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<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
JArray teamGroupData = GvFf.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
{
ReportId = ReportId,
ReType = "10-6",
ContentName = values.Value<string>("WorkName"),
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
Remarks = values.Value<string>("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<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
JArray teamGroupData = GvXf.GetMergedData();
foreach (JObject teamGroupRow in teamGroupData)
{
JObject values = teamGroupRow.Value<JObject>("values");
int rowIndex = teamGroupRow.Value<int>("index");
Model.Report_CQMS_MonthReportItem newDetail = new Model.Report_CQMS_MonthReportItem
{
ReportId = ReportId,
ReType = "10-7",
ContentName = values.Value<string>("WorkName"),
MonthsCount = values.Value<int>("CheckNum"), //当前检查点数
MonthsBackCount = values.Value<int>("TotalCheckNum"),//累计点数
ProjectCount = values.Value<int>("OKNum"),//当前合格点数
TotalNoBackCount = values.Value<int>("TotalOKNum"),//累计合格点数
RectificationRate = values.Value<string>("OneOKRate"),//本月合格点数
Remarks = values.Value<string>("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<Model.Report_CQMS_MonthReportItem> detailLists = new List<Model.Report_CQMS_MonthReportItem>();
@ -1602,11 +1855,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew
{
ReportId = ReportId,
ReType = "10",
ContentName = values.Value<string>("ContentName"),
MonthsCount = values.Value<int>("MonthsCount"),
ProjectCount = values.Value<int>("ProjectCount"),
//RectificationRate = values.Value<string>("RectificationRate"),
Remarks = values.Value<string>("Remarks")
ContentName = values.Value<string>("WorkName"),
RectificationRate = values.Value<string>("OneOKRate"),
TotationRate = values.Value<string>("TotalOneOKRate"),
Remarks = values.Value<string>("Remarks"),
};
if (gvInspectionDataInspection.Rows[rowIndex].DataKeys.Length > 0)
{

View File

@ -479,6 +479,7 @@
<Content Include="CQMS\Comprehensive\SpecialEquipment.aspx" />
<Content Include="CQMS\Comprehensive\SpecialEquipmentApprove.aspx" />
<Content Include="CQMS\Comprehensive\SpecialEquipmentEdit.aspx" />
<Content Include="CQMS\Comprehensive\TrainingRecords.aspx" />
<Content Include="CQMS\DataBase\ConstructionStandardList.aspx" />
<Content Include="CQMS\DataBase\ConstructionStandardListEdit.aspx" />
<Content Include="CQMS\DataBase\ConstructionStandardListProject.aspx" />
@ -7721,6 +7722,13 @@
<Compile Include="CQMS\Comprehensive\SpecialEquipmentEdit.aspx.designer.cs">
<DependentUpon>SpecialEquipmentEdit.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\Comprehensive\TrainingRecords.aspx.cs">
<DependentUpon>TrainingRecords.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="CQMS\Comprehensive\TrainingRecords.aspx.designer.cs">
<DependentUpon>TrainingRecords.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\DataBase\ConstructionStandardList.aspx.cs">
<DependentUpon>ConstructionStandardList.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort />

View File

@ -12,7 +12,7 @@
<appSettings>
<!--连接字符串-->
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
@ -77,7 +77,7 @@
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<compilation debug="false" targetFramework="4.6.1"/>
<compilation debug="true" targetFramework="4.6.1"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>

View File

@ -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> Comprehensive_TrainingRecords
{
get
{
return this.GetTable<Comprehensive_TrainingRecords>();
}
}
public System.Data.Linq.Table<CostGoods_CostManage> CostGoods_CostManage
{
get
@ -18719,6 +18730,8 @@ namespace Model
private EntitySet<Comprehensive_SiteVisaManagement> _Comprehensive_SiteVisaManagement;
private EntitySet<Comprehensive_TrainingRecords> _Comprehensive_TrainingRecords;
private EntitySet<CQMS_DataBase_InspectionLot> _CQMS_DataBase_InspectionLot;
private EntitySet<DataBase_StartWorkReport> _DataBase_StartWorkReport;
@ -18757,6 +18770,7 @@ namespace Model
this._Comprehensive_MajorPlanApproval = new EntitySet<Comprehensive_MajorPlanApproval>(new Action<Comprehensive_MajorPlanApproval>(this.attach_Comprehensive_MajorPlanApproval), new Action<Comprehensive_MajorPlanApproval>(this.detach_Comprehensive_MajorPlanApproval));
this._Comprehensive_NCRManagement = new EntitySet<Comprehensive_NCRManagement>(new Action<Comprehensive_NCRManagement>(this.attach_Comprehensive_NCRManagement), new Action<Comprehensive_NCRManagement>(this.detach_Comprehensive_NCRManagement));
this._Comprehensive_SiteVisaManagement = new EntitySet<Comprehensive_SiteVisaManagement>(new Action<Comprehensive_SiteVisaManagement>(this.attach_Comprehensive_SiteVisaManagement), new Action<Comprehensive_SiteVisaManagement>(this.detach_Comprehensive_SiteVisaManagement));
this._Comprehensive_TrainingRecords = new EntitySet<Comprehensive_TrainingRecords>(new Action<Comprehensive_TrainingRecords>(this.attach_Comprehensive_TrainingRecords), new Action<Comprehensive_TrainingRecords>(this.detach_Comprehensive_TrainingRecords));
this._CQMS_DataBase_InspectionLot = new EntitySet<CQMS_DataBase_InspectionLot>(new Action<CQMS_DataBase_InspectionLot>(this.attach_CQMS_DataBase_InspectionLot), new Action<CQMS_DataBase_InspectionLot>(this.detach_CQMS_DataBase_InspectionLot));
this._DataBase_StartWorkReport = new EntitySet<DataBase_StartWorkReport>(new Action<DataBase_StartWorkReport>(this.attach_DataBase_StartWorkReport), new Action<DataBase_StartWorkReport>(this.detach_DataBase_StartWorkReport));
this._Doc_DocManage = new EntitySet<Doc_DocManage>(new Action<Doc_DocManage>(this.attach_Doc_DocManage), new Action<Doc_DocManage>(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> 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> 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> _Comprehensive_SpecialEquipment;
private EntitySet<Comprehensive_TrainingRecords> _Comprehensive_TrainingRecords;
private EntitySet<CostGoods_CostManage> _CostGoods_CostManage;
private EntitySet<CostGoods_CostSmallDetail> _CostGoods_CostSmallDetail;
@ -26671,6 +26712,7 @@ namespace Model
this._Comprehensive_QualityAccident = new EntitySet<Comprehensive_QualityAccident>(new Action<Comprehensive_QualityAccident>(this.attach_Comprehensive_QualityAccident), new Action<Comprehensive_QualityAccident>(this.detach_Comprehensive_QualityAccident));
this._Comprehensive_SiteVisaManagement = new EntitySet<Comprehensive_SiteVisaManagement>(new Action<Comprehensive_SiteVisaManagement>(this.attach_Comprehensive_SiteVisaManagement), new Action<Comprehensive_SiteVisaManagement>(this.detach_Comprehensive_SiteVisaManagement));
this._Comprehensive_SpecialEquipment = new EntitySet<Comprehensive_SpecialEquipment>(new Action<Comprehensive_SpecialEquipment>(this.attach_Comprehensive_SpecialEquipment), new Action<Comprehensive_SpecialEquipment>(this.detach_Comprehensive_SpecialEquipment));
this._Comprehensive_TrainingRecords = new EntitySet<Comprehensive_TrainingRecords>(new Action<Comprehensive_TrainingRecords>(this.attach_Comprehensive_TrainingRecords), new Action<Comprehensive_TrainingRecords>(this.detach_Comprehensive_TrainingRecords));
this._CostGoods_CostManage = new EntitySet<CostGoods_CostManage>(new Action<CostGoods_CostManage>(this.attach_CostGoods_CostManage), new Action<CostGoods_CostManage>(this.detach_CostGoods_CostManage));
this._CostGoods_CostSmallDetail = new EntitySet<CostGoods_CostSmallDetail>(new Action<CostGoods_CostSmallDetail>(this.attach_CostGoods_CostSmallDetail), new Action<CostGoods_CostSmallDetail>(this.detach_CostGoods_CostSmallDetail));
this._CostGoods_Expense = new EntitySet<CostGoods_Expense>(new Action<CostGoods_Expense>(this.attach_CostGoods_Expense), new Action<CostGoods_Expense>(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> 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> 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<decimal> _Hours;
private string _KeynoteSpeaker;
private string _Remark;
private EntityRef<Base_CNProfessional> _Base_CNProfessional;
private EntityRef<Base_Project> _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<decimal> 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<Base_CNProfessional>);
this._Base_Project = default(EntityRef<Base_Project>);
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<decimal> 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
{

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />