教育培训
公司级培训
-
0个
+
{{form?.monthReport?.branchTrainingNum}}个
项目级培训
-
0个
+
{{form?.monthReport?.projectTrainingNum}}个
班组级培训
-
0个
+
{{form?.monthReport?.teamGroupTrainingNum}}个
自行培训
-
0个
+
{{form?.monthReport?.selfTrainingNum}}个
承包商组织培训
-
0个
+
{{form?.monthReport?.contractorOrganizeTrainingNum}}个
承包商培训
-
0个
+
{{form?.monthReport?.contractorTrainingNum}}个
@@ -811,7 +811,10 @@
break
case "HazardFactorOccHealth"://职业健康危害因素
window.open('../DataShow/HazardFactorOccHealth.aspx')
- break
+ break
+ case "MonthReport": //教育培训
+ window.open('../ReportManage/SafeEnvBudget/HSEMonthReport.aspx')
+ break
}
$(".popu").show()
})
diff --git a/SGGL/FineUIPro.Web/common/main.aspx.cs b/SGGL/FineUIPro.Web/common/main.aspx.cs
index 5889002c..e0f06a5c 100644
--- a/SGGL/FineUIPro.Web/common/main.aspx.cs
+++ b/SGGL/FineUIPro.Web/common/main.aspx.cs
@@ -2,6 +2,7 @@
using FineUIPro.Web.DataShow;
using Model;
using NPOI.POIFS.Crypt.Dsig;
+using RestSharp.Extensions;
using System;
using System.Collections.Generic;
using System.Data;
@@ -117,6 +118,19 @@ namespace FineUIPro.Web.common
var largerRiskOcc = getHazardFactorOccHealthList.Where(x => x.Title == "较大风险").FirstOrDefault();
var majorRiskOcc = getHazardFactorOccHealthList.Where(x => x.Title == "重大风险").FirstOrDefault();
+ //教育培训
+ var monthReportList = (from x in Funs.DB.Report_HSEMonthReport select x).ToList();
+ if(!string.IsNullOrEmpty(hfUnitId))
+ {
+ monthReportList = monthReportList.Where(x => x.UnitId == hfUnitId).ToList();
+ }
+ int branchTraining = monthReportList.Sum(x => x.BranchTraining).Value;
+ int projectTraining = monthReportList.Sum(x => x.ProjectTraining).Value;
+ int teamGroupTraining = monthReportList.Sum(x => x.TeamGroupTraining).Value;
+ int selfTraining = monthReportList.Sum(x => x.SelfTraining).Value;
+ int contractorOrganizeTraining = monthReportList.Sum(x => x.ContractorOrganizeTraining).Value;
+ int contractorTraining = monthReportList.Sum(x => x.ContractorTraining).Value;
+
//构造返回数据
return new
{
@@ -183,6 +197,15 @@ namespace FineUIPro.Web.common
generalRiskNum = generalRiskOcc != null ? generalRiskOcc.Num : 0,
largerRiskNum = largerRiskOcc != null ? largerRiskOcc.Num : 0,
majorRiskNum = majorRiskOcc != null ? majorRiskOcc.Num : 0,
+ },
+ monthReport = new
+ {//教育培训
+ branchTrainingNum = branchTraining > 0 ? branchTraining : 0,
+ projectTrainingNum = projectTraining > 0 ? projectTraining : 0,
+ teamGroupTrainingNum = teamGroupTraining > 0 ? teamGroupTraining : 0,
+ selfTrainingNum = selfTraining > 0 ? selfTraining : 0,
+ contractorOrganizeTrainingNum = contractorOrganizeTraining > 0 ? contractorOrganizeTraining : 0,
+ contractorTrainingNum = contractorTraining > 0 ? contractorTraining : 0,
}
}
};
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index 2de199f1..73ca832e 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -2102,6 +2102,9 @@ namespace Model
partial void InsertReport_ConstructionProblems(Report_ConstructionProblems instance);
partial void UpdateReport_ConstructionProblems(Report_ConstructionProblems instance);
partial void DeleteReport_ConstructionProblems(Report_ConstructionProblems instance);
+ partial void InsertReport_HSEMonthReport(Report_HSEMonthReport instance);
+ partial void UpdateReport_HSEMonthReport(Report_HSEMonthReport instance);
+ partial void DeleteReport_HSEMonthReport(Report_HSEMonthReport instance);
partial void InsertReport_NextQualityControl(Report_NextQualityControl instance);
partial void UpdateReport_NextQualityControl(Report_NextQualityControl instance);
partial void DeleteReport_NextQualityControl(Report_NextQualityControl instance);
@@ -8295,6 +8298,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table
Report_HSEMonthReport
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table Report_NextQualityControl
{
get
@@ -45148,6 +45159,8 @@ namespace Model
private EntitySet _Report_ConstructionProblems;
+ private EntitySet _Report_HSEMonthReport;
+
private EntitySet _SafetyManagementData;
private EntitySet _SecuritySystem_SafetyOrganization;
@@ -45439,6 +45452,7 @@ namespace Model
this._QualityAudit_SubUnitQualityAuditDetail = new EntitySet(new Action(this.attach_QualityAudit_SubUnitQualityAuditDetail), new Action(this.detach_QualityAudit_SubUnitQualityAuditDetail));
this._RealName_SynchroSet = new EntitySet(new Action(this.attach_RealName_SynchroSet), new Action(this.detach_RealName_SynchroSet));
this._Report_ConstructionProblems = new EntitySet(new Action(this.attach_Report_ConstructionProblems), new Action(this.detach_Report_ConstructionProblems));
+ this._Report_HSEMonthReport = new EntitySet(new Action(this.attach_Report_HSEMonthReport), new Action(this.detach_Report_HSEMonthReport));
this._SafetyManagementData = new EntitySet(new Action(this.attach_SafetyManagementData), new Action(this.detach_SafetyManagementData));
this._SecuritySystem_SafetyOrganization = new EntitySet(new Action(this.attach_SecuritySystem_SafetyOrganization), new Action(this.detach_SecuritySystem_SafetyOrganization));
this._SitePerson_DayReportDetail_Bak = new EntitySet(new Action(this.attach_SitePerson_DayReportDetail_Bak), new Action(this.detach_SitePerson_DayReportDetail_Bak));
@@ -48203,6 +48217,19 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Report_HSEMonthReport_Base_Unit", Storage="_Report_HSEMonthReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")]
+ public EntitySet Report_HSEMonthReport
+ {
+ get
+ {
+ return this._Report_HSEMonthReport;
+ }
+ set
+ {
+ this._Report_HSEMonthReport.Assign(value);
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SafetyManagementData_Base_Unit", Storage="_SafetyManagementData", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")]
public EntitySet SafetyManagementData
{
@@ -50617,6 +50644,18 @@ namespace Model
entity.Base_Unit = null;
}
+ private void attach_Report_HSEMonthReport(Report_HSEMonthReport entity)
+ {
+ this.SendPropertyChanging();
+ entity.Base_Unit = this;
+ }
+
+ private void detach_Report_HSEMonthReport(Report_HSEMonthReport entity)
+ {
+ this.SendPropertyChanging();
+ entity.Base_Unit = null;
+ }
+
private void attach_SafetyManagementData(SafetyManagementData entity)
{
this.SendPropertyChanging();
@@ -156069,9 +156108,9 @@ namespace Model
private string _ProjectId;
- private System.Nullable _EnergySavingIndex;
+ private System.Nullable _EnergySavingIndex;
- private System.Nullable _WaterSavingIndex;
+ private System.Nullable _WaterSavingIndex;
private string _EnergySavingSchemes;
@@ -156083,13 +156122,13 @@ namespace Model
private string _SupportingDocuments;
- private System.Nullable _ActualEnergySaving;
+ private System.Nullable _ActualEnergySaving;
- private System.Nullable _ActualWaterSaving;
+ private System.Nullable _ActualWaterSaving;
- private System.Nullable _EnergySavingCompletionRate;
+ private System.Nullable _EnergySavingCompletionRate;
- private System.Nullable _WaterSavingCompletionRate;
+ private System.Nullable _WaterSavingCompletionRate;
private string _CompileMan;
@@ -156109,9 +156148,9 @@ namespace Model
partial void OnEnergyWaterConservationIdChanged();
partial void OnProjectIdChanging(string value);
partial void OnProjectIdChanged();
- partial void OnEnergySavingIndexChanging(System.Nullable value);
+ partial void OnEnergySavingIndexChanging(System.Nullable value);
partial void OnEnergySavingIndexChanged();
- partial void OnWaterSavingIndexChanging(System.Nullable value);
+ partial void OnWaterSavingIndexChanging(System.Nullable value);
partial void OnWaterSavingIndexChanged();
partial void OnEnergySavingSchemesChanging(string value);
partial void OnEnergySavingSchemesChanged();
@@ -156123,13 +156162,13 @@ namespace Model
partial void OnSummaryChanged();
partial void OnSupportingDocumentsChanging(string value);
partial void OnSupportingDocumentsChanged();
- partial void OnActualEnergySavingChanging(System.Nullable value);
+ partial void OnActualEnergySavingChanging(System.Nullable value);
partial void OnActualEnergySavingChanged();
- partial void OnActualWaterSavingChanging(System.Nullable value);
+ partial void OnActualWaterSavingChanging(System.Nullable value);
partial void OnActualWaterSavingChanged();
- partial void OnEnergySavingCompletionRateChanging(System.Nullable value);
+ partial void OnEnergySavingCompletionRateChanging(System.Nullable value);
partial void OnEnergySavingCompletionRateChanged();
- partial void OnWaterSavingCompletionRateChanging(System.Nullable value);
+ partial void OnWaterSavingCompletionRateChanging(System.Nullable value);
partial void OnWaterSavingCompletionRateChanged();
partial void OnCompileManChanging(string value);
partial void OnCompileManChanged();
@@ -156190,8 +156229,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EnergySavingIndex", DbType="Decimal(18,2)")]
- public System.Nullable EnergySavingIndex
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EnergySavingIndex", DbType="Int")]
+ public System.Nullable EnergySavingIndex
{
get
{
@@ -156210,8 +156249,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WaterSavingIndex", DbType="Decimal(18,2)")]
- public System.Nullable WaterSavingIndex
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WaterSavingIndex", DbType="Int")]
+ public System.Nullable WaterSavingIndex
{
get
{
@@ -156330,8 +156369,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActualEnergySaving", DbType="Decimal(18,2)")]
- public System.Nullable ActualEnergySaving
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActualEnergySaving", DbType="Int")]
+ public System.Nullable ActualEnergySaving
{
get
{
@@ -156350,8 +156389,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActualWaterSaving", DbType="Decimal(18,2)")]
- public System.Nullable ActualWaterSaving
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ActualWaterSaving", DbType="Int")]
+ public System.Nullable ActualWaterSaving
{
get
{
@@ -156370,8 +156409,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EnergySavingCompletionRate", DbType="Decimal(18,2)")]
- public System.Nullable EnergySavingCompletionRate
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EnergySavingCompletionRate", DbType="Int")]
+ public System.Nullable EnergySavingCompletionRate
{
get
{
@@ -156390,8 +156429,8 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WaterSavingCompletionRate", DbType="Decimal(18,2)")]
- public System.Nullable WaterSavingCompletionRate
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WaterSavingCompletionRate", DbType="Int")]
+ public System.Nullable WaterSavingCompletionRate
{
get
{
@@ -334520,6 +334559,582 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Report_HSEMonthReport")]
+ public partial class Report_HSEMonthReport : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _ReportId;
+
+ private string _UnitId;
+
+ private System.DateTime _ReportDate;
+
+ private System.Nullable _TotalEmployees;
+
+ private System.Nullable _TotalHours;
+
+ private System.Nullable _ContractorEmployees;
+
+ private System.Nullable _ContractorHours;
+
+ private System.Nullable _MonthHours;
+
+ private System.Nullable _MonthHoursAvg;
+
+ private System.Nullable _YearHours;
+
+ private string _Remark;
+
+ private System.Nullable _BranchTraining;
+
+ private System.Nullable _ProjectTraining;
+
+ private System.Nullable _TeamGroupTraining;
+
+ private System.Nullable _SelfTraining;
+
+ private System.Nullable _ContractorOrganizeTraining;
+
+ private System.Nullable _ContractorTraining;
+
+ private string _CompileMan;
+
+ private System.Nullable _CompileDate;
+
+ private EntityRef _Base_Unit;
+
+ private EntityRef _Sys_User;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnReportIdChanging(string value);
+ partial void OnReportIdChanged();
+ partial void OnUnitIdChanging(string value);
+ partial void OnUnitIdChanged();
+ partial void OnReportDateChanging(System.DateTime value);
+ partial void OnReportDateChanged();
+ partial void OnTotalEmployeesChanging(System.Nullable value);
+ partial void OnTotalEmployeesChanged();
+ partial void OnTotalHoursChanging(System.Nullable value);
+ partial void OnTotalHoursChanged();
+ partial void OnContractorEmployeesChanging(System.Nullable value);
+ partial void OnContractorEmployeesChanged();
+ partial void OnContractorHoursChanging(System.Nullable value);
+ partial void OnContractorHoursChanged();
+ partial void OnMonthHoursChanging(System.Nullable value);
+ partial void OnMonthHoursChanged();
+ partial void OnMonthHoursAvgChanging(System.Nullable value);
+ partial void OnMonthHoursAvgChanged();
+ partial void OnYearHoursChanging(System.Nullable value);
+ partial void OnYearHoursChanged();
+ partial void OnRemarkChanging(string value);
+ partial void OnRemarkChanged();
+ partial void OnBranchTrainingChanging(System.Nullable value);
+ partial void OnBranchTrainingChanged();
+ partial void OnProjectTrainingChanging(System.Nullable value);
+ partial void OnProjectTrainingChanged();
+ partial void OnTeamGroupTrainingChanging(System.Nullable value);
+ partial void OnTeamGroupTrainingChanged();
+ partial void OnSelfTrainingChanging(System.Nullable value);
+ partial void OnSelfTrainingChanged();
+ partial void OnContractorOrganizeTrainingChanging(System.Nullable value);
+ partial void OnContractorOrganizeTrainingChanged();
+ partial void OnContractorTrainingChanging(System.Nullable value);
+ partial void OnContractorTrainingChanged();
+ partial void OnCompileManChanging(string value);
+ partial void OnCompileManChanged();
+ partial void OnCompileDateChanging(System.Nullable value);
+ partial void OnCompileDateChanged();
+ #endregion
+
+ public Report_HSEMonthReport()
+ {
+ this._Base_Unit = default(EntityRef);
+ this._Sys_User = default(EntityRef);
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string ReportId
+ {
+ get
+ {
+ return this._ReportId;
+ }
+ set
+ {
+ if ((this._ReportId != value))
+ {
+ this.OnReportIdChanging(value);
+ this.SendPropertyChanging();
+ this._ReportId = value;
+ this.SendPropertyChanged("ReportId");
+ this.OnReportIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
+ public string UnitId
+ {
+ get
+ {
+ return this._UnitId;
+ }
+ set
+ {
+ if ((this._UnitId != value))
+ {
+ if (this._Base_Unit.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnUnitIdChanging(value);
+ this.SendPropertyChanging();
+ this._UnitId = value;
+ this.SendPropertyChanged("UnitId");
+ this.OnUnitIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime NOT NULL")]
+ public System.DateTime ReportDate
+ {
+ get
+ {
+ return this._ReportDate;
+ }
+ set
+ {
+ if ((this._ReportDate != value))
+ {
+ this.OnReportDateChanging(value);
+ this.SendPropertyChanging();
+ this._ReportDate = value;
+ this.SendPropertyChanged("ReportDate");
+ this.OnReportDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalEmployees", DbType="Int")]
+ public System.Nullable TotalEmployees
+ {
+ get
+ {
+ return this._TotalEmployees;
+ }
+ set
+ {
+ if ((this._TotalEmployees != value))
+ {
+ this.OnTotalEmployeesChanging(value);
+ this.SendPropertyChanging();
+ this._TotalEmployees = value;
+ this.SendPropertyChanged("TotalEmployees");
+ this.OnTotalEmployeesChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalHours", DbType="Decimal(18,2)")]
+ public System.Nullable TotalHours
+ {
+ get
+ {
+ return this._TotalHours;
+ }
+ set
+ {
+ if ((this._TotalHours != value))
+ {
+ this.OnTotalHoursChanging(value);
+ this.SendPropertyChanging();
+ this._TotalHours = value;
+ this.SendPropertyChanged("TotalHours");
+ this.OnTotalHoursChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorEmployees", DbType="Int")]
+ public System.Nullable ContractorEmployees
+ {
+ get
+ {
+ return this._ContractorEmployees;
+ }
+ set
+ {
+ if ((this._ContractorEmployees != value))
+ {
+ this.OnContractorEmployeesChanging(value);
+ this.SendPropertyChanging();
+ this._ContractorEmployees = value;
+ this.SendPropertyChanged("ContractorEmployees");
+ this.OnContractorEmployeesChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorHours", DbType="Decimal(18,2)")]
+ public System.Nullable ContractorHours
+ {
+ get
+ {
+ return this._ContractorHours;
+ }
+ set
+ {
+ if ((this._ContractorHours != value))
+ {
+ this.OnContractorHoursChanging(value);
+ this.SendPropertyChanging();
+ this._ContractorHours = value;
+ this.SendPropertyChanged("ContractorHours");
+ this.OnContractorHoursChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthHours", DbType="Decimal(18,2)")]
+ public System.Nullable MonthHours
+ {
+ get
+ {
+ return this._MonthHours;
+ }
+ set
+ {
+ if ((this._MonthHours != value))
+ {
+ this.OnMonthHoursChanging(value);
+ this.SendPropertyChanging();
+ this._MonthHours = value;
+ this.SendPropertyChanged("MonthHours");
+ this.OnMonthHoursChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthHoursAvg", DbType="Decimal(18,2)")]
+ public System.Nullable MonthHoursAvg
+ {
+ get
+ {
+ return this._MonthHoursAvg;
+ }
+ set
+ {
+ if ((this._MonthHoursAvg != value))
+ {
+ this.OnMonthHoursAvgChanging(value);
+ this.SendPropertyChanging();
+ this._MonthHoursAvg = value;
+ this.SendPropertyChanged("MonthHoursAvg");
+ this.OnMonthHoursAvgChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearHours", DbType="Decimal(18,2)")]
+ public System.Nullable YearHours
+ {
+ get
+ {
+ return this._YearHours;
+ }
+ set
+ {
+ if ((this._YearHours != value))
+ {
+ this.OnYearHoursChanging(value);
+ this.SendPropertyChanging();
+ this._YearHours = value;
+ this.SendPropertyChanged("YearHours");
+ this.OnYearHoursChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")]
+ 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.ColumnAttribute(Storage="_BranchTraining", DbType="Int")]
+ public System.Nullable BranchTraining
+ {
+ get
+ {
+ return this._BranchTraining;
+ }
+ set
+ {
+ if ((this._BranchTraining != value))
+ {
+ this.OnBranchTrainingChanging(value);
+ this.SendPropertyChanging();
+ this._BranchTraining = value;
+ this.SendPropertyChanged("BranchTraining");
+ this.OnBranchTrainingChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectTraining", DbType="Int")]
+ public System.Nullable ProjectTraining
+ {
+ get
+ {
+ return this._ProjectTraining;
+ }
+ set
+ {
+ if ((this._ProjectTraining != value))
+ {
+ this.OnProjectTrainingChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectTraining = value;
+ this.SendPropertyChanged("ProjectTraining");
+ this.OnProjectTrainingChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TeamGroupTraining", DbType="Int")]
+ public System.Nullable TeamGroupTraining
+ {
+ get
+ {
+ return this._TeamGroupTraining;
+ }
+ set
+ {
+ if ((this._TeamGroupTraining != value))
+ {
+ this.OnTeamGroupTrainingChanging(value);
+ this.SendPropertyChanging();
+ this._TeamGroupTraining = value;
+ this.SendPropertyChanged("TeamGroupTraining");
+ this.OnTeamGroupTrainingChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SelfTraining", DbType="Int")]
+ public System.Nullable SelfTraining
+ {
+ get
+ {
+ return this._SelfTraining;
+ }
+ set
+ {
+ if ((this._SelfTraining != value))
+ {
+ this.OnSelfTrainingChanging(value);
+ this.SendPropertyChanging();
+ this._SelfTraining = value;
+ this.SendPropertyChanged("SelfTraining");
+ this.OnSelfTrainingChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorOrganizeTraining", DbType="Int")]
+ public System.Nullable ContractorOrganizeTraining
+ {
+ get
+ {
+ return this._ContractorOrganizeTraining;
+ }
+ set
+ {
+ if ((this._ContractorOrganizeTraining != value))
+ {
+ this.OnContractorOrganizeTrainingChanging(value);
+ this.SendPropertyChanging();
+ this._ContractorOrganizeTraining = value;
+ this.SendPropertyChanged("ContractorOrganizeTraining");
+ this.OnContractorOrganizeTrainingChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorTraining", DbType="Int")]
+ public System.Nullable ContractorTraining
+ {
+ get
+ {
+ return this._ContractorTraining;
+ }
+ set
+ {
+ if ((this._ContractorTraining != value))
+ {
+ this.OnContractorTrainingChanging(value);
+ this.SendPropertyChanging();
+ this._ContractorTraining = value;
+ this.SendPropertyChanged("ContractorTraining");
+ this.OnContractorTrainingChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
+ public string CompileMan
+ {
+ get
+ {
+ return this._CompileMan;
+ }
+ set
+ {
+ if ((this._CompileMan != value))
+ {
+ if (this._Sys_User.HasLoadedOrAssignedValue)
+ {
+ throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
+ }
+ this.OnCompileManChanging(value);
+ this.SendPropertyChanging();
+ this._CompileMan = value;
+ this.SendPropertyChanged("CompileMan");
+ this.OnCompileManChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")]
+ public System.Nullable CompileDate
+ {
+ get
+ {
+ return this._CompileDate;
+ }
+ set
+ {
+ if ((this._CompileDate != value))
+ {
+ this.OnCompileDateChanging(value);
+ this.SendPropertyChanging();
+ this._CompileDate = value;
+ this.SendPropertyChanged("CompileDate");
+ this.OnCompileDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Report_HSEMonthReport_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)]
+ public Base_Unit Base_Unit
+ {
+ get
+ {
+ return this._Base_Unit.Entity;
+ }
+ set
+ {
+ Base_Unit previousValue = this._Base_Unit.Entity;
+ if (((previousValue != value)
+ || (this._Base_Unit.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._Base_Unit.Entity = null;
+ previousValue.Report_HSEMonthReport.Remove(this);
+ }
+ this._Base_Unit.Entity = value;
+ if ((value != null))
+ {
+ value.Report_HSEMonthReport.Add(this);
+ this._UnitId = value.UnitId;
+ }
+ else
+ {
+ this._UnitId = default(string);
+ }
+ this.SendPropertyChanged("Base_Unit");
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Report_HSEMonthReport_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)]
+ public Sys_User Sys_User
+ {
+ get
+ {
+ return this._Sys_User.Entity;
+ }
+ set
+ {
+ Sys_User previousValue = this._Sys_User.Entity;
+ if (((previousValue != value)
+ || (this._Sys_User.HasLoadedOrAssignedValue == false)))
+ {
+ this.SendPropertyChanging();
+ if ((previousValue != null))
+ {
+ this._Sys_User.Entity = null;
+ previousValue.Report_HSEMonthReport.Remove(this);
+ }
+ this._Sys_User.Entity = value;
+ if ((value != null))
+ {
+ value.Report_HSEMonthReport.Add(this);
+ this._CompileMan = value.UserId;
+ }
+ else
+ {
+ this._CompileMan = default(string);
+ }
+ this.SendPropertyChanged("Sys_User");
+ }
+ }
+ }
+
+ 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.Report_NextQualityControl")]
public partial class Report_NextQualityControl : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -375743,6 +376358,8 @@ namespace Model
private EntitySet _QualityAudit_SubUnitQualityAuditDetail;
+ private EntitySet _Report_HSEMonthReport;
+
private EntitySet _SafetyData_SafetyDataItem;
private EntitySet _SafetyManagementData;
@@ -376258,6 +376875,7 @@ namespace Model
this._QualityAudit_SafePersonQuality = new EntitySet(new Action(this.attach_QualityAudit_SafePersonQuality), new Action(this.detach_QualityAudit_SafePersonQuality));
this._QualityAudit_SafePersonQuality_Sys_User_AuditorId = new EntitySet(new Action(this.attach_QualityAudit_SafePersonQuality_Sys_User_AuditorId), new Action(this.detach_QualityAudit_SafePersonQuality_Sys_User_AuditorId));
this._QualityAudit_SubUnitQualityAuditDetail = new EntitySet(new Action(this.attach_QualityAudit_SubUnitQualityAuditDetail), new Action(this.detach_QualityAudit_SubUnitQualityAuditDetail));
+ this._Report_HSEMonthReport = new EntitySet(new Action(this.attach_Report_HSEMonthReport), new Action(this.detach_Report_HSEMonthReport));
this._SafetyData_SafetyDataItem = new EntitySet(new Action(this.attach_SafetyData_SafetyDataItem), new Action(this.detach_SafetyData_SafetyDataItem));
this._SafetyManagementData = new EntitySet(new Action(this.attach_SafetyManagementData), new Action(this.detach_SafetyManagementData));
this._SitePerson_DayReport_Bak = new EntitySet(new Action(this.attach_SitePerson_DayReport_Bak), new Action(this.detach_SitePerson_DayReport_Bak));
@@ -381245,6 +381863,19 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Report_HSEMonthReport_Sys_User", Storage="_Report_HSEMonthReport", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
+ public EntitySet Report_HSEMonthReport
+ {
+ get
+ {
+ return this._Report_HSEMonthReport;
+ }
+ set
+ {
+ this._Report_HSEMonthReport.Assign(value);
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_SafetyData_SafetyDataItem_Sys_User", Storage="_SafetyData_SafetyDataItem", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
public EntitySet SafetyData_SafetyDataItem
{
@@ -385480,6 +386111,18 @@ namespace Model
entity.Sys_User = null;
}
+ private void attach_Report_HSEMonthReport(Report_HSEMonthReport entity)
+ {
+ this.SendPropertyChanging();
+ entity.Sys_User = this;
+ }
+
+ private void detach_Report_HSEMonthReport(Report_HSEMonthReport entity)
+ {
+ this.SendPropertyChanging();
+ entity.Sys_User = null;
+ }
+
private void attach_SafetyData_SafetyDataItem(SafetyData_SafetyDataItem entity)
{
this.SendPropertyChanging();
@@ -456606,6 +457249,8 @@ namespace Model
private string _PersonName;
+ private System.Nullable _Score;
+
private string _Sex;
private string _SexName;
@@ -456820,6 +457465,22 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Score", DbType="Int")]
+ public System.Nullable Score
+ {
+ get
+ {
+ return this._Score;
+ }
+ set
+ {
+ if ((this._Score != value))
+ {
+ this._Score = value;
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Sex", DbType="Char(1)")]
public string Sex
{
@@ -458137,6 +458798,8 @@ namespace Model
private string _PersonName;
+ private System.Nullable _Score;
+
private string _UnitId;
private string _UnitName;
@@ -458299,6 +458962,22 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Score", DbType="Int")]
+ public System.Nullable Score
+ {
+ get
+ {
+ return this._Score;
+ }
+ set
+ {
+ if ((this._Score != value))
+ {
+ this._Score = value;
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")]
public string UnitId
{