From 932623e732dc39b259762192f725c4b2deda3130 Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Thu, 19 Jan 2023 13:26:14 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=8B=89=E5=8F=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/ErrLog.txt | 90 +++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 95367a24..83878e9b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -190,3 +190,93 @@ System.InvalidOperationException: 可为空的对象必须具有一个值。 在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) 在 System.Nullable`1.get_Value() 在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284 + +错误信息开始=====> +错误类型:OutOfMemoryException +错误信息:引发类型为“System.OutOfMemoryException”的异常。 +错误堆栈: + 在 System.Data.SqlTypes.SqlBinary.get_Value() + 在 System.Data.SqlClient.SqlBuffer.get_ByteArray() + 在 System.Data.SqlClient.SqlBuffer.get_Value() + 在 System.Data.SqlClient.SqlDataReader.GetValueFromSqlBufferInternal(SqlBuffer data, _SqlMetaData metaData) + 在 System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i) + 在 System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) + 在 Read_Person_Persons(ObjectMaterializer`1 ) + 在 System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext() + 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) + 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) + 在 BLL.Person_PersonsService.GetUserListByProjectIdUnitIdRoleId(String projectId, String unitIds, String roleIds) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 572 + 在 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropDownList dropName, String projectId, String unitId, String roleIds, Boolean isShowPlease) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 1267 + 在 FineUIPro.Web.ProjectData.ProjectSetSave.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ProjectData\ProjectSetSave.aspx.cs:行号 42 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:01/19/2023 12:49:49 +出错文件:http://localhost:4909/ProjectData/ProjectSetSave.aspx +IP地址:::1 +操作人员:JT + +出错时间:01/19/2023 12:49:49 + + +错误信息开始=====> +错误类型:OutOfMemoryException +错误信息:引发类型为“System.OutOfMemoryException”的异常。 +错误堆栈: + 在 System.Data.SqlTypes.SqlBinary.get_Value() + 在 System.Data.SqlClient.SqlBuffer.get_ByteArray() + 在 System.Data.SqlClient.SqlBuffer.get_Value() + 在 System.Data.SqlClient.SqlDataReader.GetValueFromSqlBufferInternal(SqlBuffer data, _SqlMetaData metaData) + 在 System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i) + 在 System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) + 在 Read_Person_Persons(ObjectMaterializer`1 ) + 在 System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext() + 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) + 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) + 在 BLL.Person_PersonsService.GetUserListByProjectIdUnitIdRoleId(String projectId, String unitIds, String roleIds) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 572 + 在 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropDownList dropName, String projectId, String unitId, String roleIds, Boolean isShowPlease) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 1267 + 在 FineUIPro.Web.ProjectData.ProjectSetSave.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ProjectData\ProjectSetSave.aspx.cs:行号 44 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:01/19/2023 12:56:37 +出错文件:http://localhost:4909/ProjectData/ProjectSetSave.aspx +IP地址:::1 +操作人员:JT + +出错时间:01/19/2023 12:56:37 + + +错误信息开始=====> +错误类型:OutOfMemoryException +错误信息:引发类型为“System.OutOfMemoryException”的异常。 +错误堆栈: + 在 System.Data.SqlClient.TdsParser.TryReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj, SqlCommandColumnEncryptionSetting columnEncryptionOverride, String columnName) + 在 System.Data.SqlClient.SqlDataReader.TryReadColumnData() + 在 System.Data.SqlClient.SqlDataReader.TryReadColumnInternal(Int32 i, Boolean readHeaderOnly) + 在 System.Data.SqlClient.SqlDataReader.TryReadColumn(Int32 i, Boolean setTimeout, Boolean allowPartiallyReadColumn) + 在 System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i) + 在 System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) + 在 Read_Person_Persons(ObjectMaterializer`1 ) + 在 System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext() + 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) + 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) + 在 BLL.Person_PersonsService.GetUserListByProjectIdUnitIdRoleId(String projectId, String unitIds, String roleIds) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 572 + 在 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropDownList dropName, String projectId, String unitId, String roleIds, Boolean isShowPlease) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 1267 + 在 FineUIPro.Web.ProjectData.ProjectSetSave.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ProjectData\ProjectSetSave.aspx.cs:行号 44 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:01/19/2023 13:22:05 +出错文件:http://localhost:4909/ProjectData/ProjectSetSave.aspx +IP地址:::1 +操作人员:JT + +出错时间:01/19/2023 13:22:05 + From 62a83bec92ae6896e271fb3f82ec35b0671c0d20 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Thu, 19 Jan 2023 16:02:23 +0800 Subject: [PATCH 2/9] 20230119 --- SGGL/BLL/Person/Person_PersonsService.cs | 3 +- SGGL/BLL/ProjectData/ProjectService.cs | 34 +++- .../FineUIPro.Web/AttachFile/webuploader.aspx | 2 +- SGGL/FineUIPro.Web/ErrLog.txt | 192 ------------------ .../FineUIPro.Web/ProjectData/ProjectSet.aspx | 2 +- .../ProjectData/ProjectSetSave.aspx | 16 +- .../ProjectData/ProjectSetSave.aspx.cs | 28 ++- .../ProjectSetSave.aspx.designer.cs | 142 ++++++------- 8 files changed, 136 insertions(+), 283 deletions(-) diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs index 4c2334bf..db55b90a 100644 --- a/SGGL/BLL/Person/Person_PersonsService.cs +++ b/SGGL/BLL/Person/Person_PersonsService.cs @@ -550,7 +550,7 @@ namespace BLL { var getPersons = from x in db.Person_Persons where x.PersonId != Const.hfnbdId && x.PersonId != Const.sedinId - && (x.IsPost == true || !x.IsPost.HasValue) && x.Account != null + && (x.IsPost == true || !x.IsPost.HasValue) && x.Account != null select x; if (listUnitIds.Count() > 0) { @@ -1262,6 +1262,7 @@ namespace BLL /// 是否显示请选择 public static void InitUserProjectIdUnitIdRoleIdDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitId, string roleIds, bool isShowPlease) { + dropName.Items.Clear(); dropName.DataValueField = "PersonId"; dropName.DataTextField = "PersonName"; dropName.DataSource = Person_PersonsService.GetUserListByProjectIdUnitIdRoleId(projectId, unitId, roleIds); diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index dd9afc14..166ecb02 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -163,12 +163,36 @@ /// public static void DeleteProject(string projectId) { - SGGLDB db = Funs.DB; - Base_Project project = db.Base_Project.FirstOrDefault(e => e.ProjectId == projectId); - if (project != null) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - db.Base_Project.DeleteOnSubmit(project); - db.SubmitChanges(); + Base_Project project = db.Base_Project.FirstOrDefault(e => e.ProjectId == projectId); + if (project != null) + { + var getSitePerson_PersonItem = from x in db.SitePerson_PersonItem where x.ProjectId == projectId select x; + if (getSitePerson_PersonItem.Count() > 0) + { + db.SitePerson_PersonItem.DeleteAllOnSubmit(getSitePerson_PersonItem); + db.SubmitChanges(); + } + var getSitePerson_Person = from x in db.SitePerson_Person where x.ProjectId == projectId select x; + if (getSitePerson_Person.Count() > 0) + { + db.SitePerson_Person.DeleteAllOnSubmit(getSitePerson_Person); + db.SubmitChanges(); + } + var getPerson_Persons = from x in db.Person_Persons where x.CurrentProjectId == projectId select x; + if (getPerson_Persons.Count() > 0) + { + foreach (var item in getPerson_Persons) + { + item.CurrentProjectId = null; + db.SubmitChanges(); + } + } + ProjectUnitService.DeleteProjectUnitByProjectId(project.ProjectId); + db.Base_Project.DeleteOnSubmit(project); + db.SubmitChanges(); + } } } diff --git a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx index c94f5572..10baea49 100644 --- a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx +++ b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx @@ -87,7 +87,7 @@ owner: '<%= ParamStr%>' }, // 单个文件大小限制(单位:byte),这里限制为 800M - fileSingleSizeLimit: 800 * 1024 * 1024 + fileSingleSizeLimit: 6000 * 1024 * 1024 }); diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 95367a24..e69de29b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,192 +0,0 @@ - -错误信息开始=====> -错误类型:IndexOutOfRangeException -错误信息:无法找到列 WeldJointNum。 -错误堆栈: - 在 System.Data.DataTable.ParseSortString(String sortString) - 在 System.Data.DataView.CheckSort(String sort) - 在 System.Data.DataView.set_Sort(String value) - 在 FineUIPro.Web.PageBase.GetPagedDataTable(Grid Grid1, DataTable tb) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\common\PageBase.cs:行号 497 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.BindGrid(List`1 weldingDailyItem) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 246 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 68 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 17:13:10 -出错文件:http://localhost:4909/HJGL/WeldingManage/WeldReportEdit.aspx?WeldingDailyId=7a2cf1c3-6253-4705-b2ed-208af534369b -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 17:13:10 - - -错误信息开始=====> -错误类型:SqlException -错误信息:列名 'WeldJointNum' 无效。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate) - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.BindGrid(List`1 weldingDailyItem) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 209 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 68 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 17:20:43 -出错文件:http://localhost:4909/HJGL/WeldingManage/WeldReportEdit.aspx?WeldingDailyId=b58f14b3-6886-4b85-9d5e-cd7fec8c25b0 -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 17:20:43 - - -错误信息开始=====> -错误类型:SqlException -错误信息:列名 'WeldJointNum' 无效。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate) - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.BindGrid(List`1 weldingDailyItem) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 209 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 68 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 17:23:11 -出错文件:http://localhost:4909/HJGL/WeldingManage/WeldReportEdit.aspx?WeldingDailyId=7a2cf1c3-6253-4705-b2ed-208af534369b -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 17:23:11 - - -错误信息开始=====> -错误类型:SqlException -错误信息:列名 'WeldJointNum' 无效。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate) - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.BindGrid(List`1 weldingDailyItem) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 209 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 68 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 17:33:50 -出错文件:http://localhost:4909/HJGL/WeldingManage/WeldReportEdit.aspx?WeldingDailyId=7a2cf1c3-6253-4705-b2ed-208af534369b -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 17:33:50 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.InitTreeMenu() 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 180 - 在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 158 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 21:31:26 -出错文件:http://localhost:4909/HJGL/WeldingManage/SelectTaskWeldJoint.aspx?strList=476d4c23-155c-47c4-9cf8-8158034b0a1d%7C1af885ff-b778-46c6-a13d-a21b304ac835%7C2022-12-01 -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 21:31:26 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.HJGL.PreDesign.PrePipeline.InitTreeMenu() 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\PreDesign\PrePipeline.aspx.cs:行号 84 - 在 FineUIPro.Web.HJGL.PreDesign.PrePipeline.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\PreDesign\PrePipeline.aspx.cs:行号 23 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 22:15:59 -出错文件:http://localhost:4909/HJGL/PreDesign/PrePipeline.aspx -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 22:15:59 - -System.InvalidOperationException: 可为空的对象必须具有一个值。 - 在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) - 在 System.Nullable`1.get_Value() - 在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284 -System.InvalidOperationException: 可为空的对象必须具有一个值。 - 在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) - 在 System.Nullable`1.get_Value() - 在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284 -System.InvalidOperationException: 可为空的对象必须具有一个值。 - 在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) - 在 System.Nullable`1.get_Value() - 在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284 -System.InvalidOperationException: 可为空的对象必须具有一个值。 - 在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) - 在 System.Nullable`1.get_Value() - 在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284 diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx index 0225bace..da68cb66 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx @@ -115,7 +115,7 @@ diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx index 4a1dd89b..3cf66773 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx @@ -55,6 +55,14 @@ + + + + + + + - - - - - - - + diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs index 2caffa5c..6f09fc71 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs @@ -2,6 +2,7 @@ using Model; using System; using System.Linq; +using System.ServiceModel; using System.Text.RegularExpressions; namespace FineUIPro.Web.ProjectData @@ -36,12 +37,7 @@ namespace FineUIPro.Web.ProjectData ProjectTypeService.InitProjectTypeDropDownList(this.drpProjectType, true); ProjectTypeService.InitProvinceDropDownList(this.drpProvince, true); this.ProjectId = Request.QueryString["ProjectId"]; - ///项目经理 - Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpProjectManager, null, null, null, true); - ///施工经理 - Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpConstructionManager, null, null, null, true); - ///安全经理 - Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpHSSEManager, null, null, null, true); + UnitService.InitBranchUnitDropDownList(this.drpUnit, true, true); this.drpUnit.SelectedValue = Const.UnitId_SEDIN; if (!String.IsNullOrEmpty(this.ProjectId)) @@ -104,6 +100,10 @@ namespace FineUIPro.Web.ProjectData this.txtEnglishRemark.Text = project.EnglishRemark; } } + else + { + this.initProjectRoles(); + } } } @@ -267,5 +267,21 @@ namespace FineUIPro.Web.ProjectData this.drpProvince.Required = true; } } + + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + this.initProjectRoles(); + } + + protected void initProjectRoles() + { + string unitId = this.drpUnit.SelectedValue == Const._Null ? Const.UnitId_SEDIN : this.drpUnit.SelectedValue; + ///项目经理 + Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpProjectManager, null, unitId, null, true); + ///施工经理 + Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpConstructionManager, null, unitId, null, true); + ///安全经理 + Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.drpHSSEManager, null, unitId, null, true); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs index bb309124..1782f86b 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.ProjectData { - - - public partial class ProjectSetSave { - +namespace FineUIPro.Web.ProjectData +{ + + + public partial class ProjectSetSave + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtProjectName 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtProjectName; - + /// /// txtProjectCode 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtProjectCode; - + /// /// txtShortName 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtShortName; - + /// /// drpProjectType 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProjectType; - + /// /// drpProjectState 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProjectState; - + /// /// txtStartDate 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStartDate; - + /// /// txtEndDate 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtEndDate; - + /// /// txtContractNo 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtContractNo; - + /// /// txtDuration 控件。 /// @@ -119,43 +121,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtDuration; - - /// - /// drpProjectManager 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpProjectManager; - - /// - /// drpConstructionManager 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpConstructionManager; - - /// - /// drpHSSEManager 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpHSSEManager; - - /// - /// txtProjectAddress 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtProjectAddress; - + /// /// drpUnit 控件。 /// @@ -164,7 +130,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// ckbIsForeign 控件。 /// @@ -173,7 +139,43 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbIsForeign; - + + /// + /// drpProjectManager 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProjectManager; + + /// + /// drpConstructionManager 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpConstructionManager; + + /// + /// drpHSSEManager 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpHSSEManager; + + /// + /// txtProjectAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectAddress; + /// /// txtWorkRange 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtWorkRange; - + /// /// txtRemark 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtRemark; - + /// /// txtProjectMoney 控件。 /// @@ -200,7 +202,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtProjectMoney; - + /// /// txtConstructionMoney 控件。 /// @@ -209,7 +211,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtConstructionMoney; - + /// /// txtTelephone 控件。 /// @@ -218,7 +220,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtTelephone; - + /// /// txtCountry 控件。 /// @@ -227,7 +229,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCountry; - + /// /// drpProvince 控件。 /// @@ -236,7 +238,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProvince; - + /// /// txtCity 控件。 /// @@ -245,7 +247,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCity; - + /// /// txtMapCoordinates 控件。 /// @@ -254,7 +256,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtMapCoordinates; - + /// /// bottomPanel 控件。 /// @@ -263,7 +265,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ContentPanel bottomPanel; - + /// /// txtEnglishRemark 控件。 /// @@ -272,7 +274,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtEnglishRemark; - + /// /// Toolbar1 控件。 /// @@ -281,7 +283,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ckIsUpTotalMonth 控件。 /// @@ -290,7 +292,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckIsUpTotalMonth; - + /// /// btnSave 控件。 /// @@ -299,7 +301,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnClose 控件。 /// @@ -308,7 +310,7 @@ namespace FineUIPro.Web.ProjectData { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// hdCompileMan 控件。 /// From 9f956d999cb4b51cc277e8665bb2af99b2604451 Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Thu, 19 Jan 2023 16:19:39 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E9=A1=B5=E9=9D=A2=E4=BA=BA=E5=91=98=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E6=A1=86=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs index 6f09fc71..8428b24b 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs @@ -69,6 +69,11 @@ namespace FineUIPro.Web.ProjectData { this.drpProjectType.SelectedValue = project.ProjectType; } + if (!string.IsNullOrEmpty(project.UnitId)) + { + this.drpUnit.SelectedValue = project.UnitId; + } + this.initProjectRoles(); ///项目经理 this.drpProjectManager.SelectedValue = SitePerson_PersonService.GetPersonIdByProjectIdRoleID(this.ProjectId, Const.ProjectManager); ///施工经理 @@ -77,10 +82,7 @@ namespace FineUIPro.Web.ProjectData this.drpHSSEManager.SelectedValue = SitePerson_PersonService.GetPersonIdByProjectIdRoleID(this.ProjectId, Const.HSSEManager); this.drpProjectState.SelectedValue = project.ProjectState; - if (!string.IsNullOrEmpty(project.UnitId)) - { - this.drpUnit.SelectedValue = project.UnitId; - } + this.ckIsUpTotalMonth.Checked = project.IsUpTotalMonth.Value; if (project.IsForeign == true) From ccc4bc8a2854c56e87b7166e5bd2d48adb4a7cb9 Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Fri, 20 Jan 2023 09:55:57 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=A2=9E=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs index 3b53869a..7bb76685 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPersonEdit.aspx.cs @@ -713,6 +713,7 @@ namespace FineUIPro.Web.Person } else { + newProjectPerson.PersonId = this.PersonId; this.SitePersonId = newProjectPerson.SitePersonId = SQLHelper.GetNewID(); SitePerson_PersonService.AddSitePerson(newProjectPerson); LogService.AddSys_Log(this.CurrUser, newProjectPerson.IdentityCard, newProjectPerson.SitePersonId, BLL.Const.ProjectPersonMenuId, BLL.Const.BtnAdd); From 2b93bbd98d97f6fd642cf05788a2cecdb72d88bf Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Thu, 2 Feb 2023 15:13:20 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E7=BA=A7=E4=BA=94=E5=BC=A0=E6=8A=A5=E8=A1=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...DB_V2023-01-29_gaofei_迁移五张报表功能脚本.sql | 1761 +++ .../0-5综合管理(Menu_ZHGL).sql | 103 + SGGL/BLL/BLL.csproj | 12 + SGGL/BLL/Common/Const.cs | 19 + SGGL/BLL/Common/ProjectDataFlowSetService.cs | 16 + SGGL/BLL/WebService/CNCECHSSEWebService.cs | 5594 +++++++ SGGL/BLL/WebService/FileStructService.cs | 107 + .../AccidentCauseReportItemService.cs | 181 + .../Information/AccidentCauseReportService.cs | 154 + ...rillConductedQuarterlyReportItemService.cs | 124 + .../DrillConductedQuarterlyReportService.cs | 113 + .../DrillPlanHalfYearReportItemService.cs | 103 + .../DrillPlanHalfYearReportService.cs | 116 + .../MillionsMonthlyReportItemService.cs | 195 + .../MillionsMonthlyReportService.cs | 120 + .../SafetyQuarterlyReportService.cs | 267 + .../BLL/ZHGL/Information/UrgeReportService.cs | 43 + SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 216 + .../ZHGL/DataIn/AccidentCauseReportBar.aspx | 16 + .../DataIn/AccidentCauseReportBar.aspx.cs | 778 + .../AccidentCauseReportBar.aspx.designer.cs | 33 + .../ZHGL/DataIn/AccidentCauseReportBarIn.aspx | 15 + .../DataIn/AccidentCauseReportBarIn.aspx.cs | 432 + .../AccidentCauseReportBarIn.aspx.designer.cs | 33 + .../DataIn/AccidentCauseReportImport.aspx | 326 + .../DataIn/AccidentCauseReportImport.aspx.cs | 428 + ...AccidentCauseReportImport.aspx.designer.cs | 159 + .../DrillConductedQuarterlyReportBar.aspx | 16 + .../DrillConductedQuarterlyReportBar.aspx.cs | 362 + ...nductedQuarterlyReportBar.aspx.designer.cs | 33 + .../DrillConductedQuarterlyReportBarIn.aspx | 15 + ...DrillConductedQuarterlyReportBarIn.aspx.cs | 219 + ...uctedQuarterlyReportBarIn.aspx.designer.cs | 33 + .../DrillConductedQuarterlyReportImport.aspx | 178 + ...rillConductedQuarterlyReportImport.aspx.cs | 381 + ...ctedQuarterlyReportImport.aspx.designer.cs | 159 + .../DataIn/DrillPlanHalfYearReportBar.aspx | 16 + .../DataIn/DrillPlanHalfYearReportBar.aspx.cs | 181 + ...rillPlanHalfYearReportBar.aspx.designer.cs | 33 + .../DataIn/DrillPlanHalfYearReportBarIn.aspx | 15 + .../DrillPlanHalfYearReportBarIn.aspx.cs | 155 + ...llPlanHalfYearReportBarIn.aspx.designer.cs | 33 + .../DataIn/DrillPlanHalfYearReportImport.aspx | 153 + .../DrillPlanHalfYearReportImport.aspx.cs | 391 + ...lPlanHalfYearReportImport.aspx.designer.cs | 168 + .../ZHGL/DataIn/MillionsMonthlyReportBar.aspx | 16 + .../DataIn/MillionsMonthlyReportBar.aspx.cs | 580 + .../MillionsMonthlyReportBar.aspx.designer.cs | 33 + .../DataIn/MillionsMonthlyReportBarIn.aspx | 15 + .../DataIn/MillionsMonthlyReportBarIn.aspx.cs | 312 + ...illionsMonthlyReportBarIn.aspx.designer.cs | 33 + .../DataIn/MillionsMonthlyReportImport.aspx | 235 + .../MillionsMonthlyReportImport.aspx.cs | 490 + ...llionsMonthlyReportImport.aspx.designer.cs | 159 + .../ZHGL/DataIn/SafetyQuarterlyReportBar.aspx | 16 + .../DataIn/SafetyQuarterlyReportBar.aspx.cs | 634 + .../SafetyQuarterlyReportBar.aspx.designer.cs | 33 + .../DataIn/SafetyQuarterlyReportBarIn.aspx | 16 + .../DataIn/SafetyQuarterlyReportBarIn.aspx.cs | 395 + ...afetyQuarterlyReportBarIn.aspx.designer.cs | 33 + .../DataIn/SafetyQuarterlyReportImport.aspx | 301 + .../SafetyQuarterlyReportImport.aspx.cs | 410 + ...fetyQuarterlyReportImport.aspx.designer.cs | 159 + .../ZHGL/Information/AccidentCauseReport.aspx | 360 + .../Information/AccidentCauseReport.aspx.cs | 795 + .../AccidentCauseReport.aspx.designer.cs | 366 + .../Information/AccidentCauseReportSave.aspx | 520 + .../AccidentCauseReportSave.aspx.cs | 1015 ++ .../AccidentCauseReportSave.aspx.designer.cs | 915 ++ .../DrillConductedQuarterlyReport.aspx | 219 + .../DrillConductedQuarterlyReport.aspx.cs | 748 + ...lConductedQuarterlyReport.aspx.designer.cs | 321 + .../DrillConductedQuarterlyReportAdd.aspx | 228 + .../DrillConductedQuarterlyReportAdd.aspx.cs | 610 + ...nductedQuarterlyReportAdd.aspx.designer.cs | 294 + .../Information/DrillPlanHalfYearReport.aspx | 158 + .../DrillPlanHalfYearReport.aspx.cs | 590 + .../DrillPlanHalfYearReport.aspx.designer.cs | 330 + .../DrillPlanHalfYearReportAdd.aspx | 130 + .../DrillPlanHalfYearReportAdd.aspx.cs | 603 + ...rillPlanHalfYearReportAdd.aspx.designer.cs | 213 + .../Information/MillionsMonthlyReport.aspx | 311 + .../Information/MillionsMonthlyReport.aspx.cs | 764 + .../MillionsMonthlyReport.aspx.designer.cs | 366 + .../MillionsMonthlyReportSave.aspx | 397 + .../MillionsMonthlyReportSave.aspx.cs | 993 ++ ...MillionsMonthlyReportSave.aspx.designer.cs | 456 + .../ZHGL/Information/ReportAuditSee.aspx | 48 + .../ZHGL/Information/ReportAuditSee.aspx.cs | 63 + .../ReportAuditSee.aspx.designer.cs | 51 + .../ZHGL/Information/ReportSubmit.aspx | 83 + .../ZHGL/Information/ReportSubmit.aspx.cs | 259 + .../Information/ReportSubmit.aspx.designer.cs | 123 + .../Information/SafetyQuarterlyReport.aspx | 136 + .../Information/SafetyQuarterlyReport.aspx.cs | 632 + .../SafetyQuarterlyReport.aspx.designer.cs | 357 + .../SafetyQuarterlyReportEdit.aspx | 419 + .../SafetyQuarterlyReportEdit.aspx.cs | 1470 ++ ...SafetyQuarterlyReportEdit.aspx.designer.cs | 852 + SGGL/Model/Model.cs | 13093 +++++++++++++++- 100 files changed, 47158 insertions(+), 5 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-01-29_gaofei_迁移五张报表功能脚本.sql create mode 100644 SGGL/BLL/WebService/CNCECHSSEWebService.cs create mode 100644 SGGL/BLL/WebService/FileStructService.cs create mode 100644 SGGL/BLL/ZHGL/Information/AccidentCauseReportItemService.cs create mode 100644 SGGL/BLL/ZHGL/Information/AccidentCauseReportService.cs create mode 100644 SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportItemService.cs create mode 100644 SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportService.cs create mode 100644 SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportItemService.cs create mode 100644 SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportService.cs create mode 100644 SGGL/BLL/ZHGL/Information/MillionsMonthlyReportItemService.cs create mode 100644 SGGL/BLL/ZHGL/Information/MillionsMonthlyReportService.cs create mode 100644 SGGL/BLL/ZHGL/Information/SafetyQuarterlyReportService.cs create mode 100644 SGGL/BLL/ZHGL/Information/UrgeReportService.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_V2023-01-29_gaofei_迁移五张报表功能脚本.sql b/DataBase/版本日志/SGGLDB_V2023-01-29_gaofei_迁移五张报表功能脚本.sql new file mode 100644 index 00000000..63d95172 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-01-29_gaofei_迁移五张报表功能脚本.sql @@ -0,0 +1,1761 @@ + +--ȫ() +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','ȫϢϱ','',32,'0','Menu_ZHGL',1,0,1) +GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('3156A9F0-276D-4AD4-BF84-45CF6DFC215C','ʱȫͳ±','ZHGL/Information/MillionsMonthlyReport.aspx',10,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8C0E3DDA-8883-4A8E-B288-C009B807C39D','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8C720351-FD57-4C2D-9FCB-C8BB7FE48E65','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9084F09C-AA75-42B4-8357-6CDD0661CE8D','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('00C79282-699E-4CCA-988E-1F36671C2F37','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1889FE33-E72D-4E70-B51D-2AE411E08693','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','沢ϱ',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('08C103D2-6DB3-435E-A3DC-0C1F99CC51FF','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','ύ',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AE5A454F-578E-4C52-969B-20AB87006A73','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('88D736EA-3ADC-4100-B17E-A1A1F16D9D2A','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','ӡ',8) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('4BC71D2E-7D94-48C1-A61A-139637825AA5','ְ¹ԭ','ZHGL/Information/AccidentCauseReport.aspx',20,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9D7EDCF0-32CD-4BB6-AA0F-6914E2B0F2D1','4BC71D2E-7D94-48C1-A61A-139637825AA5','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('FB9C1CDD-3CB8-4AEC-B940-563B3BA59E17','4BC71D2E-7D94-48C1-A61A-139637825AA5','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('FABAAF0B-C618-43B7-907A-217B6A1E5F6E','4BC71D2E-7D94-48C1-A61A-139637825AA5','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('385833BA-BD03-4DB2-9380-C76395368782','4BC71D2E-7D94-48C1-A61A-139637825AA5','',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('34472641-62F3-4E40-BEB3-770C3D833D03','4BC71D2E-7D94-48C1-A61A-139637825AA5','沢ϱ',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1CBB8571-E8D1-4EE0-AB08-4C3305BE27C6','4BC71D2E-7D94-48C1-A61A-139637825AA5','ύ',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A71F1236-204F-4B34-B887-19B31CE56F63','4BC71D2E-7D94-48C1-A61A-139637825AA5','',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C90343CD-4DBE-4C3B-BEDD-888C9B514F8B','4BC71D2E-7D94-48C1-A61A-139637825AA5','ӡ',8) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','ȫݼ','ZHGL/Information/SafetyQuarterlyReport.aspx',30,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AD2043D6-871F-47FE-B6CC-0CA5CD50C0BA','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('19657A9D-6AEB-47BA-BC3F-B916C68B515B','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('07E601FD-AE73-4F2B-A9D2-613B34ED654A','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D3BBA6C4-4D71-4533-9A47-9459AA30C2D2','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('90ED2D85-1184-4E46-8832-8C1215B6C59D','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','沢ϱ',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BED22C29-BA30-4BD2-A244-8588F2A0635B','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C4922011-37CD-4B79-820A-D8CAAE39144D','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','ӡ',7) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('7985C759-8EB9-4B7D-AC65-00541280B46C','Ӧչ','ZHGL/Information/DrillConductedQuarterlyReport.aspx',40,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3D866C54-0A39-4A56-B771-7F3C63CF6A32','7985C759-8EB9-4B7D-AC65-00541280B46C','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F65F199A-5D28-42D0-B08F-390376CAAC31','7985C759-8EB9-4B7D-AC65-00541280B46C','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7FA97C99-A026-4934-95AC-50FF173B889D','7985C759-8EB9-4B7D-AC65-00541280B46C','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1689FECD-6F18-4B1E-8190-706F2124B4C6','7985C759-8EB9-4B7D-AC65-00541280B46C','',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6358C4DD-5B0E-4DB5-8FD1-AED403EF1D43','7985C759-8EB9-4B7D-AC65-00541280B46C','沢ϱ',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C1E0471F-568C-4B85-ADED-FCDD27F8C3DA','7985C759-8EB9-4B7D-AC65-00541280B46C','ύ',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('5231B22C-BF0B-478B-92DD-1C1B30BC7270','7985C759-8EB9-4B7D-AC65-00541280B46C','',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('25A11FB5-AB22-42CC-9E94-29FF9221B25B','7985C759-8EB9-4B7D-AC65-00541280B46C','ӡ',8) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('70DEB27A-D6FF-4D57-879B-0270F2967FA0','Ӧƻ걨','ZHGL/Information/DrillPlanHalfYearReport.aspx',50,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A034BF05-9859-4920-97F0-20190D94E6F4','70DEB27A-D6FF-4D57-879B-0270F2967FA0','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A821D1EC-5E54-4386-80E8-D1718CF00E7D','70DEB27A-D6FF-4D57-879B-0270F2967FA0','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6345E13D-F311-4839-927E-ADEF36D7CB5E','70DEB27A-D6FF-4D57-879B-0270F2967FA0','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A4115079-DDEC-4B42-836D-4B79B999E011','70DEB27A-D6FF-4D57-879B-0270F2967FA0','',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DE6CADAC-6981-45F6-BF19-0BFC6F1F2AFE','70DEB27A-D6FF-4D57-879B-0270F2967FA0','沢ϱ',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C495E44F-DF2C-4071-829C-8C06DA30F9FE','70DEB27A-D6FF-4D57-879B-0270F2967FA0','ύ',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F287B0ED-D725-4CD3-B422-5319112F452B','70DEB27A-D6FF-4D57-879B-0270F2967FA0','',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('30F188D4-84D4-4D3C-8ECE-B499ACB1C3C8','70DEB27A-D6FF-4D57-879B-0270F2967FA0','ӡ',8) + GO + + +CREATE TABLE [dbo].[Information_AccidentCauseReport]( + [AccidentCauseReportId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [AccidentCauseReportCode] [nvarchar](50) NULL, + [Year] [int] NULL, + [Month] [int] NULL, + [DeathAccident] [int] NULL, + [DeathToll] [int] NULL, + [InjuredAccident] [int] NULL, + [InjuredToll] [int] NULL, + [MinorWoundAccident] [int] NULL, + [MinorWoundToll] [int] NULL, + [AverageTotalHours] [decimal](19, 2) NULL, + [AverageManHours] [int] NULL, + [TotalLossMan] [int] NULL, + [LastMonthLossHoursTotal] [int] NULL, + [KnockOffTotal] [int] NULL, + [DirectLoss] [int] NULL, + [IndirectLosses] [int] NULL, + [TotalLoss] [int] NULL, + [TotalLossTime] [int] NULL, + [FillCompanyPersonCharge] [nvarchar](50) NULL, + [TabPeople] [nvarchar](50) NULL, + [AuditPerson] [nvarchar](50) NULL, + [FillingDate] [datetime] NULL, + [UpState] [char](1) NULL, + [HandleState] [char](1) NULL, + [HandleMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Information_AccidentCauseReport] PRIMARY KEY CLUSTERED +( + [AccidentCauseReportId] 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 + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[Information_AccidentCauseReport] WITH CHECK ADD CONSTRAINT [FK_Information_AccidentCauseReport_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_AccidentCauseReport] CHECK CONSTRAINT [FK_Information_AccidentCauseReport_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'AccidentCauseReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'UnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'AccidentCauseReportCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'Year' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'·' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'Month' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'DeathAccident' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'DeathToll' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'InjuredAccident' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'InjuredToll' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'MinorWoundAccident' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'MinorWoundToll' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƽʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'AverageTotalHours' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƽʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'AverageManHours' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'TotalLossMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'LastMonthLossHoursTotal' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ъ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'KnockOffTotal' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֱʧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'DirectLoss' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'IndirectLosses' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'TotalLoss' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'TotalLossTime' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'FillCompanyPersonCharge' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ʊ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'TabPeople' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'AuditPerson' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport', @level2type=N'COLUMN',@level2name=N'FillingDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ְ¹ԭ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReport' +GO + + + +CREATE TABLE [dbo].[Information_AccidentCauseReportItem]( + [AccidentCauseReportItemId] [nvarchar](50) NOT NULL, + [AccidentCauseReportId] [nvarchar](50) NULL, + [AccidentType] [nvarchar](20) NULL, + [TotalDeath] [int] NULL, + [TotalInjuries] [int] NULL, + [TotalMinorInjuries] [int] NULL, + [Death1] [int] NULL, + [Injuries1] [int] NULL, + [MinorInjuries1] [int] NULL, + [Death2] [int] NULL, + [Injuries2] [int] NULL, + [MinorInjuries2] [int] NULL, + [Death3] [int] NULL, + [Injuries3] [int] NULL, + [MinorInjuries3] [int] NULL, + [Death4] [int] NULL, + [Injuries4] [int] NULL, + [MinorInjuries4] [int] NULL, + [Death5] [int] NULL, + [Injuries5] [int] NULL, + [MinorInjuries5] [int] NULL, + [Death6] [int] NULL, + [Injuries6] [int] NULL, + [MinorInjuries6] [int] NULL, + [Death7] [int] NULL, + [Injuries7] [int] NULL, + [MinorInjuries7] [int] NULL, + [Death8] [int] NULL, + [Injuries8] [int] NULL, + [MinorInjuries8] [int] NULL, + [Death9] [int] NULL, + [Injuries9] [int] NULL, + [MinorInjuries9] [int] NULL, + [Death10] [int] NULL, + [Injuries10] [int] NULL, + [MinorInjuries10] [int] NULL, + [Death11] [int] NULL, + [Injuries11] [int] NULL, + [MinorInjuries11] [int] NULL, + CONSTRAINT [PK_Information_AccidentCauseReportItem] PRIMARY KEY CLUSTERED +( + [AccidentCauseReportItemId] 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].[Information_AccidentCauseReportItem] WITH CHECK ADD CONSTRAINT [FK_Information_AccidentCauseReportItem_Information_AccidentCauseReport] FOREIGN KEY([AccidentCauseReportId]) +REFERENCES [dbo].[Information_AccidentCauseReport] ([AccidentCauseReportId]) +GO + +ALTER TABLE [dbo].[Information_AccidentCauseReportItem] CHECK CONSTRAINT [FK_Information_AccidentCauseReportItem_Information_AccidentCauseReport] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'AccidentCauseReportItemId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'AccidentCauseReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'AccidentType' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'TotalDeath' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'TotalInjuries' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'TotalMinorInjuries' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'źȱʧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death1' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'źȱʧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries1' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'źȱʧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries1' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death2' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries2' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries2' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'˷ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death3' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'˷ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries3' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'˷ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries3' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'߲' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death4' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'߲' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries4' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'߲' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries4' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ͷ֯' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death5' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ͷ֯' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries5' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ͷ֯' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries5' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֳָ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death6' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֳָ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries6' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֳָ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries6' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death7' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries7' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries7' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death8' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries8' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries8' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Υ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death9' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Υ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries9' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Υ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries9' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ûаȫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death10' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ûаȫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries10' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ûаȫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries10' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Death11' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'Injuries11' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem', @level2type=N'COLUMN',@level2name=N'MinorInjuries11' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ְ¹ԭϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_AccidentCauseReportItem' +GO + + + +CREATE TABLE [dbo].[Information_DrillConductedQuarterlyReport]( + [DrillConductedQuarterlyReportId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [ReportDate] [datetime] NULL, + [Quarter] [int] NULL, + [YearId] [int] NULL, + [CompileMan] [nvarchar](50) NULL, + [UpState] [char](1) NULL, + [HandleState] [char](1) NULL, + [HandleMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Information_DrillConductedQuarterlyReport] PRIMARY KEY CLUSTERED +( + [DrillConductedQuarterlyReportId] 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 + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[Information_DrillConductedQuarterlyReport] WITH CHECK ADD CONSTRAINT [FK_Information_DrillConductedQuarterlyReport_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_DrillConductedQuarterlyReport] CHECK CONSTRAINT [FK_Information_DrillConductedQuarterlyReport_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReport', @level2type=N'COLUMN',@level2name=N'DrillConductedQuarterlyReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReport', @level2type=N'COLUMN',@level2name=N'UnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ReportDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReport', @level2type=N'COLUMN',@level2name=N'Quarter' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReport', @level2type=N'COLUMN',@level2name=N'YearId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ӧչ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReport' +GO + + + +CREATE TABLE [dbo].[Information_DrillConductedQuarterlyReportItem]( + [DrillConductedQuarterlyReportItemId] [nvarchar](50) NOT NULL, + [DrillConductedQuarterlyReportId] [nvarchar](50) NOT NULL, + [IndustryType] [nvarchar](50) NULL, + [TotalConductCount] [int] NULL, + [TotalPeopleCount] [int] NULL, + [TotalInvestment] [money] NULL, + [HQConductCount] [int] NULL, + [HQPeopleCount] [int] NULL, + [HQInvestment] [money] NULL, + [BasicConductCount] [int] NULL, + [BasicPeopleCount] [int] NULL, + [BasicInvestment] [money] NULL, + [ComprehensivePractice] [int] NULL, + [CPScene] [int] NULL, + [CPDesktop] [int] NULL, + [SpecialDrill] [int] NULL, + [SDScene] [int] NULL, + [SDDesktop] [int] NULL, + [SortIndex] [int] NULL, + CONSTRAINT [PK_Information_DrillConductedQuarterlyReportItem] PRIMARY KEY CLUSTERED +( + [DrillConductedQuarterlyReportItemId] 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].[Information_DrillConductedQuarterlyReportItem] WITH CHECK ADD CONSTRAINT [FK_Information_DrillConductedQuarterlyReportItem_Information_DrillConductedQuarterlyReport] FOREIGN KEY([DrillConductedQuarterlyReportId]) +REFERENCES [dbo].[Information_DrillConductedQuarterlyReport] ([DrillConductedQuarterlyReportId]) +GO + +ALTER TABLE [dbo].[Information_DrillConductedQuarterlyReportItem] CHECK CONSTRAINT [FK_Information_DrillConductedQuarterlyReportItem_Information_DrillConductedQuarterlyReport] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'DrillConductedQuarterlyReportItemId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'DrillConductedQuarterlyReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'IndustryType' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ٰ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'TotalConductCount' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'TotalPeopleCount' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֱͶ룩' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'TotalInvestment' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵٰܲ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'HQConductCount' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵܲ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'HQPeopleCount' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵֱܲͶ룩' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'HQInvestment' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'㵥λٰ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'BasicConductCount' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'㵥λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'BasicPeopleCount' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'㵥λֱͶ룩' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'BasicInvestment' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ۺ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'ComprehensivePractice' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Уֳ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'CPScene' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'У棩' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'CPDesktop' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ר' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'SpecialDrill' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Уֳ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'SDScene' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'У棩' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem', @level2type=N'COLUMN',@level2name=N'SDDesktop' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ӧչϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillConductedQuarterlyReportItem' +GO + + + +CREATE TABLE [dbo].[Information_DrillPlanHalfYearReport]( + [DrillPlanHalfYearReportId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NOT NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [YearId] [int] NULL, + [HalfYearId] [int] NULL, + [Telephone] [nvarchar](50) NULL, + [UpState] [char](1) NULL, + [HandleState] [char](1) NULL, + [HandleMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Information_DrillPlanHalfYearReport] PRIMARY KEY CLUSTERED +( + [DrillPlanHalfYearReportId] 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 + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[Information_DrillPlanHalfYearReport] WITH CHECK ADD CONSTRAINT [FK_Information_DrillPlanHalfYearReport_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_DrillPlanHalfYearReport] CHECK CONSTRAINT [FK_Information_DrillPlanHalfYearReport_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReport', @level2type=N'COLUMN',@level2name=N'DrillPlanHalfYearReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReport', @level2type=N'COLUMN',@level2name=N'UnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ϵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReport', @level2type=N'COLUMN',@level2name=N'CompileMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ʊʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReport', @level2type=N'COLUMN',@level2name=N'CompileDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReport', @level2type=N'COLUMN',@level2name=N'YearId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ӧƻ걨' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReport' +GO + + + +CREATE TABLE [dbo].[Information_DrillPlanHalfYearReportItem]( + [DrillPlanHalfYearReportItemId] [nvarchar](50) NOT NULL, + [DrillPlanHalfYearReportId] [nvarchar](50) NOT NULL, + [DrillPlanName] [nvarchar](200) NOT NULL, + [OrganizationUnit] [nvarchar](100) NULL, + [DrillPlanDate] [nvarchar](50) NULL, + [AccidentScene] [nvarchar](1000) NULL, + [ExerciseWay] [nvarchar](50) NULL, + [SortIndex] [int] NULL, + CONSTRAINT [PK_Information_DrillPlanHalfYearReportItem] PRIMARY KEY CLUSTERED +( + [DrillPlanHalfYearReportItemId] 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].[Information_DrillPlanHalfYearReportItem] WITH CHECK ADD CONSTRAINT [FK_Information_DrillPlanHalfYearReportItem_Information_DrillPlanHalfYearReport] FOREIGN KEY([DrillPlanHalfYearReportId]) +REFERENCES [dbo].[Information_DrillPlanHalfYearReport] ([DrillPlanHalfYearReportId]) +GO + +ALTER TABLE [dbo].[Information_DrillPlanHalfYearReportItem] CHECK CONSTRAINT [FK_Information_DrillPlanHalfYearReportItem_Information_DrillPlanHalfYearReport] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReportItem', @level2type=N'COLUMN',@level2name=N'DrillPlanHalfYearReportItemId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReportItem', @level2type=N'COLUMN',@level2name=N'DrillPlanHalfYearReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReportItem', @level2type=N'COLUMN',@level2name=N'DrillPlanName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'֯λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReportItem', @level2type=N'COLUMN',@level2name=N'OrganizationUnit' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReportItem', @level2type=N'COLUMN',@level2name=N'DrillPlanDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ҫ¹龰' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReportItem', @level2type=N'COLUMN',@level2name=N'AccidentScene' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʽ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReportItem', @level2type=N'COLUMN',@level2name=N'ExerciseWay' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ӧƻ걨ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_DrillPlanHalfYearReportItem' +GO + + + +CREATE TABLE [dbo].[Information_MillionsMonthlyReport]( + [MillionsMonthlyReportId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [Year] [int] NULL, + [Month] [int] NULL, + [FillingMan] [nvarchar](50) NULL, + [FillingDate] [datetime] NULL, + [DutyPerson] [nvarchar](50) NULL, + [RecordableIncidentRate] [decimal](18, 4) NULL, + [LostTimeRate] [decimal](18, 4) NULL, + [LostTimeInjuryRate] [decimal](18, 4) NULL, + [DeathAccidentFrequency] [decimal](18, 4) NULL, + [AccidentMortality] [decimal](18, 4) NULL, + [UpState] [char](1) NULL, + [HandleState] [char](1) NULL, + [HandleMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Information_MillionsMonthlyReport] PRIMARY KEY CLUSTERED +( + [MillionsMonthlyReportId] 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 + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[Information_MillionsMonthlyReport] WITH CHECK ADD CONSTRAINT [FK_Information_MillionsMonthlyReport_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_MillionsMonthlyReport] CHECK CONSTRAINT [FK_Information_MillionsMonthlyReport_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'MillionsMonthlyReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'UnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'Year' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'·' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'Month' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'FillingMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'FillingDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'DutyPerson' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱܿɼ¼¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'RecordableIncidentRate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'LostTimeRate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱʧʱ˺¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'LostTimeInjuryRate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ¹Ƶ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'DeathAccidentFrequency' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport', @level2type=N'COLUMN',@level2name=N'AccidentMortality' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱȫͳ±' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReport' +GO + + + +CREATE TABLE [dbo].[Information_MillionsMonthlyReportItem]( + [MillionsMonthlyReportItemId] [nvarchar](50) NOT NULL, + [MillionsMonthlyReportId] [nvarchar](50) NULL, + [SortIndex] [int] NULL, + [Affiliation] [nvarchar](500) NULL, + [Name] [nvarchar](500) NULL, + [PostPersonNum] [int] NULL, + [SnapPersonNum] [int] NULL, + [ContractorNum] [int] NULL, + [SumPersonNum] [int] NULL, + [TotalWorkNum] [decimal](18, 4) NULL, + [SeriousInjuriesNum] [int] NULL, + [SeriousInjuriesPersonNum] [int] NULL, + [SeriousInjuriesLossHour] [int] NULL, + [MinorAccidentNum] [int] NULL, + [MinorAccidentPersonNum] [int] NULL, + [MinorAccidentLossHour] [int] NULL, + [OtherAccidentNum] [int] NULL, + [OtherAccidentPersonNum] [int] NULL, + [OtherAccidentLossHour] [int] NULL, + [RestrictedWorkPersonNum] [int] NULL, + [RestrictedWorkLossHour] [int] NULL, + [MedicalTreatmentPersonNum] [int] NULL, + [MedicalTreatmentLossHour] [int] NULL, + [FireNum] [int] NULL, + [ExplosionNum] [int] NULL, + [TrafficNum] [int] NULL, + [EquipmentNum] [int] NULL, + [QualityNum] [int] NULL, + [OtherNum] [int] NULL, + [FirstAidDressingsNum] [int] NULL, + [AttemptedEventNum] [int] NULL, + [LossDayNum] [int] NULL, + CONSTRAINT [PK_Information_MillionsMonthlyReportItem] PRIMARY KEY CLUSTERED +( + [MillionsMonthlyReportItemId] 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].[Information_MillionsMonthlyReportItem] WITH CHECK ADD CONSTRAINT [FK_Information_MillionsMonthlyReportItem_Information_MillionsMonthlyReport] FOREIGN KEY([MillionsMonthlyReportId]) +REFERENCES [dbo].[Information_MillionsMonthlyReport] ([MillionsMonthlyReportId]) +GO + +ALTER TABLE [dbo].[Information_MillionsMonthlyReportItem] CHECK CONSTRAINT [FK_Information_MillionsMonthlyReportItem_Information_MillionsMonthlyReport] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'MillionsMonthlyReportItemId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'MillionsMonthlyReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'SortIndex' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'Affiliation' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'Name' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ڸԱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'PostPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱԱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'SnapPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'а' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'ContractorNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Աϼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'SumPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܹʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'TotalWorkNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'SeriousInjuriesNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'SeriousInjuriesPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'SeriousInjuriesLossHour' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'MinorAccidentNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'MinorAccidentPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'MinorAccidentLossHour' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'OtherAccidentNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'OtherAccidentPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'OtherAccidentLossHour' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'RestrictedWorkPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'RestrictedWorkLossHour' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҽƴ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'MedicalTreatmentPersonNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҽƴʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'MedicalTreatmentLossHour' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'FireNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ը' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'ExplosionNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͨ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'TrafficNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'е豸' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'EquipmentNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'QualityNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'OtherNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ȱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'FirstAidDressingsNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'δ¼' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'AttemptedEventNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem', @level2type=N'COLUMN',@level2name=N'LossDayNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱȫͳ±ϸ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_MillionsMonthlyReportItem' +GO + + + +CREATE TABLE [dbo].[Information_SafetyQuarterlyReport]( + [SafetyQuarterlyReportId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [YearId] [int] NULL, + [Quarters] [int] NULL, + [TotalInWorkHours] [int] NULL, + [TotalInWorkHoursRemark] [nvarchar](500) NULL, + [TotalOutWorkHours] [int] NULL, + [TotalOutWorkHoursRemark] [nvarchar](500) NULL, + [WorkHoursLossRate] [decimal](18, 2) NULL, + [WorkHoursLossRateRemark] [nvarchar](500) NULL, + [WorkHoursAccuracy] [decimal](18, 2) NULL, + [WorkHoursAccuracyRemark] [nvarchar](500) NULL, + [MainBusinessIncome] [money] NULL, + [MainBusinessIncomeRemark] [nvarchar](500) NULL, + [ConstructionRevenue] [money] NULL, + [ConstructionRevenueRemark] [nvarchar](500) NULL, + [UnitTimeIncome] [money] NULL, + [UnitTimeIncomeRemark] [nvarchar](500) NULL, + [BillionsOutputMortality] [decimal](18, 2) NULL, + [BillionsOutputMortalityRemark] [nvarchar](500) NULL, + [MajorFireAccident] [int] NULL, + [MajorFireAccidentRemark] [nvarchar](500) NULL, + [MajorEquipAccident] [int] NULL, + [MajorEquipAccidentRemark] [nvarchar](500) NULL, + [AccidentFrequency] [decimal](18, 2) NULL, + [AccidentFrequencyRemark] [nvarchar](500) NULL, + [SeriousInjuryAccident] [int] NULL, + [SeriousInjuryAccidentRemark] [nvarchar](500) NULL, + [FireAccident] [int] NULL, + [FireAccidentRemark] [nvarchar](500) NULL, + [EquipmentAccident] [int] NULL, + [EquipmentAccidentRemark] [nvarchar](500) NULL, + [PoisoningAndInjuries] [int] NULL, + [PoisoningAndInjuriesRemark] [nvarchar](500) NULL, + [ProductionSafetyInTotal] [int] NULL, + [ProductionSafetyInTotalRemark] [nvarchar](500) NULL, + [ProtectionInput] [money] NULL, + [ProtectionInputRemark] [nvarchar](500) NULL, + [LaboAndHealthIn] [money] NULL, + [LaborAndHealthInRemark] [nvarchar](500) NULL, + [TechnologyProgressIn] [money] NULL, + [TechnologyProgressInRemark] [nvarchar](500) NULL, + [EducationTrainIn] [money] NULL, + [EducationTrainInRemark] [nvarchar](500) NULL, + [ProjectCostRate] [decimal](18, 2) NULL, + [ProjectCostRateRemark] [nvarchar](500) NULL, + [ProductionInput] [money] NULL, + [ProductionInputRemark] [nvarchar](500) NULL, + [Revenue] [decimal](18, 2) NULL, + [RevenueRemark] [nvarchar](500) NULL, + [FullTimeMan] [int] NULL, + [FullTimeManRemark] [nvarchar](500) NULL, + [FullTimeManAttachUrl] [nvarchar](2000) NULL, + [PMMan] [int] NULL, + [PMManRemark] [nvarchar](500) NULL, + [PMManAttachUrl] [nvarchar](2000) NULL, + [CorporateDirectorEdu] [int] NULL, + [CorporateDirectorEduRemark] [nvarchar](500) NULL, + [ProjectLeaderEdu] [int] NULL, + [ProjectLeaderEduRemark] [nvarchar](500) NULL, + [FullTimeEdu] [int] NULL, + [FullTimeEduRemark] [nvarchar](500) NULL, + [ThreeKidsEduRate] [decimal](18, 2) NULL, + [ThreeKidsEduRateRemark] [nvarchar](500) NULL, + [UplinReportRate] [decimal](18, 2) NULL, + [UplinReportRateRemark] [nvarchar](500) NULL, + [Remarks] [nvarchar](1000) NULL, + [FillingDate] [datetime] NULL, + [CompileMan] [nvarchar](50) NULL, + [UpState] [char](1) NULL, + [HandleState] [char](1) NULL, + [HandleMan] [nvarchar](50) NULL, + [KeyEquipmentTotal] [int] NULL, + [KeyEquipmentTotalRemark] [nvarchar](500) NULL, + [KeyEquipmentReportCount] [int] NULL, + [KeyEquipmentReportCountRemark] [nvarchar](500) NULL, + [ChemicalAreaProjectCount] [int] NULL, + [ChemicalAreaProjectCountRemark] [nvarchar](500) NULL, + [HarmfulMediumCoverCount] [int] NULL, + [HarmfulMediumCoverCountRemark] [nvarchar](500) NULL, + [HarmfulMediumCoverRate] [decimal](18, 2) NULL, + [HarmfulMediumCoverRateRemark] [nvarchar](500) NULL, + CONSTRAINT [PK_Information_SafetyQuarterlyReport] PRIMARY KEY CLUSTERED +( + [SafetyQuarterlyReportId] 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 + +SET ANSI_PADDING OFF +GO + +ALTER TABLE [dbo].[Information_SafetyQuarterlyReport] WITH CHECK ADD CONSTRAINT [FK_Information_SafetyQuarterlyReport_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_SafetyQuarterlyReport] CHECK CONSTRAINT [FK_Information_SafetyQuarterlyReport_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'SafetyQuarterlyReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'UnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'YearId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'(1-һȣ2-ڶȣ3-ȣ4-ļ)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'Quarters' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ͷ빤ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'TotalInWorkHours' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ͷ빤ʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'TotalInWorkHoursRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʧʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'TotalOutWorkHours' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʧʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'TotalOutWorkHoursRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱʧ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'WorkHoursLossRate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱʧʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'WorkHoursLossRateRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱͳ׼ȷ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'WorkHoursAccuracy' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱͳ׼ȷʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'WorkHoursAccuracyRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ӫҵ/Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'MainBusinessIncome' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ӫҵ/Ԫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'MainBusinessIncomeRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩ/Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ConstructionRevenue' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʩ/Ԫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ConstructionRevenueRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λʱ/Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'UnitTimeIncome' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λʱ/Ԫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'UnitTimeIncomeRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ڲֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'BillionsOutputMortality' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ڲֵʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'BillionsOutputMortalityRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ش¹ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'MajorFireAccident' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ش¹ʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'MajorFireAccidentRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'شе豸¹ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'MajorEquipAccident' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'شе豸¹ʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'MajorEquipAccidentRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ʷƵʣռ֮ȣ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'AccidentFrequency' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ʷƵʣռ֮ȣע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'AccidentFrequencyRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'SeriousInjuryAccident' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'SeriousInjuryAccidentRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ͳƱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'FireAccident' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'¹ͳƱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'FireAccidentRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'װ¹ͳƱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'EquipmentAccident' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'װ¹ͳƱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'EquipmentAccidentRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'жְҵ˺' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'PoisoningAndInjuries' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'жְҵ˺ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'PoisoningAndInjuriesRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫͶܶ/Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProductionSafetyInTotal' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫͶܶ/Ԫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProductionSafetyInTotalRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫͶ/Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProtectionInput' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫͶ/Ԫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProtectionInputRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͶְҵͶ/Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'LaboAndHealthIn' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͶְҵͶ/Ԫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'LaborAndHealthInRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫͶ/Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'TechnologyProgressIn' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫͶ/Ԫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'TechnologyProgressInRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫѵͶ/Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'EducationTrainIn' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫѵͶ/Ԫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'EducationTrainInRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N' ռ(%)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProjectCostRate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N' ռ(%)ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProjectCostRateRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱȫͶ/Ԫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProductionInput' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱȫͶ/Ԫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProductionInputRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫͶռʩ֮' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'Revenue' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫͶռʩ֮ȱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'RevenueRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫרְԱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'FullTimeMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫרְԱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'FullTimeManRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫרְԱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'FullTimeManAttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿԱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'PMMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿԱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'PMManRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿԱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'PMManAttachUrl' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵ˰ȫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'CorporateDirectorEdu' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵ˰ȫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'CorporateDirectorEduRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ˰ȫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProjectLeaderEdu' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ˰ȫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ProjectLeaderEduRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫרְԱȫ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'FullTimeEdu' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫרְԱȫע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'FullTimeEduRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫԱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ThreeKidsEduRate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫԱʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'ThreeKidsEduRateRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'б(ʩֳȫ̬רܽϱ¹ʰʱϱ)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'UplinReportRate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'б(ʩֳȫ̬רܽϱ¹ʰʱϱ)ʱע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'UplinReportRateRemark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport', @level2type=N'COLUMN',@level2name=N'Remarks' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫݼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyQuarterlyReport' +GO + + + +/*******ְ¹ԭ*********/ +CREATE VIEW [dbo].[View_Information_AccidentCauseReport] +AS +SELECT S.AccidentCauseReportId, +S.UnitId, +U.UnitName, +S.FillingDate, +(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0009.ConstText,'-')) AS ReportDate, +Group_0008.ConstText as YearStr, +Group_0009.ConstText as MonthStr, +S.AccidentCauseReportCode, +S.Year, +S.Month, +S.DeathAccident, +S.DeathToll, +S.InjuredAccident, +S.InjuredToll, +S.MinorWoundAccident, +S.MinorWoundToll, +S.AverageTotalHours, +S.AverageManHours, +S.TotalLossMan, +S.LastMonthLossHoursTotal, +S.KnockOffTotal, +S.DirectLoss, +S.IndirectLosses, +S.TotalLoss, +S.TotalLossTime, +S.FillCompanyPersonCharge, +S.TabPeople, +S.AuditPerson, +S.UpState, +S.HandleState, +US.PersonName as UserName +FROM dbo.Information_AccidentCauseReport AS S +LEFT JOIN Base_Unit AS U ON U.UnitId=S.UnitId +LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =S.[Year] +LEFT JOIN Sys_Const AS Group_0009 ON Group_0009.GroupId='0009' AND Group_0009.ConstValue =S.[Month] +LEFT JOIN Person_Persons AS US ON US.PersonId=S.HandleMan + +GO + + + +CREATE VIEW [dbo].[View_Information_DrillConductedQuarterlyReport] AS +SELECT + Report.DrillConductedQuarterlyReportId, + Report.UnitId, + Report.ReportDate, + Report.YearId, + Report.Quarter, + Report.UpState, + Report.HandleState, + (ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters, + u.UnitName, + Report.HandleMan, + US.PersonName as UserName +FROM dbo.Information_DrillConductedQuarterlyReport AS Report +LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId +LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter +Left join Base_Unit as u on u.UnitId=Report.UnitId +LEFT JOIN Person_Persons AS US ON US.PersonId=Report.HandleMan + +GO + + + +/***********Ӧչ*********/ +CREATE VIEW [dbo].[View_Information_DrillConductedQuarterlyReportItem] +AS +SELECT ReportItem.DrillConductedQuarterlyReportItemId +, ReportItem.DrillConductedQuarterlyReportId +, ReportItem.IndustryType +, ReportItem.TotalConductCount +, ReportItem.TotalPeopleCount +, ReportItem.TotalInvestment +, ReportItem.HQConductCount +, ReportItem.HQPeopleCount +, ReportItem.HQInvestment +, ReportItem.BasicConductCount +, ReportItem.BasicPeopleCount +, ReportItem.BasicInvestment +, ReportItem.ComprehensivePractice +, ReportItem.CPScene +, ReportItem.CPDesktop +, ReportItem.SpecialDrill +, ReportItem.SDScene +, ReportItem.SDDesktop +, ReportItem.SortIndex +,Report.UnitId +,Report.ReportDate +,Report.Quarter +,Report.YearId +,Report.CompileMan +,Report.UpState +,Report.HandleState +,Report.HandleMan +,U.UnitName +FROM dbo.Information_DrillConductedQuarterlyReportItem AS ReportItem +LEFT JOIN dbo.Information_DrillConductedQuarterlyReport AS Report ON Report.DrillConductedQuarterlyReportId=ReportItem.DrillConductedQuarterlyReportId +LEFT JOIN dbo.Base_Unit AS U ON U.UnitId =Report.UnitId + + +GO + + + +CREATE VIEW [dbo].[View_Information_DrillPlanHalfYearReport] +AS +SELECT +DrillPlanHalfYearReportId, +Report.UnitId, +Report.CompileMan, +Report.CompileDate, +Report.Telephone, +Report.YearId, +Report.HalfYearId, +Report.UpState, +Report.HandleState, +(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0010.ConstText,'-')) AS Years, +u.UnitName, +us.PersonName as UserName, +Report.HandleMan, +USR.PersonName AS HandleManName +FROM dbo.Information_DrillPlanHalfYearReport AS Report +left join Base_Unit as u on u.UnitId = Report.UnitId +left join Person_Persons as us on us.PersonId = Report.CompileMan +LEFT JOIN Person_Persons AS USR ON US.PersonId = Report.HandleMan +LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId +LEFT JOIN Sys_Const AS Group_0010 ON Group_0010.GroupId='0010' AND Group_0010.ConstValue =Report.HalfYearId + + +GO + + + +/***********Ӧƻ걨ϸ*********/ +CREATE VIEW [dbo].[View_Information_DrillPlanHalfYearReportItem] +AS +SELECT ReportItem.DrillPlanHalfYearReportItemId +, ReportItem.DrillPlanHalfYearReportId +, ReportItem.DrillPlanName +, ReportItem.OrganizationUnit +, ReportItem.DrillPlanDate +, ReportItem.AccidentScene +, ReportItem.ExerciseWay +, ReportItem.SortIndex +,Report.UnitId +,Report.CompileMan +,Report.CompileDate +,Report.YearId +,Report.HalfYearId +,Report.Telephone +,Report.UpState +,Report.HandleState +,Report.HandleMan +,U.UnitName +FROM dbo.Information_DrillPlanHalfYearReportItem AS ReportItem +LEFT JOIN dbo.Information_DrillPlanHalfYearReport AS Report ON Report.DrillPlanHalfYearReportId=ReportItem.DrillPlanHalfYearReportId +LEFT JOIN dbo.Base_Unit AS U ON U.UnitId =Report.UnitId + + +GO + + + +/*************ҵʱȫͳ±**************/ +CREATE VIEW [dbo].[View_Information_MillionsMonthlyReport] +AS +SELECT +Report.MillionsMonthlyReportId, +Report.UnitId, +Report.FillingDate, +Report.UpState, +(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0009.ConstText,'-')) AS ReportDate, +Group_0008.ConstText as YearStr, +Group_0009.ConstText as MonthStr, +U.UnitName, +Report.Year, +Report.Month, +Report.DutyPerson, +Report.RecordableIncidentRate, +Report.LostTimeRate, +Report.LostTimeInjuryRate, +Report.DeathAccidentFrequency, +Report.AccidentMortality, +Report.HandleState, +Report.HandleMan, +US.PersonName AS UserName +FROM dbo.Information_MillionsMonthlyReport AS Report +LEFT JOIN Base_Unit AS U ON U.UnitId=Report.UnitId +LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.[Year] +LEFT JOIN Sys_Const AS Group_0009 ON Group_0009.GroupId='0009' AND Group_0009.ConstValue =Report.[Month] +LEFT JOIN Person_Persons AS US ON US.PersonId=Report.HandleMan + + +GO + + + +/*************ȫݼ**************/ +CREATE VIEW [dbo].[View_Information_SafetyQuarterlyReport] +AS +SELECT +Report.SafetyQuarterlyReportId, +Report.UnitId, +Report.YearId, +Report.Quarters, +Report.UpState, +Group_0011.ConstText as QuartersStr, +U.UnitName, +Report.TotalInWorkHours, +Report.TotalInWorkHoursRemark, +Report.TotalOutWorkHours, +Report.TotalOutWorkHoursRemark, +Report.WorkHoursLossRate, +Report.WorkHoursLossRateRemark, +Report.WorkHoursAccuracy, +Report.WorkHoursAccuracyRemark, +Report.MainBusinessIncome, +Report.MainBusinessIncomeRemark, +Report.ConstructionRevenue, +Report.ConstructionRevenueRemark, +Report.UnitTimeIncome, +Report.UnitTimeIncomeRemark, +Report.BillionsOutputMortality, +Report.BillionsOutputMortalityRemark, +Report.MajorFireAccident, +Report.MajorFireAccidentRemark, +Report.MajorEquipAccident, +Report.MajorEquipAccidentRemark, +Report.AccidentFrequency, +Report.AccidentFrequencyRemark, +Report.SeriousInjuryAccident, +Report.SeriousInjuryAccidentRemark, +Report.FireAccident, +Report.FireAccidentRemark, +Report.EquipmentAccident, +Report.EquipmentAccidentRemark, +Report.PoisoningAndInjuries, +Report.PoisoningAndInjuriesRemark, +Report.ProductionSafetyInTotal, +Report.ProductionSafetyInTotalRemark, +Report.ProtectionInput, +Report.ProtectionInputRemark, +Report.LaboAndHealthIn, +Report.LaborAndHealthInRemark, +Report.TechnologyProgressIn, +Report.TechnologyProgressInRemark, +Report.EducationTrainIn, +Report.EducationTrainInRemark, +Report.ProjectCostRate, +Report.ProjectCostRateRemark, +Report.ProductionInput, +Report.ProductionInputRemark, +Report.Revenue, +Report.RevenueRemark, +Report.FullTimeMan, +Report.FullTimeManRemark, +Report.FullTimeManAttachUrl, +Report.PMMan, +Report.PMManRemark, +Report.PMManAttachUrl, +Report.CorporateDirectorEdu, +Report.CorporateDirectorEduRemark, +Report.ProjectLeaderEdu, +Report.ProjectLeaderEduRemark, +Report.FullTimeEdu, +Report.FullTimeEduRemark, +Report.ThreeKidsEduRate, +Report.ThreeKidsEduRateRemark, +Report.UplinReportRate, +Report.UplinReportRateRemark, +Report.Remarks, +Report.FillingDate, +Report.KeyEquipmentTotal, +Report.KeyEquipmentTotalRemark, +Report.KeyEquipmentReportCount, +Report.KeyEquipmentReportCountRemark, +Report.ChemicalAreaProjectCount, +Report.ChemicalAreaProjectCountRemark, +Report.HarmfulMediumCoverCount, +Report.HarmfulMediumCoverCountRemark, +Report.HarmfulMediumCoverRate, +Report.HarmfulMediumCoverRateRemark, +Report.HandleState, +Report.HandleMan, +US.PersonName AS UserName +FROM dbo.Information_SafetyQuarterlyReport AS Report +LEFT JOIN Base_Unit AS U ON U.UnitId=Report.UnitId +LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarters +LEFT JOIN Person_Persons AS US ON US.PersonId=Report.HandleMan + + +GO + + + +/*************ְ¹ԭ***************/ +CREATE VIEW [dbo].[View_DataIn_AccidentCauseReport] +AS +SELECT AItem.AccidentCauseReportItemId +, AItem.AccidentCauseReportId +, AItem.AccidentType +, AItem.TotalDeath +, AItem.TotalInjuries +, AItem.TotalMinorInjuries +, AItem.Death1 +, AItem.Injuries1 +, AItem.MinorInjuries1 +, AItem.Death2 +, AItem.Injuries2 +, AItem.MinorInjuries2 +, AItem.Death3 +, AItem.Injuries3 +, AItem.MinorInjuries3 +, AItem.Death4 +, AItem.Injuries4 +, AItem.MinorInjuries4 +, AItem.Death5 +, AItem.Injuries5 +, AItem.MinorInjuries5 +, AItem.Death6 +, AItem.Injuries6 +, AItem.MinorInjuries6 +, AItem.Death7 +, AItem.Injuries7 +, AItem.MinorInjuries7 +, AItem.Death8 +, AItem.Injuries8 +, AItem.MinorInjuries8 +, AItem.Death9 +, AItem.Injuries9 +, AItem.MinorInjuries9 +, AItem.Death10 +, AItem.Injuries10 +, AItem.MinorInjuries10 +, AItem.Death11 +, AItem.Injuries11 +, AItem.MinorInjuries11 +, A.UnitId +, A.AccidentCauseReportCode +, A.Year +, A.Month +, A.DeathAccident +, A.DeathToll +, A.InjuredAccident +, A.InjuredToll +, A.MinorWoundAccident +, A.MinorWoundToll +, A.AverageTotalHours +, A.AverageManHours +, A.TotalLossMan +, A.LastMonthLossHoursTotal +, A.KnockOffTotal +, A.DirectLoss +, A.IndirectLosses +, A.TotalLoss +, A.TotalLossTime +, A.FillCompanyPersonCharge +, A.TabPeople +, A.AuditPerson +, A.FillingDate +, A.UpState +, A.HandleState +, A.HandleMan +, U.UnitName +FROM dbo.Information_AccidentCauseReportItem AS AItem +LEFT JOIN dbo.Information_AccidentCauseReport AS A ON A.AccidentCauseReportId=AItem.AccidentCauseReportId +LEFT JOIN dbo.Base_Unit AS U ON U.UnitId=A.UnitId + + +GO + + + +/***********ʱȫͳ±*********/ +CREATE VIEW [dbo].[View_DataIn_MillionsMonthlyReport] +AS +SELECT MItem.MillionsMonthlyReportItemId +, MItem.MillionsMonthlyReportId +, MItem.SortIndex +, MItem.Affiliation +, MItem.Name +, MItem.PostPersonNum +, MItem.SnapPersonNum +, MItem.ContractorNum +, MItem.SumPersonNum +, MItem.TotalWorkNum +, MItem.SeriousInjuriesNum +, MItem.SeriousInjuriesPersonNum +, MItem.SeriousInjuriesLossHour +, MItem.MinorAccidentNum +, MItem.MinorAccidentPersonNum +, MItem.MinorAccidentLossHour +, MItem.OtherAccidentNum +, MItem.OtherAccidentPersonNum +, MItem.OtherAccidentLossHour +, MItem.RestrictedWorkPersonNum +, MItem.RestrictedWorkLossHour +, MItem.MedicalTreatmentPersonNum +, MItem.MedicalTreatmentLossHour +, MItem.FireNum +, MItem.ExplosionNum +, MItem.TrafficNum +, MItem.EquipmentNum +, MItem.QualityNum +, MItem.OtherNum +, MItem.FirstAidDressingsNum +, MItem.AttemptedEventNum +, MItem.LossDayNum +,M.UnitId +,M.Year +,M.Month +,M.FillingMan +,M.FillingDate +,M.DutyPerson +,M.RecordableIncidentRate +,M.LostTimeRate +,M.LostTimeInjuryRate +,M.DeathAccidentFrequency +,M.AccidentMortality +,M.UpState +,M.HandleState +,M.HandleMan +,U.UnitName +FROM dbo.Information_MillionsMonthlyReportItem AS MItem +LEFT JOIN dbo.Information_MillionsMonthlyReport AS M ON M.MillionsMonthlyReportId=MItem.MillionsMonthlyReportId +LEFT JOIN dbo.Base_Unit AS U ON U.UnitId =M.UnitId + + +GO + + +--ʱ +INSERT INTO SGGLDB_SD.dbo.Information_MillionsMonthlyReport +SELECT * +FROM SUBHSSEDB.DBO.Information_MillionsMonthlyReport AS B +WHERE B.MillionsMonthlyReportId NOT IN (SELECT MillionsMonthlyReportId FROM SGGLDB_SD.dbo.Information_MillionsMonthlyReport) +GO + +INSERT INTO SGGLDB_SD.dbo.Information_MillionsMonthlyReportItem +SELECT * +FROM SUBHSSEDB.DBO.Information_MillionsMonthlyReportItem AS B +WHERE B.MillionsMonthlyReportItemId NOT IN (SELECT MillionsMonthlyReportItemId FROM SGGLDB_SD.dbo.Information_MillionsMonthlyReportItem) +AND B.MillionsMonthlyReportId IN (SELECT MillionsMonthlyReportId FROM SGGLDB_SD.dbo.Information_MillionsMonthlyReport ) +GO + +INSERT INTO SGGLDB_SD.dbo.ProjectData_FlowOperate +SELECT * +FROM SUBHSSEDB.DBO.ProjectData_FlowOperate AS B +WHERE B.DataId NOT IN (SELECT DataId FROM SGGLDB_SD.dbo.ProjectData_FlowOperate) +AND B.DataId IN (SELECT MillionsMonthlyReportId FROM SGGLDB_SD.dbo.Information_MillionsMonthlyReport) +GO + + +--ְҵ +INSERT INTO SGGLDB_SD.dbo.Information_AccidentCauseReport +SELECT * +FROM SUBHSSEDB.DBO.Information_AccidentCauseReport AS B +WHERE B.AccidentCauseReportId NOT IN (SELECT AccidentCauseReportId FROM SGGLDB_SD.dbo.Information_AccidentCauseReport) +GO + +INSERT INTO SGGLDB_SD.dbo.Information_AccidentCauseReportItem +SELECT * +FROM SUBHSSEDB.DBO.Information_AccidentCauseReportItem AS B +WHERE B.AccidentCauseReportItemId NOT IN (SELECT AccidentCauseReportItemId FROM SGGLDB_SD.dbo.Information_AccidentCauseReportItem) +AND B.AccidentCauseReportId IN (SELECT AccidentCauseReportId FROM SGGLDB_SD.dbo.Information_AccidentCauseReport ) +GO + +INSERT INTO SGGLDB_SD.dbo.ProjectData_FlowOperate +SELECT * +FROM SUBHSSEDB.DBO.ProjectData_FlowOperate AS B +WHERE B.DataId NOT IN (SELECT DataId FROM SGGLDB_SD.dbo.ProjectData_FlowOperate) +AND B.DataId IN (SELECT AccidentCauseReportId FROM SGGLDB_SD.dbo.Information_AccidentCauseReport) +GO + +INSERT INTO SGGLDB_SD.dbo.Sys_CodeRecords +SELECT * +FROM SUBHSSEDB.DBO.Sys_CodeRecords AS B +WHERE B.DataId NOT IN (SELECT DataId FROM SGGLDB_SD.dbo.Sys_CodeRecords) +AND B.DataId IN (SELECT AccidentCauseReportId FROM SGGLDB_SD.dbo.Information_AccidentCauseReport) +GO +--ȫɼ +INSERT INTO SGGLDB_SD.dbo.Information_SafetyQuarterlyReport +SELECT * +FROM SUBHSSEDB.DBO.Information_SafetyQuarterlyReport AS B +WHERE B.SafetyQuarterlyReportId NOT IN (SELECT SafetyQuarterlyReportId + FROM SGGLDB_SD.dbo.Information_SafetyQuarterlyReport) +GO + + +INSERT INTO SGGLDB_SD.dbo.ProjectData_FlowOperate +SELECT * +FROM SUBHSSEDB.DBO.ProjectData_FlowOperate AS B +WHERE B.DataId NOT IN (SELECT DataId FROM SGGLDB_SD.dbo.ProjectData_FlowOperate) +AND B.DataId IN (SELECT SafetyQuarterlyReportId FROM SGGLDB_SD.dbo.Information_SafetyQuarterlyReport) +GO + +--Ӧչ +INSERT INTO SGGLDB_SD.dbo.Information_DrillConductedQuarterlyReport +SELECT * +FROM SUBHSSEDB.DBO.Information_DrillConductedQuarterlyReport AS B +WHERE B.DrillConductedQuarterlyReportId NOT IN (SELECT DrillConductedQuarterlyReportId FROM SGGLDB_SD.dbo.Information_DrillConductedQuarterlyReport) +GO + +INSERT INTO SGGLDB_SD.dbo.Information_DrillConductedQuarterlyReportItem +SELECT * +FROM SUBHSSEDB.DBO.Information_DrillConductedQuarterlyReportItem AS B +WHERE B.DrillConductedQuarterlyReportItemId NOT IN (SELECT DrillConductedQuarterlyReportItemId FROM SGGLDB_SD.dbo.Information_DrillConductedQuarterlyReportItem) +AND B.DrillConductedQuarterlyReportId IN (SELECT DrillConductedQuarterlyReportId FROM SGGLDB_SD.dbo.Information_DrillConductedQuarterlyReport) +GO + +INSERT INTO SGGLDB_SD.dbo.ProjectData_FlowOperate +SELECT * +FROM SUBHSSEDB.DBO.ProjectData_FlowOperate AS B +WHERE B.DataId NOT IN (SELECT DataId FROM SGGLDB_SD.dbo.ProjectData_FlowOperate) +AND B.DataId IN (SELECT DrillConductedQuarterlyReportId FROM SGGLDB_SD.dbo.Information_DrillConductedQuarterlyReport) +GO + +--Ӧչ걨 +INSERT INTO SGGLDB_SD.dbo.Information_DrillPlanHalfYearReport +SELECT * +FROM SUBHSSEDB.DBO.Information_DrillPlanHalfYearReport AS B +WHERE B.DrillPlanHalfYearReportId NOT IN (SELECT DrillPlanHalfYearReportId FROM SGGLDB_SD.dbo.Information_DrillPlanHalfYearReport) +GO + +INSERT INTO SGGLDB_SD.dbo.Information_DrillPlanHalfYearReportItem +SELECT * +FROM SUBHSSEDB.DBO.Information_DrillPlanHalfYearReportItem AS B +WHERE B.DrillPlanHalfYearReportItemId NOT IN (SELECT DrillPlanHalfYearReportItemId FROM SGGLDB_SD.dbo.Information_DrillPlanHalfYearReportItem) +AND B.DrillPlanHalfYearReportId IN (SELECT DrillPlanHalfYearReportId FROM SGGLDB_SD.dbo.Information_DrillPlanHalfYearReport) +GO + +INSERT INTO SGGLDB_SD.dbo.ProjectData_FlowOperate +SELECT * +FROM SUBHSSEDB.DBO.ProjectData_FlowOperate AS B +WHERE B.DataId NOT IN (SELECT DataId FROM SGGLDB_SD.dbo.ProjectData_FlowOperate) +AND B.DataId IN (SELECT DrillPlanHalfYearReportId FROM SGGLDB_SD.dbo.Information_DrillPlanHalfYearReport) +GO + + +CREATE TABLE [dbo].[Information_UrgeReport]( + [UrgeReportId] [nvarchar](50) NOT NULL, + [UnitId] [nvarchar](50) NULL, + [ReprotType] [nvarchar](50) NULL, + [YearId] [nvarchar](50) NULL, + [MonthId] [nvarchar](50) NULL, + [QuarterId] [nvarchar](50) NULL, + [HalfYearId] [nvarchar](50) NULL, + [UrgeDate] [datetime] NULL, + [IsComplete] [bit] NULL, + [IsCancel] [bit] NULL, + CONSTRAINT [PK_Information_UrgeReport] PRIMARY KEY CLUSTERED +( + [UrgeReportId] 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].[Information_UrgeReport] WITH CHECK ADD CONSTRAINT [FK_Information_UrgeReport_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[Information_UrgeReport] CHECK CONSTRAINT [FK_Information_UrgeReport_Base_Unit] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'߱id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_UrgeReport', @level2type=N'COLUMN',@level2name=N'UrgeReportId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'λid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_UrgeReport', @level2type=N'COLUMN',@level2name=N'UnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N' ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_UrgeReport', @level2type=N'COLUMN',@level2name=N'ReprotType' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿϱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_UrgeReport', @level2type=N'COLUMN',@level2name=N'IsComplete' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȫϢ߱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_UrgeReport' +GO + + diff --git a/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql b/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql index fcf1bb34..90b63f76 100644 --- a/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql +++ b/DataBase/菜单初始化脚本/0-5综合管理(Menu_ZHGL).sql @@ -92,6 +92,109 @@ GO VALUES('04AB7BF7-C527-45D4-B98D-082F10D25CA0','DEE90726-E00D-462B-A4BF-7E36180DD5B8','保存',4) GO +--安全报表(集团) +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','安全信息上报','',32,'0','Menu_ZHGL',1,0,1) +GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('3156A9F0-276D-4AD4-BF84-45CF6DFC215C','百万工时安全统计月报','ZHGL/Information/MillionsMonthlyReport.aspx',10,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8C0E3DDA-8883-4A8E-B288-C009B807C39D','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('8C720351-FD57-4C2D-9FCB-C8BB7FE48E65','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9084F09C-AA75-42B4-8357-6CDD0661CE8D','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('00C79282-699E-4CCA-988E-1F36671C2F37','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','保存',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1889FE33-E72D-4E70-B51D-2AE411E08693','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','保存并上报',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('08C103D2-6DB3-435E-A3DC-0C1F99CC51FF','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','提交',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AE5A454F-578E-4C52-969B-20AB87006A73','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','导入',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('88D736EA-3ADC-4100-B17E-A1A1F16D9D2A','3156A9F0-276D-4AD4-BF84-45CF6DFC215C','打印',8) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('4BC71D2E-7D94-48C1-A61A-139637825AA5','职工伤亡事故原因分析报','ZHGL/Information/AccidentCauseReport.aspx',20,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9D7EDCF0-32CD-4BB6-AA0F-6914E2B0F2D1','4BC71D2E-7D94-48C1-A61A-139637825AA5','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('FB9C1CDD-3CB8-4AEC-B940-563B3BA59E17','4BC71D2E-7D94-48C1-A61A-139637825AA5','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('FABAAF0B-C618-43B7-907A-217B6A1E5F6E','4BC71D2E-7D94-48C1-A61A-139637825AA5','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('385833BA-BD03-4DB2-9380-C76395368782','4BC71D2E-7D94-48C1-A61A-139637825AA5','保存',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('34472641-62F3-4E40-BEB3-770C3D833D03','4BC71D2E-7D94-48C1-A61A-139637825AA5','保存并上报',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1CBB8571-E8D1-4EE0-AB08-4C3305BE27C6','4BC71D2E-7D94-48C1-A61A-139637825AA5','提交',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A71F1236-204F-4B34-B887-19B31CE56F63','4BC71D2E-7D94-48C1-A61A-139637825AA5','导入',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C90343CD-4DBE-4C3B-BEDD-888C9B514F8B','4BC71D2E-7D94-48C1-A61A-139637825AA5','打印',8) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','安全生产数据季报','ZHGL/Information/SafetyQuarterlyReport.aspx',30,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AD2043D6-871F-47FE-B6CC-0CA5CD50C0BA','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('19657A9D-6AEB-47BA-BC3F-B916C68B515B','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('07E601FD-AE73-4F2B-A9D2-613B34ED654A','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D3BBA6C4-4D71-4533-9A47-9459AA30C2D2','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','保存',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('90ED2D85-1184-4E46-8832-8C1215B6C59D','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','保存并上报',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BED22C29-BA30-4BD2-A244-8588F2A0635B','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','导入',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C4922011-37CD-4B79-820A-D8CAAE39144D','A3894BAD-3F4A-4BB4-98CF-A76C588AE53F','打印',7) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('7985C759-8EB9-4B7D-AC65-00541280B46C','应急演练开展情况季报','ZHGL/Information/DrillConductedQuarterlyReport.aspx',40,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('3D866C54-0A39-4A56-B771-7F3C63CF6A32','7985C759-8EB9-4B7D-AC65-00541280B46C','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F65F199A-5D28-42D0-B08F-390376CAAC31','7985C759-8EB9-4B7D-AC65-00541280B46C','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7FA97C99-A026-4934-95AC-50FF173B889D','7985C759-8EB9-4B7D-AC65-00541280B46C','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('1689FECD-6F18-4B1E-8190-706F2124B4C6','7985C759-8EB9-4B7D-AC65-00541280B46C','保存',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6358C4DD-5B0E-4DB5-8FD1-AED403EF1D43','7985C759-8EB9-4B7D-AC65-00541280B46C','保存并上报',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C1E0471F-568C-4B85-ADED-FCDD27F8C3DA','7985C759-8EB9-4B7D-AC65-00541280B46C','提交',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('5231B22C-BF0B-478B-92DD-1C1B30BC7270','7985C759-8EB9-4B7D-AC65-00541280B46C','导入',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('25A11FB5-AB22-42CC-9E94-29FF9221B25B','7985C759-8EB9-4B7D-AC65-00541280B46C','打印',8) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('70DEB27A-D6FF-4D57-879B-0270F2967FA0','应急演练工作计划半年报','ZHGL/Information/DrillPlanHalfYearReport.aspx',50,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A034BF05-9859-4920-97F0-20190D94E6F4','70DEB27A-D6FF-4D57-879B-0270F2967FA0','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A821D1EC-5E54-4386-80E8-D1718CF00E7D','70DEB27A-D6FF-4D57-879B-0270F2967FA0','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('6345E13D-F311-4839-927E-ADEF36D7CB5E','70DEB27A-D6FF-4D57-879B-0270F2967FA0','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A4115079-DDEC-4B42-836D-4B79B999E011','70DEB27A-D6FF-4D57-879B-0270F2967FA0','保存',4) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DE6CADAC-6981-45F6-BF19-0BFC6F1F2AFE','70DEB27A-D6FF-4D57-879B-0270F2967FA0','保存并上报',5) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('C495E44F-DF2C-4071-829C-8C06DA30F9FE','70DEB27A-D6FF-4D57-879B-0270F2967FA0','提交',6) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('F287B0ED-D725-4CD3-B422-5319112F452B','70DEB27A-D6FF-4D57-879B-0270F2967FA0','导入',7) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('30F188D4-84D4-4D3C-8ECE-B499ACB1C3C8','70DEB27A-D6FF-4D57-879B-0270F2967FA0','打印',8) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('B9ADD006-BA46-4191-BCD1-CCB56767C82B','总包施工质量计划','ZHGL/Plan/MainPlan.aspx',35,'0','Menu_ZHGL',0,1,1) GO diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 8e4a5332..7a85283e 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -640,6 +640,8 @@ + + @@ -653,6 +655,16 @@ + + + + + + + + + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 6558e382..93074ebb 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -4469,5 +4469,24 @@ /// public const string Project_SYHSEData_SYHSEMenuId = ""; #endregion + + #region 上报资源状态 + /// + /// 本单位 + /// + public const string UpState_1 = "1"; + /// + /// 待上报 + /// + public const string UpState_2 = "2"; + /// + /// 已上报 + /// + public const string UpState_3 = "3"; + /// + /// 上报失败 + /// + public const string UpState_4 = "4"; + #endregion } } \ No newline at end of file diff --git a/SGGL/BLL/Common/ProjectDataFlowSetService.cs b/SGGL/BLL/Common/ProjectDataFlowSetService.cs index 3a162891..0fa8dcba 100644 --- a/SGGL/BLL/Common/ProjectDataFlowSetService.cs +++ b/SGGL/BLL/Common/ProjectDataFlowSetService.cs @@ -1,5 +1,6 @@ namespace BLL { + using System; using System.Collections; using System.Linq; @@ -304,5 +305,20 @@ where x.MenuId == menuId && x.DataId == dataId && (x.IsClosed == false || !x.IsClosed.HasValue) select x).FirstOrDefault(); } + + /// + /// + /// + public static void CloseFlowOperate(string menuId, string dataId, string opinion) + { + var updateUnFlowOperate = db.ProjectData_FlowOperate.FirstOrDefault(x => x.MenuId == menuId && x.DataId == dataId && (x.IsClosed == false || !x.IsClosed.HasValue)); + if (updateUnFlowOperate != null) + { + updateUnFlowOperate.OperaterTime = DateTime.Now; + updateUnFlowOperate.IsClosed = true; + updateUnFlowOperate.Opinion = opinion; + BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate); + } + } } } diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs new file mode 100644 index 00000000..08afa9f7 --- /dev/null +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -0,0 +1,5594 @@ +namespace BLL +{ + using System; + using System.Collections.Generic; + using System.Data; + using Newtonsoft.Json; + using System.Linq; + using RestSharp; + using System.IO; + + public static class CNCECHSSEWebService + { + public static string UploadFile(string file) + { + string result = string.Empty; + try + { + string CNCECPath = SysConstSetService.CNCECPath; + string baseurl = CNCECPath + "/api/FileUpload/Post"; + var client = new RestClient(baseurl); + client.Timeout = -1; + var request = new RestRequest(Method.POST); + request.AddHeader("Content-Type", "multipart/form-data");//注意头部必须是form-data + // client.UserAgent = "apifox/1.0.0 (https://www.apifox.cn)"; + //request.AddFile("file", @"E:\微信\WeChat\WeChat Files\wxid_9140361403112\FileStorage\File\2022-08\焊接管理尾项20220809.docx"); + var filelist = file.Split(','); + foreach (var item in filelist) + { + + if (File.Exists(item)) + { + request.AddFile("file", item); + } + } + + request.AddParameter("typeName", "SafetyQuarterlyReport"); + var tokenItem = BLL.ServerService.GetToken(); + request.AddHeader("token", tokenItem.Token); + IRestResponse response = client.Execute(request); + var contentPost = response.Content.Replace('"', ' '); + result = contentPost; + } + catch (System.Exception) + { + result = ""; + + + } + return result; + + } + + #region 上报数据到集团 + #region 百万工时上报 + /// + /// 百万工时上报 + /// + public static string UpMillionsMonthlyReport(string millionsMonthlyReportId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + var upReport = from x in db.Information_MillionsMonthlyReport + where x.MillionsMonthlyReportId == millionsMonthlyReportId + select new Information_MillionsMonthlyReport + { + MillionsMonthlyReportId = x.MillionsMonthlyReportId, + UnitId = x.UnitId, + Year = x.Year, + Month = x.Month, + FillingMan = x.FillingMan, + FillingDate = x.FillingDate, + DutyPerson = x.DutyPerson, + RecordableIncidentRate = x.RecordableIncidentRate, + LostTimeRate = x.LostTimeRate, + LostTimeInjuryRate = x.LostTimeInjuryRate, + DeathAccidentFrequency = x.DeathAccidentFrequency, + AccidentMortality = x.AccidentMortality, + }; + + var upReportItem = from x in db.Information_MillionsMonthlyReportItem + where x.MillionsMonthlyReportId == millionsMonthlyReportId + select new Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = x.MillionsMonthlyReportItemId, + MillionsMonthlyReportId = x.MillionsMonthlyReportId, + SortIndex = x.SortIndex, + Affiliation = x.Affiliation, + Name = x.Name, + PostPersonNum = x.PostPersonNum, + SnapPersonNum = x.SnapPersonNum, + ContractorNum = x.ContractorNum, + SumPersonNum = x.SumPersonNum, + TotalWorkNum = x.TotalWorkNum, + SeriousInjuriesNum = x.SeriousInjuriesNum, + SeriousInjuriesPersonNum = x.SeriousInjuriesPersonNum, + SeriousInjuriesLossHour = x.SeriousInjuriesLossHour, + MinorAccidentNum = x.MinorAccidentNum, + MinorAccidentPersonNum = x.MinorAccidentPersonNum, + MinorAccidentLossHour = x.MinorAccidentLossHour, + OtherAccidentNum = x.OtherAccidentNum, + OtherAccidentPersonNum = x.OtherAccidentPersonNum, + OtherAccidentLossHour = x.OtherAccidentLossHour, + RestrictedWorkPersonNum = x.RestrictedWorkPersonNum, + RestrictedWorkLossHour = x.RestrictedWorkLossHour, + MedicalTreatmentPersonNum = x.MedicalTreatmentPersonNum, + MedicalTreatmentLossHour = x.MedicalTreatmentLossHour, + FireNum = x.FireNum, + ExplosionNum = x.ExplosionNum, + TrafficNum = x.TrafficNum, + EquipmentNum = x.EquipmentNum, + QualityNum = x.QualityNum, + OtherNum = x.OtherNum, + FirstAidDressingsNum = x.FirstAidDressingsNum, + AttemptedEventNum = x.AttemptedEventNum, + LossDayNum = x.LossDayNum, + }; + + //老接口Serveice + //var getR = hsseC.DataInsertInformation_MillionsMonthlyReportTable(upReport.ToList(), upReportItem.ToList()); + //新接口Api + code = UpApiMillionsMonthlyReport(upReport, upReportItem).ToString(); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.MillionsMonthlyReportId)) + { + var report = db.Information_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty); + // //更新催报信息 + UrgeReportService.SetComplete(report.UnitId, Const.ReportType_1, report.Year.ToString(), report.Month.ToString()); + } + } + LogService.AddSys_Log(CurrUser, "【百万工时安全统计月报表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【百万工时安全统计月报表】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【百万工时安全统计月报表】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【百万工时安全统计月报表】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + return code; + } + } + /// + /// UpApiMillionsMonthlyReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiMillionsMonthlyReport(IQueryable upReport, IQueryable upReportItem) + { + string baseurl = "/api/InformationData/SaveMillionsMonthlyReport"; + //合并 + //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); + var resultJsonReport = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var resultJsonReportItem = JsonConvert.SerializeObject(new { MillionsMonthlyReportItem = upReportItem }); + resultJsonReport = "{\"InformationDataItems\":[" + (resultJsonReport + resultJsonReportItem).Replace("}{", ",") + "]}"; + var responeData = BLL.ServerService.PushCNCEC(resultJsonReport, baseurl); + return responeData.code; + } + #endregion + + #region 职工伤亡事故原因分析报表上报 + /// + /// 职工伤亡事故原因分析报表上报 + /// + public static string UpAccidentCauseReport(string accidentCauseReportId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + var upReport = from x in db.Information_AccidentCauseReport + where x.AccidentCauseReportId == accidentCauseReportId + select new Information_AccidentCauseReport + { + AccidentCauseReportId = x.AccidentCauseReportId, + UnitId = x.UnitId, + AccidentCauseReportCode = x.AccidentCauseReportCode, + Year = x.Year, + Month = x.Month, + DeathAccident = x.DeathAccident, + DeathToll = x.DeathToll, + InjuredAccident = x.InjuredAccident, + InjuredToll = x.InjuredToll, + MinorWoundAccident = x.MinorWoundAccident, + MinorWoundToll = x.MinorWoundToll, + AverageTotalHours = x.AverageTotalHours, + AverageManHours = x.AverageManHours, + TotalLossMan = x.TotalLossMan, + LastMonthLossHoursTotal = x.LastMonthLossHoursTotal, + KnockOffTotal = x.KnockOffTotal, + DirectLoss = x.DirectLoss, + IndirectLosses = x.IndirectLosses, + TotalLoss = x.TotalLoss, + TotalLossTime = x.TotalLossTime, + FillCompanyPersonCharge = x.FillCompanyPersonCharge, + TabPeople = x.TabPeople, + AuditPerson = x.AuditPerson, + FillingDate = x.FillingDate, + }; + + var upReportItem = from x in db.Information_AccidentCauseReportItem + where x.AccidentCauseReportId == accidentCauseReportId + select new Information_AccidentCauseReportItem + { + AccidentCauseReportItemId = x.AccidentCauseReportItemId, + AccidentCauseReportId = x.AccidentCauseReportId, + AccidentType = x.AccidentType, + TotalDeath = x.TotalDeath, + TotalInjuries = x.TotalInjuries, + TotalMinorInjuries = x.TotalMinorInjuries, + Death1 = x.Death1, + Injuries1 = x.Injuries1, + MinorInjuries1 = x.MinorInjuries1, + Death2 = x.Death2, + Injuries2 = x.Injuries2, + MinorInjuries2 = x.MinorInjuries2, + Death3 = x.Death3, + Injuries3 = x.Injuries3, + MinorInjuries3 = x.MinorInjuries3, + Death4 = x.Death4, + Injuries4 = x.Injuries4, + MinorInjuries4 = x.MinorInjuries4, + Death5 = x.Death5, + Injuries5 = x.Injuries5, + MinorInjuries5 = x.MinorInjuries5, + Death6 = x.Death6, + Injuries6 = x.Injuries6, + MinorInjuries6 = x.MinorInjuries6, + Death7 = x.Death7, + Injuries7 = x.Injuries7, + MinorInjuries7 = x.MinorInjuries7, + Death8 = x.Death8, + Injuries8 = x.Injuries8, + MinorInjuries8 = x.MinorInjuries8, + Death9 = x.Death9, + Injuries9 = x.Injuries9, + MinorInjuries9 = x.MinorInjuries9, + Death10 = x.Death10, + Injuries10 = x.Injuries10, + MinorInjuries10 = x.MinorInjuries10, + Death11 = x.Death11, + Injuries11 = x.Injuries11, + MinorInjuries11 = x.MinorInjuries11, + }; + //老接口Serveice + // var getR = hsseC.DataInsertInformation_AccidentCauseReportTable(upReport.ToList(), upReportItem.ToList()); + //新接口Api + code = UpApiAccidentCauseReport(upReport, upReportItem).ToString(); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.AccidentCauseReportId)) + { + var report = db.Information_AccidentCauseReport.FirstOrDefault(e => e.AccidentCauseReportId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty); + ////更新催报信息 + UrgeReportService.SetComplete(report.UnitId, Const.ReportType_2, report.Year.ToString(), report.Month.ToString()); + } + } + + LogService.AddSys_Log(CurrUser, "【职工伤亡事故原因分析报表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【职工伤亡事故原因分析报表】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【职工伤亡事故原因分析报表】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【职工伤亡事故原因分析报表】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + + return code; + } + } + /// + /// AccidentCauseReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiAccidentCauseReport(IQueryable upReport, IQueryable upReportItem) + { + string baseurl = "/api/InformationData/SaveAccidentCauseReport"; + //合并 + //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); + var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var resultJson1 = JsonConvert.SerializeObject(new { AccidentCauseReportItem = upReportItem }); + resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}"; + var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl); + + return responeData.code; + } + #endregion + + #region 安全生产数据季报上报 + /// + /// 安全生产数据季报上报 + /// + public static string UpSafetyQuarterlyReport(string safetyQuarterlyReportId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + // CNCECHSSEService.HSSEServiceClient hsseC = new CNCECHSSEService.HSSEServiceClient(); + var upReport = from x in db.Information_SafetyQuarterlyReport + where x.SafetyQuarterlyReportId == safetyQuarterlyReportId + select new Information_SafetyQuarterlyReport + { + SafetyQuarterlyReportId = x.SafetyQuarterlyReportId, + UnitId = x.UnitId, + YearId = x.YearId, + Quarters = x.Quarters, + TotalInWorkHours = x.TotalInWorkHours, + TotalInWorkHoursRemark = x.TotalInWorkHoursRemark, + TotalOutWorkHours = x.TotalOutWorkHours, + TotalOutWorkHoursRemark = x.TotalOutWorkHoursRemark, + WorkHoursLossRate = x.WorkHoursLossRate, + WorkHoursLossRateRemark = x.WorkHoursLossRateRemark, + WorkHoursAccuracy = x.WorkHoursAccuracy, + WorkHoursAccuracyRemark = x.WorkHoursAccuracyRemark, + MainBusinessIncome = x.MainBusinessIncome, + MainBusinessIncomeRemark = x.MainBusinessIncomeRemark, + FillingDate = x.FillingDate, + ConstructionRevenue = x.ConstructionRevenue, + ConstructionRevenueRemark = x.ConstructionRevenueRemark, + UnitTimeIncome = x.UnitTimeIncome, + UnitTimeIncomeRemark = x.UnitTimeIncomeRemark, + BillionsOutputMortality = x.BillionsOutputMortality, + BillionsOutputMortalityRemark = x.BillionsOutputMortalityRemark, + MajorFireAccident = x.MajorFireAccident, + MajorFireAccidentRemark = x.MajorFireAccidentRemark, + MajorEquipAccident = x.MajorEquipAccident, + MajorEquipAccidentRemark = x.MajorEquipAccidentRemark, + AccidentFrequency = x.AccidentFrequency, + AccidentFrequencyRemark = x.AccidentFrequencyRemark, + SeriousInjuryAccident = x.SeriousInjuryAccident, + SeriousInjuryAccidentRemark = x.SeriousInjuryAccidentRemark, + FireAccident = x.FireAccident, + FireAccidentRemark = x.FireAccidentRemark, + EquipmentAccident = x.EquipmentAccident, + EquipmentAccidentRemark = x.EquipmentAccidentRemark, + PoisoningAndInjuries = x.PoisoningAndInjuries, + PoisoningAndInjuriesRemark = x.PoisoningAndInjuriesRemark, + ProductionSafetyInTotal = x.ProductionSafetyInTotal, + ProductionSafetyInTotalRemark = x.ProductionSafetyInTotalRemark, + ProtectionInput = x.ProtectionInput, + ProtectionInputRemark = x.ProtectionInputRemark, + LaboAndHealthIn = x.LaboAndHealthIn, + LaborAndHealthInRemark = x.LaborAndHealthInRemark, + TechnologyProgressIn = x.TechnologyProgressIn, + TechnologyProgressInRemark = x.TechnologyProgressInRemark, + EducationTrainIn = x.EducationTrainIn, + EducationTrainInRemark = x.EducationTrainInRemark, + ProjectCostRate = x.ProjectCostRate, + ProjectCostRateRemark = x.ProjectCostRateRemark, + ProductionInput = x.ProductionInput, + ProductionInputRemark = x.ProductionInputRemark, + Revenue = x.Revenue, + RevenueRemark = x.RevenueRemark, + FullTimeMan = x.FullTimeMan, + FullTimeManRemark = x.FullTimeManRemark, + FullTimeManAttachUrl = x.FullTimeManAttachUrl, + PMMan = x.PMMan, + PMManRemark = x.PMManRemark, + PMManAttachUrl = x.PMManAttachUrl, + CorporateDirectorEdu = x.CorporateDirectorEdu, + CorporateDirectorEduRemark = x.CorporateDirectorEduRemark, + ProjectLeaderEdu = x.ProjectLeaderEdu, + ProjectLeaderEduRemark = x.ProjectLeaderEduRemark, + FullTimeEdu = x.FullTimeEdu, + FullTimeEduRemark = x.FullTimeEduRemark, + ThreeKidsEduRate = x.ThreeKidsEduRate, + ThreeKidsEduRateRemark = x.ThreeKidsEduRateRemark, + UplinReportRate = x.UplinReportRate, + UplinReportRateRemark = x.UplinReportRateRemark, + Remarks = x.Remarks, + CompileMan = x.CompileMan, + ////附件转为字节传送 + //FullTimeManAttachUrlFileContext = FileStructService.GetFileStructByAttachUrl(x.FullTimeManAttachUrl), + // PMManAttachUrlFileContext = FileStructService.GetFileStructByAttachUrl(x.PMManAttachUrl), + KeyEquipmentTotal = x.KeyEquipmentTotal, + KeyEquipmentTotalRemark = x.KeyEquipmentTotalRemark, + KeyEquipmentReportCount = x.KeyEquipmentReportCount, + KeyEquipmentReportCountRemark = x.KeyEquipmentReportCountRemark, + ChemicalAreaProjectCount = x.ChemicalAreaProjectCount, + ChemicalAreaProjectCountRemark = x.ChemicalAreaProjectCountRemark, + HarmfulMediumCoverCount = x.HarmfulMediumCoverCount, + HarmfulMediumCoverCountRemark = x.HarmfulMediumCoverCountRemark, + HarmfulMediumCoverRate = x.HarmfulMediumCoverRate, + HarmfulMediumCoverRateRemark = x.HarmfulMediumCoverRateRemark + }; + //老接口Serveice + // var getR = hsseC.DataInsertInformation_SafetyQuarterlyReportTable(upReport.ToList()); + //新接口Api + string FullTimeManAttachUrl = string.Empty; + string PMManAttachUrl = string.Empty; + string physicalpath = Funs.RootPath; + FullTimeManAttachUrl = physicalpath + upReport.FirstOrDefault().FullTimeManAttachUrl; + PMManAttachUrl = physicalpath + upReport.FirstOrDefault().PMManAttachUrl; + FullTimeManAttachUrl = UploadFile(FullTimeManAttachUrl); + PMManAttachUrl = UploadFile(PMManAttachUrl); + upReport = from x in upReport + select new Information_SafetyQuarterlyReport + { + SafetyQuarterlyReportId = x.SafetyQuarterlyReportId, + UnitId = x.UnitId, + YearId = x.YearId, + Quarters = x.Quarters, + TotalInWorkHours = x.TotalInWorkHours, + TotalInWorkHoursRemark = x.TotalInWorkHoursRemark, + TotalOutWorkHours = x.TotalOutWorkHours, + TotalOutWorkHoursRemark = x.TotalOutWorkHoursRemark, + WorkHoursLossRate = x.WorkHoursLossRate, + WorkHoursLossRateRemark = x.WorkHoursLossRateRemark, + WorkHoursAccuracy = x.WorkHoursAccuracy, + WorkHoursAccuracyRemark = x.WorkHoursAccuracyRemark, + MainBusinessIncome = x.MainBusinessIncome, + MainBusinessIncomeRemark = x.MainBusinessIncomeRemark, + FillingDate = x.FillingDate, + ConstructionRevenue = x.ConstructionRevenue, + ConstructionRevenueRemark = x.ConstructionRevenueRemark, + UnitTimeIncome = x.UnitTimeIncome, + UnitTimeIncomeRemark = x.UnitTimeIncomeRemark, + BillionsOutputMortality = x.BillionsOutputMortality, + BillionsOutputMortalityRemark = x.BillionsOutputMortalityRemark, + MajorFireAccident = x.MajorFireAccident, + MajorFireAccidentRemark = x.MajorFireAccidentRemark, + MajorEquipAccident = x.MajorEquipAccident, + MajorEquipAccidentRemark = x.MajorEquipAccidentRemark, + AccidentFrequency = x.AccidentFrequency, + AccidentFrequencyRemark = x.AccidentFrequencyRemark, + SeriousInjuryAccident = x.SeriousInjuryAccident, + SeriousInjuryAccidentRemark = x.SeriousInjuryAccidentRemark, + FireAccident = x.FireAccident, + FireAccidentRemark = x.FireAccidentRemark, + EquipmentAccident = x.EquipmentAccident, + EquipmentAccidentRemark = x.EquipmentAccidentRemark, + PoisoningAndInjuries = x.PoisoningAndInjuries, + PoisoningAndInjuriesRemark = x.PoisoningAndInjuriesRemark, + ProductionSafetyInTotal = x.ProductionSafetyInTotal, + ProductionSafetyInTotalRemark = x.ProductionSafetyInTotalRemark, + ProtectionInput = x.ProtectionInput, + ProtectionInputRemark = x.ProtectionInputRemark, + LaboAndHealthIn = x.LaboAndHealthIn, + LaborAndHealthInRemark = x.LaborAndHealthInRemark, + TechnologyProgressIn = x.TechnologyProgressIn, + TechnologyProgressInRemark = x.TechnologyProgressInRemark, + EducationTrainIn = x.EducationTrainIn, + EducationTrainInRemark = x.EducationTrainInRemark, + ProjectCostRate = x.ProjectCostRate, + ProjectCostRateRemark = x.ProjectCostRateRemark, + ProductionInput = x.ProductionInput, + ProductionInputRemark = x.ProductionInputRemark, + Revenue = x.Revenue, + RevenueRemark = x.RevenueRemark, + FullTimeMan = x.FullTimeMan, + FullTimeManRemark = x.FullTimeManRemark, + FullTimeManAttachUrl = FullTimeManAttachUrl, + PMMan = x.PMMan, + PMManRemark = x.PMManRemark, + PMManAttachUrl = PMManAttachUrl, + CorporateDirectorEdu = x.CorporateDirectorEdu, + CorporateDirectorEduRemark = x.CorporateDirectorEduRemark, + ProjectLeaderEdu = x.ProjectLeaderEdu, + ProjectLeaderEduRemark = x.ProjectLeaderEduRemark, + FullTimeEdu = x.FullTimeEdu, + FullTimeEduRemark = x.FullTimeEduRemark, + ThreeKidsEduRate = x.ThreeKidsEduRate, + ThreeKidsEduRateRemark = x.ThreeKidsEduRateRemark, + UplinReportRate = x.UplinReportRate, + UplinReportRateRemark = x.UplinReportRateRemark, + Remarks = x.Remarks, + CompileMan = x.CompileMan, + KeyEquipmentTotal = x.KeyEquipmentTotal, + KeyEquipmentTotalRemark = x.KeyEquipmentTotalRemark, + KeyEquipmentReportCount = x.KeyEquipmentReportCount, + KeyEquipmentReportCountRemark = x.KeyEquipmentReportCountRemark, + ChemicalAreaProjectCount = x.ChemicalAreaProjectCount, + ChemicalAreaProjectCountRemark = x.ChemicalAreaProjectCountRemark, + HarmfulMediumCoverCount = x.HarmfulMediumCoverCount, + HarmfulMediumCoverCountRemark = x.HarmfulMediumCoverCountRemark, + HarmfulMediumCoverRate = x.HarmfulMediumCoverRate, + HarmfulMediumCoverRateRemark = x.HarmfulMediumCoverRateRemark + }; + code = UpApiSaveSafetyQuarterlyReport(upReport).ToString(); + + + ; LogService.AddSys_Log(CurrUser, "【安全生产数据季报上报】上传", code, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.SafetyQuarterlyReportId)) + { + var report = db.Information_SafetyQuarterlyReport.FirstOrDefault(e => e.SafetyQuarterlyReportId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty); + ////更新催报信息 + UrgeReportService.SetComplete(report.UnitId, Const.ReportType_3, report.YearId.ToString(), report.Quarters.ToString()); + } + }; + LogService.AddSys_Log(CurrUser, "【安全生产数据季报上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + + } + else + { + LogService.AddSys_Log(CurrUser, "【安全生产数据季报上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【安全生产数据季报上报】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【安全生产数据季报上报】上传到服务器失败err;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + return code; + } + } + /// + /// DrillConductedQuarterlyReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiSaveSafetyQuarterlyReport(IQueryable upReport) + { + string baseurl = "/api/InformationData/SaveSafetyQuarterlyReport"; + var resultJson = JsonConvert.SerializeObject(new { InformationDataItems = upReport }); + APICommonService.SaveSysHttpLog("api_In", baseurl, resultJson); + var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl); + + return responeData.code; + } + #endregion + + #region 应急演练开展情况季报表上报 + /// + /// 应急演练开展情况季报表上报 + /// + public static string UpDrillConductedQuarterlyReport(string drillConductedQuarterlyReportId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + var upReport = from x in db.Information_DrillConductedQuarterlyReport + where x.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId + select new Information_DrillConductedQuarterlyReport + { + DrillConductedQuarterlyReportId = x.DrillConductedQuarterlyReportId, + UnitId = x.UnitId, + ReportDate = x.ReportDate, + Quarter = x.Quarter, + YearId = x.YearId, + CompileMan = x.CompileMan, + }; + + var upReportItem = from x in db.Information_DrillConductedQuarterlyReportItem + where x.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId + select new Information_DrillConductedQuarterlyReportItem + { + DrillConductedQuarterlyReportItemId = x.DrillConductedQuarterlyReportItemId, + DrillConductedQuarterlyReportId = x.DrillConductedQuarterlyReportId, + IndustryType = x.IndustryType, + TotalConductCount = x.TotalConductCount, + TotalPeopleCount = x.TotalPeopleCount, + TotalInvestment = x.TotalInvestment, + HQConductCount = x.HQConductCount, + HQPeopleCount = x.HQPeopleCount, + HQInvestment = x.HQInvestment, + BasicConductCount = x.BasicConductCount, + BasicPeopleCount = x.BasicPeopleCount, + BasicInvestment = x.BasicInvestment, + ComprehensivePractice = x.ComprehensivePractice, + CPScene = x.CPScene, + CPDesktop = x.CPDesktop, + SpecialDrill = x.SpecialDrill, + SDScene = x.SDScene, + SDDesktop = x.SDDesktop, + SortIndex = x.SortIndex, + }; + //老接口Serveice + //var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList()); + //新接口Api + code = UpApiSaveDrillConductedQuarterlyReport(upReport, upReportItem).ToString(); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.DrillConductedQuarterlyReportId)) + { + var report = db.Information_DrillConductedQuarterlyReport.FirstOrDefault(e => e.DrillConductedQuarterlyReportId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + ProjectDataFlowSetService.CloseFlowOperate(Const.MillionsMonthlyReportMenuId, item, string.Empty); + ////更新催报信息 + UrgeReportService.SetComplete(report.UnitId, Const.ReportType_4, report.YearId.ToString(), report.Quarter.ToString()); + } + } + LogService.AddSys_Log(CurrUser, "【应急演练开展情况季报表上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【应急演练开展情况季报表上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【应急演练开展情况季报表上报】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【应急演练开展情况季报表上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources); + } + + return code; + } + } + /// + /// DrillConductedQuarterlyReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiSaveDrillConductedQuarterlyReport(IQueryable upReport, IQueryable upReportItem) + { + string baseurl = "/api/InformationData/SaveDrillConductedQuarterlyReport"; + //合并 + //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); + var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var resultJson1 = JsonConvert.SerializeObject(new { drillConductedQuarterlyReportItem = upReportItem }); + resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}"; + var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl); + return responeData.code; + } + #endregion + + #region 应急演练工作计划半年报表 + /// + /// 应急演练工作计划半年报表 + /// + public static string UpDrillPlanHalfYearReport(string drillPlanHalfYearReportId, Model.Person_Persons CurrUser) + { + string code = "0"; + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + try + { + var upReport = from x in db.Information_DrillPlanHalfYearReport + where x.DrillPlanHalfYearReportId == drillPlanHalfYearReportId + select new Information_DrillPlanHalfYearReport + { + DrillPlanHalfYearReportId = x.DrillPlanHalfYearReportId, + UnitId = x.UnitId, + CompileMan = x.CompileMan, + CompileDate = x.CompileDate, + YearId = x.YearId, + HalfYearId = x.HalfYearId, + Telephone = x.Telephone, + }; + + var upReportItem = from x in db.Information_DrillPlanHalfYearReportItem + where x.DrillPlanHalfYearReportId == drillPlanHalfYearReportId + select new Information_DrillPlanHalfYearReportItem + { + DrillPlanHalfYearReportItemId = x.DrillPlanHalfYearReportItemId, + DrillPlanHalfYearReportId = x.DrillPlanHalfYearReportId, + DrillPlanName = x.DrillPlanName, + OrganizationUnit = x.OrganizationUnit, + DrillPlanDate = x.DrillPlanDate, + AccidentScene = x.AccidentScene, + ExerciseWay = x.ExerciseWay, + SortIndex = x.SortIndex, + }; + //老接口Serveice + // var getR = hsseC.DataInsertInformation_DrillPlanHalfYearReportTable(upReport.ToList(), upReportItem.ToList()); + //新接口Api + code = UpApiDrillPlanHalfYearReport(upReport, upReportItem).ToString(); + if (code == "1") + { + foreach (var item in upReport.Select(p => p.DrillPlanHalfYearReportId)) + { + var report = db.Information_DrillPlanHalfYearReport.FirstOrDefault(e => e.DrillPlanHalfYearReportId == item); + if (report != null) + { + report.UpState = BLL.Const.UpState_3; + db.SubmitChanges(); + ////更新 当前人要处理的意见 + ProjectDataFlowSetService.CloseFlowOperate(Const.DrillPlanHalfYearReportMenuId, item, string.Empty); + ////更新催报信息 + UrgeReportService.SetComplete(report.UnitId, Const.ReportType_5, report.YearId.ToString(), report.HalfYearId.ToString()); + } + } + + LogService.AddSys_Log(CurrUser, "【应急演练工作计划半年报表】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnUploadResources); + } + else + { + LogService.AddSys_Log(CurrUser, "【应急演练工作计划半年报表】上传到服务器失败;", null, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnUploadResources); + } + + } + catch (Exception ex) + { + ErrLogInfo.WriteLog("【应急演练工作计划半年报表】上传到服务器", ex); + LogService.AddSys_Log(CurrUser, "【应急演练工作计划半年报表】上传到服务器失败;", null, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnUploadResources); + } + return code; + } + } + /// + /// DrillPlanHalfYearReportApi调用 + /// + /// 主表 + /// 明细表 + /// + private static int UpApiDrillPlanHalfYearReport(IQueryable upReport, IQueryable upReportItem) + { + string baseurl = "/api/InformationData/SaveDrillPlanHalfYearReport"; + //合并 + //var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem }); + var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault()); + var resultJson1 = JsonConvert.SerializeObject(new { drillPlanHalfYearReportItem = upReportItem }); + resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}"; + + var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl); + return responeData.code; + } + #endregion + + #endregion + + public partial class Information_MillionsMonthlyReport : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable AccidentMortalityField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable DeathAccidentFrequencyField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DutyPersonField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable FillingDateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string FillingManField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable LostTimeInjuryRateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable LostTimeRateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string MillionsMonthlyReportIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MonthField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable RecordableIncidentRateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string UnitIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable YearField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData + { + get + { + return this.extensionDataField; + } + set + { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable AccidentMortality + { + get + { + return this.AccidentMortalityField; + } + set + { + if ((this.AccidentMortalityField.Equals(value) != true)) + { + this.AccidentMortalityField = value; + this.RaisePropertyChanged("AccidentMortality"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable DeathAccidentFrequency + { + get + { + return this.DeathAccidentFrequencyField; + } + set + { + if ((this.DeathAccidentFrequencyField.Equals(value) != true)) + { + this.DeathAccidentFrequencyField = value; + this.RaisePropertyChanged("DeathAccidentFrequency"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DutyPerson + { + get + { + return this.DutyPersonField; + } + set + { + if ((object.ReferenceEquals(this.DutyPersonField, value) != true)) + { + this.DutyPersonField = value; + this.RaisePropertyChanged("DutyPerson"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable FillingDate + { + get + { + return this.FillingDateField; + } + set + { + if ((this.FillingDateField.Equals(value) != true)) + { + this.FillingDateField = value; + this.RaisePropertyChanged("FillingDate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string FillingMan + { + get + { + return this.FillingManField; + } + set + { + if ((object.ReferenceEquals(this.FillingManField, value) != true)) + { + this.FillingManField = value; + this.RaisePropertyChanged("FillingMan"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable LostTimeInjuryRate + { + get + { + return this.LostTimeInjuryRateField; + } + set + { + if ((this.LostTimeInjuryRateField.Equals(value) != true)) + { + this.LostTimeInjuryRateField = value; + this.RaisePropertyChanged("LostTimeInjuryRate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable LostTimeRate + { + get + { + return this.LostTimeRateField; + } + set + { + if ((this.LostTimeRateField.Equals(value) != true)) + { + this.LostTimeRateField = value; + this.RaisePropertyChanged("LostTimeRate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string MillionsMonthlyReportId + { + get + { + return this.MillionsMonthlyReportIdField; + } + set + { + if ((object.ReferenceEquals(this.MillionsMonthlyReportIdField, value) != true)) + { + this.MillionsMonthlyReportIdField = value; + this.RaisePropertyChanged("MillionsMonthlyReportId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Month + { + get + { + return this.MonthField; + } + set + { + if ((this.MonthField.Equals(value) != true)) + { + this.MonthField = value; + this.RaisePropertyChanged("Month"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable RecordableIncidentRate + { + get + { + return this.RecordableIncidentRateField; + } + set + { + if ((this.RecordableIncidentRateField.Equals(value) != true)) + { + this.RecordableIncidentRateField = value; + this.RaisePropertyChanged("RecordableIncidentRate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string UnitId + { + get + { + return this.UnitIdField; + } + set + { + if ((object.ReferenceEquals(this.UnitIdField, value) != true)) + { + this.UnitIdField = value; + this.RaisePropertyChanged("UnitId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Year + { + get + { + return this.YearField; + } + set + { + if ((this.YearField.Equals(value) != true)) + { + this.YearField = value; + this.RaisePropertyChanged("Year"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) + { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + public partial class Information_MillionsMonthlyReportItem : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string AffiliationField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable AttemptedEventNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ContractorNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable EquipmentNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ExplosionNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable FireNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable FirstAidDressingsNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable LossDayNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MedicalTreatmentLossHourField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MedicalTreatmentPersonNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string MillionsMonthlyReportIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string MillionsMonthlyReportItemIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorAccidentLossHourField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorAccidentNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorAccidentPersonNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string NameField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable OtherAccidentLossHourField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable OtherAccidentNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable OtherAccidentPersonNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable OtherNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable PostPersonNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable QualityNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable RestrictedWorkLossHourField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable RestrictedWorkPersonNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SeriousInjuriesLossHourField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SeriousInjuriesNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SeriousInjuriesPersonNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SnapPersonNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SortIndexField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SumPersonNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalWorkNumField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TrafficNumField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData + { + get + { + return this.extensionDataField; + } + set + { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string Affiliation + { + get + { + return this.AffiliationField; + } + set + { + if ((object.ReferenceEquals(this.AffiliationField, value) != true)) + { + this.AffiliationField = value; + this.RaisePropertyChanged("Affiliation"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable AttemptedEventNum + { + get + { + return this.AttemptedEventNumField; + } + set + { + if ((this.AttemptedEventNumField.Equals(value) != true)) + { + this.AttemptedEventNumField = value; + this.RaisePropertyChanged("AttemptedEventNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ContractorNum + { + get + { + return this.ContractorNumField; + } + set + { + if ((this.ContractorNumField.Equals(value) != true)) + { + this.ContractorNumField = value; + this.RaisePropertyChanged("ContractorNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable EquipmentNum + { + get + { + return this.EquipmentNumField; + } + set + { + if ((this.EquipmentNumField.Equals(value) != true)) + { + this.EquipmentNumField = value; + this.RaisePropertyChanged("EquipmentNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ExplosionNum + { + get + { + return this.ExplosionNumField; + } + set + { + if ((this.ExplosionNumField.Equals(value) != true)) + { + this.ExplosionNumField = value; + this.RaisePropertyChanged("ExplosionNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable FireNum + { + get + { + return this.FireNumField; + } + set + { + if ((this.FireNumField.Equals(value) != true)) + { + this.FireNumField = value; + this.RaisePropertyChanged("FireNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable FirstAidDressingsNum + { + get + { + return this.FirstAidDressingsNumField; + } + set + { + if ((this.FirstAidDressingsNumField.Equals(value) != true)) + { + this.FirstAidDressingsNumField = value; + this.RaisePropertyChanged("FirstAidDressingsNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable LossDayNum + { + get + { + return this.LossDayNumField; + } + set + { + if ((this.LossDayNumField.Equals(value) != true)) + { + this.LossDayNumField = value; + this.RaisePropertyChanged("LossDayNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MedicalTreatmentLossHour + { + get + { + return this.MedicalTreatmentLossHourField; + } + set + { + if ((this.MedicalTreatmentLossHourField.Equals(value) != true)) + { + this.MedicalTreatmentLossHourField = value; + this.RaisePropertyChanged("MedicalTreatmentLossHour"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MedicalTreatmentPersonNum + { + get + { + return this.MedicalTreatmentPersonNumField; + } + set + { + if ((this.MedicalTreatmentPersonNumField.Equals(value) != true)) + { + this.MedicalTreatmentPersonNumField = value; + this.RaisePropertyChanged("MedicalTreatmentPersonNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string MillionsMonthlyReportId + { + get + { + return this.MillionsMonthlyReportIdField; + } + set + { + if ((object.ReferenceEquals(this.MillionsMonthlyReportIdField, value) != true)) + { + this.MillionsMonthlyReportIdField = value; + this.RaisePropertyChanged("MillionsMonthlyReportId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string MillionsMonthlyReportItemId + { + get + { + return this.MillionsMonthlyReportItemIdField; + } + set + { + if ((object.ReferenceEquals(this.MillionsMonthlyReportItemIdField, value) != true)) + { + this.MillionsMonthlyReportItemIdField = value; + this.RaisePropertyChanged("MillionsMonthlyReportItemId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorAccidentLossHour + { + get + { + return this.MinorAccidentLossHourField; + } + set + { + if ((this.MinorAccidentLossHourField.Equals(value) != true)) + { + this.MinorAccidentLossHourField = value; + this.RaisePropertyChanged("MinorAccidentLossHour"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorAccidentNum + { + get + { + return this.MinorAccidentNumField; + } + set + { + if ((this.MinorAccidentNumField.Equals(value) != true)) + { + this.MinorAccidentNumField = value; + this.RaisePropertyChanged("MinorAccidentNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorAccidentPersonNum + { + get + { + return this.MinorAccidentPersonNumField; + } + set + { + if ((this.MinorAccidentPersonNumField.Equals(value) != true)) + { + this.MinorAccidentPersonNumField = value; + this.RaisePropertyChanged("MinorAccidentPersonNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string Name + { + get + { + return this.NameField; + } + set + { + if ((object.ReferenceEquals(this.NameField, value) != true)) + { + this.NameField = value; + this.RaisePropertyChanged("Name"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable OtherAccidentLossHour + { + get + { + return this.OtherAccidentLossHourField; + } + set + { + if ((this.OtherAccidentLossHourField.Equals(value) != true)) + { + this.OtherAccidentLossHourField = value; + this.RaisePropertyChanged("OtherAccidentLossHour"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable OtherAccidentNum + { + get + { + return this.OtherAccidentNumField; + } + set + { + if ((this.OtherAccidentNumField.Equals(value) != true)) + { + this.OtherAccidentNumField = value; + this.RaisePropertyChanged("OtherAccidentNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable OtherAccidentPersonNum + { + get + { + return this.OtherAccidentPersonNumField; + } + set + { + if ((this.OtherAccidentPersonNumField.Equals(value) != true)) + { + this.OtherAccidentPersonNumField = value; + this.RaisePropertyChanged("OtherAccidentPersonNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable OtherNum + { + get + { + return this.OtherNumField; + } + set + { + if ((this.OtherNumField.Equals(value) != true)) + { + this.OtherNumField = value; + this.RaisePropertyChanged("OtherNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable PostPersonNum + { + get + { + return this.PostPersonNumField; + } + set + { + if ((this.PostPersonNumField.Equals(value) != true)) + { + this.PostPersonNumField = value; + this.RaisePropertyChanged("PostPersonNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable QualityNum + { + get + { + return this.QualityNumField; + } + set + { + if ((this.QualityNumField.Equals(value) != true)) + { + this.QualityNumField = value; + this.RaisePropertyChanged("QualityNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable RestrictedWorkLossHour + { + get + { + return this.RestrictedWorkLossHourField; + } + set + { + if ((this.RestrictedWorkLossHourField.Equals(value) != true)) + { + this.RestrictedWorkLossHourField = value; + this.RaisePropertyChanged("RestrictedWorkLossHour"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable RestrictedWorkPersonNum + { + get + { + return this.RestrictedWorkPersonNumField; + } + set + { + if ((this.RestrictedWorkPersonNumField.Equals(value) != true)) + { + this.RestrictedWorkPersonNumField = value; + this.RaisePropertyChanged("RestrictedWorkPersonNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SeriousInjuriesLossHour + { + get + { + return this.SeriousInjuriesLossHourField; + } + set + { + if ((this.SeriousInjuriesLossHourField.Equals(value) != true)) + { + this.SeriousInjuriesLossHourField = value; + this.RaisePropertyChanged("SeriousInjuriesLossHour"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SeriousInjuriesNum + { + get + { + return this.SeriousInjuriesNumField; + } + set + { + if ((this.SeriousInjuriesNumField.Equals(value) != true)) + { + this.SeriousInjuriesNumField = value; + this.RaisePropertyChanged("SeriousInjuriesNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SeriousInjuriesPersonNum + { + get + { + return this.SeriousInjuriesPersonNumField; + } + set + { + if ((this.SeriousInjuriesPersonNumField.Equals(value) != true)) + { + this.SeriousInjuriesPersonNumField = value; + this.RaisePropertyChanged("SeriousInjuriesPersonNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SnapPersonNum + { + get + { + return this.SnapPersonNumField; + } + set + { + if ((this.SnapPersonNumField.Equals(value) != true)) + { + this.SnapPersonNumField = value; + this.RaisePropertyChanged("SnapPersonNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SortIndex + { + get + { + return this.SortIndexField; + } + set + { + if ((this.SortIndexField.Equals(value) != true)) + { + this.SortIndexField = value; + this.RaisePropertyChanged("SortIndex"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SumPersonNum + { + get + { + return this.SumPersonNumField; + } + set + { + if ((this.SumPersonNumField.Equals(value) != true)) + { + this.SumPersonNumField = value; + this.RaisePropertyChanged("SumPersonNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalWorkNum + { + get + { + return this.TotalWorkNumField; + } + set + { + if ((this.TotalWorkNumField.Equals(value) != true)) + { + this.TotalWorkNumField = value; + this.RaisePropertyChanged("TotalWorkNum"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TrafficNum + { + get + { + return this.TrafficNumField; + } + set + { + if ((this.TrafficNumField.Equals(value) != true)) + { + this.TrafficNumField = value; + this.RaisePropertyChanged("TrafficNum"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) + { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + public partial class Information_AccidentCauseReport : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string AccidentCauseReportCodeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string AccidentCauseReportIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string AuditPersonField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable AverageManHoursField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable AverageTotalHoursField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable DeathAccidentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable DeathTollField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable DirectLossField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string FillCompanyPersonChargeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable FillingDateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable IndirectLossesField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable InjuredAccidentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable InjuredTollField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable KnockOffTotalField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable LastMonthLossHoursTotalField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorWoundAccidentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorWoundTollField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MonthField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string TabPeopleField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalLossField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalLossManField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalLossTimeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string UnitIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable YearField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData + { + get + { + return this.extensionDataField; + } + set + { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string AccidentCauseReportCode + { + get + { + return this.AccidentCauseReportCodeField; + } + set + { + if ((object.ReferenceEquals(this.AccidentCauseReportCodeField, value) != true)) + { + this.AccidentCauseReportCodeField = value; + this.RaisePropertyChanged("AccidentCauseReportCode"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string AccidentCauseReportId + { + get + { + return this.AccidentCauseReportIdField; + } + set + { + if ((object.ReferenceEquals(this.AccidentCauseReportIdField, value) != true)) + { + this.AccidentCauseReportIdField = value; + this.RaisePropertyChanged("AccidentCauseReportId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string AuditPerson + { + get + { + return this.AuditPersonField; + } + set + { + if ((object.ReferenceEquals(this.AuditPersonField, value) != true)) + { + this.AuditPersonField = value; + this.RaisePropertyChanged("AuditPerson"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable AverageManHours + { + get + { + return this.AverageManHoursField; + } + set + { + if ((this.AverageManHoursField.Equals(value) != true)) + { + this.AverageManHoursField = value; + this.RaisePropertyChanged("AverageManHours"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable AverageTotalHours + { + get + { + return this.AverageTotalHoursField; + } + set + { + if ((this.AverageTotalHoursField.Equals(value) != true)) + { + this.AverageTotalHoursField = value; + this.RaisePropertyChanged("AverageTotalHours"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable DeathAccident + { + get + { + return this.DeathAccidentField; + } + set + { + if ((this.DeathAccidentField.Equals(value) != true)) + { + this.DeathAccidentField = value; + this.RaisePropertyChanged("DeathAccident"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable DeathToll + { + get + { + return this.DeathTollField; + } + set + { + if ((this.DeathTollField.Equals(value) != true)) + { + this.DeathTollField = value; + this.RaisePropertyChanged("DeathToll"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable DirectLoss + { + get + { + return this.DirectLossField; + } + set + { + if ((this.DirectLossField.Equals(value) != true)) + { + this.DirectLossField = value; + this.RaisePropertyChanged("DirectLoss"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string FillCompanyPersonCharge + { + get + { + return this.FillCompanyPersonChargeField; + } + set + { + if ((object.ReferenceEquals(this.FillCompanyPersonChargeField, value) != true)) + { + this.FillCompanyPersonChargeField = value; + this.RaisePropertyChanged("FillCompanyPersonCharge"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable FillingDate + { + get + { + return this.FillingDateField; + } + set + { + if ((this.FillingDateField.Equals(value) != true)) + { + this.FillingDateField = value; + this.RaisePropertyChanged("FillingDate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable IndirectLosses + { + get + { + return this.IndirectLossesField; + } + set + { + if ((this.IndirectLossesField.Equals(value) != true)) + { + this.IndirectLossesField = value; + this.RaisePropertyChanged("IndirectLosses"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable InjuredAccident + { + get + { + return this.InjuredAccidentField; + } + set + { + if ((this.InjuredAccidentField.Equals(value) != true)) + { + this.InjuredAccidentField = value; + this.RaisePropertyChanged("InjuredAccident"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable InjuredToll + { + get + { + return this.InjuredTollField; + } + set + { + if ((this.InjuredTollField.Equals(value) != true)) + { + this.InjuredTollField = value; + this.RaisePropertyChanged("InjuredToll"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable KnockOffTotal + { + get + { + return this.KnockOffTotalField; + } + set + { + if ((this.KnockOffTotalField.Equals(value) != true)) + { + this.KnockOffTotalField = value; + this.RaisePropertyChanged("KnockOffTotal"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable LastMonthLossHoursTotal + { + get + { + return this.LastMonthLossHoursTotalField; + } + set + { + if ((this.LastMonthLossHoursTotalField.Equals(value) != true)) + { + this.LastMonthLossHoursTotalField = value; + this.RaisePropertyChanged("LastMonthLossHoursTotal"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorWoundAccident + { + get + { + return this.MinorWoundAccidentField; + } + set + { + if ((this.MinorWoundAccidentField.Equals(value) != true)) + { + this.MinorWoundAccidentField = value; + this.RaisePropertyChanged("MinorWoundAccident"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorWoundToll + { + get + { + return this.MinorWoundTollField; + } + set + { + if ((this.MinorWoundTollField.Equals(value) != true)) + { + this.MinorWoundTollField = value; + this.RaisePropertyChanged("MinorWoundToll"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Month + { + get + { + return this.MonthField; + } + set + { + if ((this.MonthField.Equals(value) != true)) + { + this.MonthField = value; + this.RaisePropertyChanged("Month"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string TabPeople + { + get + { + return this.TabPeopleField; + } + set + { + if ((object.ReferenceEquals(this.TabPeopleField, value) != true)) + { + this.TabPeopleField = value; + this.RaisePropertyChanged("TabPeople"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalLoss + { + get + { + return this.TotalLossField; + } + set + { + if ((this.TotalLossField.Equals(value) != true)) + { + this.TotalLossField = value; + this.RaisePropertyChanged("TotalLoss"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalLossMan + { + get + { + return this.TotalLossManField; + } + set + { + if ((this.TotalLossManField.Equals(value) != true)) + { + this.TotalLossManField = value; + this.RaisePropertyChanged("TotalLossMan"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalLossTime + { + get + { + return this.TotalLossTimeField; + } + set + { + if ((this.TotalLossTimeField.Equals(value) != true)) + { + this.TotalLossTimeField = value; + this.RaisePropertyChanged("TotalLossTime"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string UnitId + { + get + { + return this.UnitIdField; + } + set + { + if ((object.ReferenceEquals(this.UnitIdField, value) != true)) + { + this.UnitIdField = value; + this.RaisePropertyChanged("UnitId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Year + { + get + { + return this.YearField; + } + set + { + if ((this.YearField.Equals(value) != true)) + { + this.YearField = value; + this.RaisePropertyChanged("Year"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) + { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + public partial class Information_AccidentCauseReportItem : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string AccidentCauseReportIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string AccidentCauseReportItemIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string AccidentTypeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death1Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death10Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death11Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death2Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death3Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death4Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death5Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death6Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death7Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death8Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Death9Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries1Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries10Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries11Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries2Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries3Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries4Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries5Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries6Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries7Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries8Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable Injuries9Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries1Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries10Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries11Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries2Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries3Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries4Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries5Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries6Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries7Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries8Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MinorInjuries9Field; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalDeathField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalInjuriesField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalMinorInjuriesField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData + { + get + { + return this.extensionDataField; + } + set + { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string AccidentCauseReportId + { + get + { + return this.AccidentCauseReportIdField; + } + set + { + if ((object.ReferenceEquals(this.AccidentCauseReportIdField, value) != true)) + { + this.AccidentCauseReportIdField = value; + this.RaisePropertyChanged("AccidentCauseReportId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string AccidentCauseReportItemId + { + get + { + return this.AccidentCauseReportItemIdField; + } + set + { + if ((object.ReferenceEquals(this.AccidentCauseReportItemIdField, value) != true)) + { + this.AccidentCauseReportItemIdField = value; + this.RaisePropertyChanged("AccidentCauseReportItemId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string AccidentType + { + get + { + return this.AccidentTypeField; + } + set + { + if ((object.ReferenceEquals(this.AccidentTypeField, value) != true)) + { + this.AccidentTypeField = value; + this.RaisePropertyChanged("AccidentType"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death1 + { + get + { + return this.Death1Field; + } + set + { + if ((this.Death1Field.Equals(value) != true)) + { + this.Death1Field = value; + this.RaisePropertyChanged("Death1"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death10 + { + get + { + return this.Death10Field; + } + set + { + if ((this.Death10Field.Equals(value) != true)) + { + this.Death10Field = value; + this.RaisePropertyChanged("Death10"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death11 + { + get + { + return this.Death11Field; + } + set + { + if ((this.Death11Field.Equals(value) != true)) + { + this.Death11Field = value; + this.RaisePropertyChanged("Death11"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death2 + { + get + { + return this.Death2Field; + } + set + { + if ((this.Death2Field.Equals(value) != true)) + { + this.Death2Field = value; + this.RaisePropertyChanged("Death2"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death3 + { + get + { + return this.Death3Field; + } + set + { + if ((this.Death3Field.Equals(value) != true)) + { + this.Death3Field = value; + this.RaisePropertyChanged("Death3"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death4 + { + get + { + return this.Death4Field; + } + set + { + if ((this.Death4Field.Equals(value) != true)) + { + this.Death4Field = value; + this.RaisePropertyChanged("Death4"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death5 + { + get + { + return this.Death5Field; + } + set + { + if ((this.Death5Field.Equals(value) != true)) + { + this.Death5Field = value; + this.RaisePropertyChanged("Death5"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death6 + { + get + { + return this.Death6Field; + } + set + { + if ((this.Death6Field.Equals(value) != true)) + { + this.Death6Field = value; + this.RaisePropertyChanged("Death6"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death7 + { + get + { + return this.Death7Field; + } + set + { + if ((this.Death7Field.Equals(value) != true)) + { + this.Death7Field = value; + this.RaisePropertyChanged("Death7"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death8 + { + get + { + return this.Death8Field; + } + set + { + if ((this.Death8Field.Equals(value) != true)) + { + this.Death8Field = value; + this.RaisePropertyChanged("Death8"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Death9 + { + get + { + return this.Death9Field; + } + set + { + if ((this.Death9Field.Equals(value) != true)) + { + this.Death9Field = value; + this.RaisePropertyChanged("Death9"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries1 + { + get + { + return this.Injuries1Field; + } + set + { + if ((this.Injuries1Field.Equals(value) != true)) + { + this.Injuries1Field = value; + this.RaisePropertyChanged("Injuries1"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries10 + { + get + { + return this.Injuries10Field; + } + set + { + if ((this.Injuries10Field.Equals(value) != true)) + { + this.Injuries10Field = value; + this.RaisePropertyChanged("Injuries10"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries11 + { + get + { + return this.Injuries11Field; + } + set + { + if ((this.Injuries11Field.Equals(value) != true)) + { + this.Injuries11Field = value; + this.RaisePropertyChanged("Injuries11"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries2 + { + get + { + return this.Injuries2Field; + } + set + { + if ((this.Injuries2Field.Equals(value) != true)) + { + this.Injuries2Field = value; + this.RaisePropertyChanged("Injuries2"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries3 + { + get + { + return this.Injuries3Field; + } + set + { + if ((this.Injuries3Field.Equals(value) != true)) + { + this.Injuries3Field = value; + this.RaisePropertyChanged("Injuries3"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries4 + { + get + { + return this.Injuries4Field; + } + set + { + if ((this.Injuries4Field.Equals(value) != true)) + { + this.Injuries4Field = value; + this.RaisePropertyChanged("Injuries4"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries5 + { + get + { + return this.Injuries5Field; + } + set + { + if ((this.Injuries5Field.Equals(value) != true)) + { + this.Injuries5Field = value; + this.RaisePropertyChanged("Injuries5"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries6 + { + get + { + return this.Injuries6Field; + } + set + { + if ((this.Injuries6Field.Equals(value) != true)) + { + this.Injuries6Field = value; + this.RaisePropertyChanged("Injuries6"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries7 + { + get + { + return this.Injuries7Field; + } + set + { + if ((this.Injuries7Field.Equals(value) != true)) + { + this.Injuries7Field = value; + this.RaisePropertyChanged("Injuries7"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries8 + { + get + { + return this.Injuries8Field; + } + set + { + if ((this.Injuries8Field.Equals(value) != true)) + { + this.Injuries8Field = value; + this.RaisePropertyChanged("Injuries8"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Injuries9 + { + get + { + return this.Injuries9Field; + } + set + { + if ((this.Injuries9Field.Equals(value) != true)) + { + this.Injuries9Field = value; + this.RaisePropertyChanged("Injuries9"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries1 + { + get + { + return this.MinorInjuries1Field; + } + set + { + if ((this.MinorInjuries1Field.Equals(value) != true)) + { + this.MinorInjuries1Field = value; + this.RaisePropertyChanged("MinorInjuries1"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries10 + { + get + { + return this.MinorInjuries10Field; + } + set + { + if ((this.MinorInjuries10Field.Equals(value) != true)) + { + this.MinorInjuries10Field = value; + this.RaisePropertyChanged("MinorInjuries10"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries11 + { + get + { + return this.MinorInjuries11Field; + } + set + { + if ((this.MinorInjuries11Field.Equals(value) != true)) + { + this.MinorInjuries11Field = value; + this.RaisePropertyChanged("MinorInjuries11"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries2 + { + get + { + return this.MinorInjuries2Field; + } + set + { + if ((this.MinorInjuries2Field.Equals(value) != true)) + { + this.MinorInjuries2Field = value; + this.RaisePropertyChanged("MinorInjuries2"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries3 + { + get + { + return this.MinorInjuries3Field; + } + set + { + if ((this.MinorInjuries3Field.Equals(value) != true)) + { + this.MinorInjuries3Field = value; + this.RaisePropertyChanged("MinorInjuries3"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries4 + { + get + { + return this.MinorInjuries4Field; + } + set + { + if ((this.MinorInjuries4Field.Equals(value) != true)) + { + this.MinorInjuries4Field = value; + this.RaisePropertyChanged("MinorInjuries4"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries5 + { + get + { + return this.MinorInjuries5Field; + } + set + { + if ((this.MinorInjuries5Field.Equals(value) != true)) + { + this.MinorInjuries5Field = value; + this.RaisePropertyChanged("MinorInjuries5"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries6 + { + get + { + return this.MinorInjuries6Field; + } + set + { + if ((this.MinorInjuries6Field.Equals(value) != true)) + { + this.MinorInjuries6Field = value; + this.RaisePropertyChanged("MinorInjuries6"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries7 + { + get + { + return this.MinorInjuries7Field; + } + set + { + if ((this.MinorInjuries7Field.Equals(value) != true)) + { + this.MinorInjuries7Field = value; + this.RaisePropertyChanged("MinorInjuries7"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries8 + { + get + { + return this.MinorInjuries8Field; + } + set + { + if ((this.MinorInjuries8Field.Equals(value) != true)) + { + this.MinorInjuries8Field = value; + this.RaisePropertyChanged("MinorInjuries8"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MinorInjuries9 + { + get + { + return this.MinorInjuries9Field; + } + set + { + if ((this.MinorInjuries9Field.Equals(value) != true)) + { + this.MinorInjuries9Field = value; + this.RaisePropertyChanged("MinorInjuries9"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalDeath + { + get + { + return this.TotalDeathField; + } + set + { + if ((this.TotalDeathField.Equals(value) != true)) + { + this.TotalDeathField = value; + this.RaisePropertyChanged("TotalDeath"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalInjuries + { + get + { + return this.TotalInjuriesField; + } + set + { + if ((this.TotalInjuriesField.Equals(value) != true)) + { + this.TotalInjuriesField = value; + this.RaisePropertyChanged("TotalInjuries"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalMinorInjuries + { + get + { + return this.TotalMinorInjuriesField; + } + set + { + if ((this.TotalMinorInjuriesField.Equals(value) != true)) + { + this.TotalMinorInjuriesField = value; + this.RaisePropertyChanged("TotalMinorInjuries"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) + { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + public partial class Information_SafetyQuarterlyReport : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable AccidentFrequencyField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string AccidentFrequencyRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable BillionsOutputMortalityField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string BillionsOutputMortalityRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ChemicalAreaProjectCountField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ChemicalAreaProjectCountRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string CompileManField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ConstructionRevenueField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ConstructionRevenueRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable CorporateDirectorEduField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string CorporateDirectorEduRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable EducationTrainInField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string EducationTrainInRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable EquipmentAccidentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string EquipmentAccidentRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable FillingDateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable FireAccidentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string FireAccidentRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable FullTimeEduField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string FullTimeEduRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable FullTimeManField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string FullTimeManAttachUrlField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Collections.Generic.List FullTimeManAttachUrlFileContextField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string FullTimeManRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable HarmfulMediumCoverCountField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string HarmfulMediumCoverCountRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable HarmfulMediumCoverRateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string HarmfulMediumCoverRateRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable KeyEquipmentReportCountField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string KeyEquipmentReportCountRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable KeyEquipmentTotalField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string KeyEquipmentTotalRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable LaboAndHealthInField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string LaborAndHealthInRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MainBusinessIncomeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string MainBusinessIncomeRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MajorEquipAccidentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string MajorEquipAccidentRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable MajorFireAccidentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string MajorFireAccidentRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable PMManField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string PMManAttachUrlField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Collections.Generic.List PMManAttachUrlFileContextField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string PMManRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable PoisoningAndInjuriesField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string PoisoningAndInjuriesRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ProductionInputField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ProductionInputRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ProductionSafetyInTotalField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ProductionSafetyInTotalRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ProjectCostRateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ProjectCostRateRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ProjectLeaderEduField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ProjectLeaderEduRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ProtectionInputField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ProtectionInputRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable QuartersField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string RemarksField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable RevenueField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string RevenueRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string SafetyQuarterlyReportIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SeriousInjuryAccidentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string SeriousInjuryAccidentRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TechnologyProgressInField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string TechnologyProgressInRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ThreeKidsEduRateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ThreeKidsEduRateRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalInWorkHoursField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string TotalInWorkHoursRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalOutWorkHoursField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string TotalOutWorkHoursRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string UnitIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable UnitTimeIncomeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string UnitTimeIncomeRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable UplinReportRateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string UplinReportRateRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable WorkHoursAccuracyField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string WorkHoursAccuracyRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable WorkHoursLossRateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string WorkHoursLossRateRemarkField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable YearIdField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData + { + get + { + return this.extensionDataField; + } + set + { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable AccidentFrequency + { + get + { + return this.AccidentFrequencyField; + } + set + { + if ((this.AccidentFrequencyField.Equals(value) != true)) + { + this.AccidentFrequencyField = value; + this.RaisePropertyChanged("AccidentFrequency"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string AccidentFrequencyRemark + { + get + { + return this.AccidentFrequencyRemarkField; + } + set + { + if ((object.ReferenceEquals(this.AccidentFrequencyRemarkField, value) != true)) + { + this.AccidentFrequencyRemarkField = value; + this.RaisePropertyChanged("AccidentFrequencyRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable BillionsOutputMortality + { + get + { + return this.BillionsOutputMortalityField; + } + set + { + if ((this.BillionsOutputMortalityField.Equals(value) != true)) + { + this.BillionsOutputMortalityField = value; + this.RaisePropertyChanged("BillionsOutputMortality"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string BillionsOutputMortalityRemark + { + get + { + return this.BillionsOutputMortalityRemarkField; + } + set + { + if ((object.ReferenceEquals(this.BillionsOutputMortalityRemarkField, value) != true)) + { + this.BillionsOutputMortalityRemarkField = value; + this.RaisePropertyChanged("BillionsOutputMortalityRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ChemicalAreaProjectCount + { + get + { + return this.ChemicalAreaProjectCountField; + } + set + { + if ((this.ChemicalAreaProjectCountField.Equals(value) != true)) + { + this.ChemicalAreaProjectCountField = value; + this.RaisePropertyChanged("ChemicalAreaProjectCount"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ChemicalAreaProjectCountRemark + { + get + { + return this.ChemicalAreaProjectCountRemarkField; + } + set + { + if ((object.ReferenceEquals(this.ChemicalAreaProjectCountRemarkField, value) != true)) + { + this.ChemicalAreaProjectCountRemarkField = value; + this.RaisePropertyChanged("ChemicalAreaProjectCountRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string CompileMan + { + get + { + return this.CompileManField; + } + set + { + if ((object.ReferenceEquals(this.CompileManField, value) != true)) + { + this.CompileManField = value; + this.RaisePropertyChanged("CompileMan"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ConstructionRevenue + { + get + { + return this.ConstructionRevenueField; + } + set + { + if ((this.ConstructionRevenueField.Equals(value) != true)) + { + this.ConstructionRevenueField = value; + this.RaisePropertyChanged("ConstructionRevenue"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ConstructionRevenueRemark + { + get + { + return this.ConstructionRevenueRemarkField; + } + set + { + if ((object.ReferenceEquals(this.ConstructionRevenueRemarkField, value) != true)) + { + this.ConstructionRevenueRemarkField = value; + this.RaisePropertyChanged("ConstructionRevenueRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable CorporateDirectorEdu + { + get + { + return this.CorporateDirectorEduField; + } + set + { + if ((this.CorporateDirectorEduField.Equals(value) != true)) + { + this.CorporateDirectorEduField = value; + this.RaisePropertyChanged("CorporateDirectorEdu"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string CorporateDirectorEduRemark + { + get + { + return this.CorporateDirectorEduRemarkField; + } + set + { + if ((object.ReferenceEquals(this.CorporateDirectorEduRemarkField, value) != true)) + { + this.CorporateDirectorEduRemarkField = value; + this.RaisePropertyChanged("CorporateDirectorEduRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable EducationTrainIn + { + get + { + return this.EducationTrainInField; + } + set + { + if ((this.EducationTrainInField.Equals(value) != true)) + { + this.EducationTrainInField = value; + this.RaisePropertyChanged("EducationTrainIn"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string EducationTrainInRemark + { + get + { + return this.EducationTrainInRemarkField; + } + set + { + if ((object.ReferenceEquals(this.EducationTrainInRemarkField, value) != true)) + { + this.EducationTrainInRemarkField = value; + this.RaisePropertyChanged("EducationTrainInRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable EquipmentAccident + { + get + { + return this.EquipmentAccidentField; + } + set + { + if ((this.EquipmentAccidentField.Equals(value) != true)) + { + this.EquipmentAccidentField = value; + this.RaisePropertyChanged("EquipmentAccident"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string EquipmentAccidentRemark + { + get + { + return this.EquipmentAccidentRemarkField; + } + set + { + if ((object.ReferenceEquals(this.EquipmentAccidentRemarkField, value) != true)) + { + this.EquipmentAccidentRemarkField = value; + this.RaisePropertyChanged("EquipmentAccidentRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable FillingDate + { + get + { + return this.FillingDateField; + } + set + { + if ((this.FillingDateField.Equals(value) != true)) + { + this.FillingDateField = value; + this.RaisePropertyChanged("FillingDate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable FireAccident + { + get + { + return this.FireAccidentField; + } + set + { + if ((this.FireAccidentField.Equals(value) != true)) + { + this.FireAccidentField = value; + this.RaisePropertyChanged("FireAccident"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string FireAccidentRemark + { + get + { + return this.FireAccidentRemarkField; + } + set + { + if ((object.ReferenceEquals(this.FireAccidentRemarkField, value) != true)) + { + this.FireAccidentRemarkField = value; + this.RaisePropertyChanged("FireAccidentRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable FullTimeEdu + { + get + { + return this.FullTimeEduField; + } + set + { + if ((this.FullTimeEduField.Equals(value) != true)) + { + this.FullTimeEduField = value; + this.RaisePropertyChanged("FullTimeEdu"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string FullTimeEduRemark + { + get + { + return this.FullTimeEduRemarkField; + } + set + { + if ((object.ReferenceEquals(this.FullTimeEduRemarkField, value) != true)) + { + this.FullTimeEduRemarkField = value; + this.RaisePropertyChanged("FullTimeEduRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable FullTimeMan + { + get + { + return this.FullTimeManField; + } + set + { + if ((this.FullTimeManField.Equals(value) != true)) + { + this.FullTimeManField = value; + this.RaisePropertyChanged("FullTimeMan"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string FullTimeManAttachUrl + { + get + { + return this.FullTimeManAttachUrlField; + } + set + { + if ((object.ReferenceEquals(this.FullTimeManAttachUrlField, value) != true)) + { + this.FullTimeManAttachUrlField = value; + this.RaisePropertyChanged("FullTimeManAttachUrl"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Collections.Generic.List FullTimeManAttachUrlFileContext + { + get + { + return this.FullTimeManAttachUrlFileContextField; + } + set + { + if ((object.ReferenceEquals(this.FullTimeManAttachUrlFileContextField, value) != true)) + { + this.FullTimeManAttachUrlFileContextField = value; + this.RaisePropertyChanged("FullTimeManAttachUrlFileContext"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string FullTimeManRemark + { + get + { + return this.FullTimeManRemarkField; + } + set + { + if ((object.ReferenceEquals(this.FullTimeManRemarkField, value) != true)) + { + this.FullTimeManRemarkField = value; + this.RaisePropertyChanged("FullTimeManRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable HarmfulMediumCoverCount + { + get + { + return this.HarmfulMediumCoverCountField; + } + set + { + if ((this.HarmfulMediumCoverCountField.Equals(value) != true)) + { + this.HarmfulMediumCoverCountField = value; + this.RaisePropertyChanged("HarmfulMediumCoverCount"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string HarmfulMediumCoverCountRemark + { + get + { + return this.HarmfulMediumCoverCountRemarkField; + } + set + { + if ((object.ReferenceEquals(this.HarmfulMediumCoverCountRemarkField, value) != true)) + { + this.HarmfulMediumCoverCountRemarkField = value; + this.RaisePropertyChanged("HarmfulMediumCoverCountRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable HarmfulMediumCoverRate + { + get + { + return this.HarmfulMediumCoverRateField; + } + set + { + if ((this.HarmfulMediumCoverRateField.Equals(value) != true)) + { + this.HarmfulMediumCoverRateField = value; + this.RaisePropertyChanged("HarmfulMediumCoverRate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string HarmfulMediumCoverRateRemark + { + get + { + return this.HarmfulMediumCoverRateRemarkField; + } + set + { + if ((object.ReferenceEquals(this.HarmfulMediumCoverRateRemarkField, value) != true)) + { + this.HarmfulMediumCoverRateRemarkField = value; + this.RaisePropertyChanged("HarmfulMediumCoverRateRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable KeyEquipmentReportCount + { + get + { + return this.KeyEquipmentReportCountField; + } + set + { + if ((this.KeyEquipmentReportCountField.Equals(value) != true)) + { + this.KeyEquipmentReportCountField = value; + this.RaisePropertyChanged("KeyEquipmentReportCount"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string KeyEquipmentReportCountRemark + { + get + { + return this.KeyEquipmentReportCountRemarkField; + } + set + { + if ((object.ReferenceEquals(this.KeyEquipmentReportCountRemarkField, value) != true)) + { + this.KeyEquipmentReportCountRemarkField = value; + this.RaisePropertyChanged("KeyEquipmentReportCountRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable KeyEquipmentTotal + { + get + { + return this.KeyEquipmentTotalField; + } + set + { + if ((this.KeyEquipmentTotalField.Equals(value) != true)) + { + this.KeyEquipmentTotalField = value; + this.RaisePropertyChanged("KeyEquipmentTotal"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string KeyEquipmentTotalRemark + { + get + { + return this.KeyEquipmentTotalRemarkField; + } + set + { + if ((object.ReferenceEquals(this.KeyEquipmentTotalRemarkField, value) != true)) + { + this.KeyEquipmentTotalRemarkField = value; + this.RaisePropertyChanged("KeyEquipmentTotalRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable LaboAndHealthIn + { + get + { + return this.LaboAndHealthInField; + } + set + { + if ((this.LaboAndHealthInField.Equals(value) != true)) + { + this.LaboAndHealthInField = value; + this.RaisePropertyChanged("LaboAndHealthIn"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string LaborAndHealthInRemark + { + get + { + return this.LaborAndHealthInRemarkField; + } + set + { + if ((object.ReferenceEquals(this.LaborAndHealthInRemarkField, value) != true)) + { + this.LaborAndHealthInRemarkField = value; + this.RaisePropertyChanged("LaborAndHealthInRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MainBusinessIncome + { + get + { + return this.MainBusinessIncomeField; + } + set + { + if ((this.MainBusinessIncomeField.Equals(value) != true)) + { + this.MainBusinessIncomeField = value; + this.RaisePropertyChanged("MainBusinessIncome"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string MainBusinessIncomeRemark + { + get + { + return this.MainBusinessIncomeRemarkField; + } + set + { + if ((object.ReferenceEquals(this.MainBusinessIncomeRemarkField, value) != true)) + { + this.MainBusinessIncomeRemarkField = value; + this.RaisePropertyChanged("MainBusinessIncomeRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MajorEquipAccident + { + get + { + return this.MajorEquipAccidentField; + } + set + { + if ((this.MajorEquipAccidentField.Equals(value) != true)) + { + this.MajorEquipAccidentField = value; + this.RaisePropertyChanged("MajorEquipAccident"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string MajorEquipAccidentRemark + { + get + { + return this.MajorEquipAccidentRemarkField; + } + set + { + if ((object.ReferenceEquals(this.MajorEquipAccidentRemarkField, value) != true)) + { + this.MajorEquipAccidentRemarkField = value; + this.RaisePropertyChanged("MajorEquipAccidentRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable MajorFireAccident + { + get + { + return this.MajorFireAccidentField; + } + set + { + if ((this.MajorFireAccidentField.Equals(value) != true)) + { + this.MajorFireAccidentField = value; + this.RaisePropertyChanged("MajorFireAccident"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string MajorFireAccidentRemark + { + get + { + return this.MajorFireAccidentRemarkField; + } + set + { + if ((object.ReferenceEquals(this.MajorFireAccidentRemarkField, value) != true)) + { + this.MajorFireAccidentRemarkField = value; + this.RaisePropertyChanged("MajorFireAccidentRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable PMMan + { + get + { + return this.PMManField; + } + set + { + if ((this.PMManField.Equals(value) != true)) + { + this.PMManField = value; + this.RaisePropertyChanged("PMMan"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string PMManAttachUrl + { + get + { + return this.PMManAttachUrlField; + } + set + { + if ((object.ReferenceEquals(this.PMManAttachUrlField, value) != true)) + { + this.PMManAttachUrlField = value; + this.RaisePropertyChanged("PMManAttachUrl"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Collections.Generic.List PMManAttachUrlFileContext + { + get + { + return this.PMManAttachUrlFileContextField; + } + set + { + if ((object.ReferenceEquals(this.PMManAttachUrlFileContextField, value) != true)) + { + this.PMManAttachUrlFileContextField = value; + this.RaisePropertyChanged("PMManAttachUrlFileContext"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string PMManRemark + { + get + { + return this.PMManRemarkField; + } + set + { + if ((object.ReferenceEquals(this.PMManRemarkField, value) != true)) + { + this.PMManRemarkField = value; + this.RaisePropertyChanged("PMManRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable PoisoningAndInjuries + { + get + { + return this.PoisoningAndInjuriesField; + } + set + { + if ((this.PoisoningAndInjuriesField.Equals(value) != true)) + { + this.PoisoningAndInjuriesField = value; + this.RaisePropertyChanged("PoisoningAndInjuries"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string PoisoningAndInjuriesRemark + { + get + { + return this.PoisoningAndInjuriesRemarkField; + } + set + { + if ((object.ReferenceEquals(this.PoisoningAndInjuriesRemarkField, value) != true)) + { + this.PoisoningAndInjuriesRemarkField = value; + this.RaisePropertyChanged("PoisoningAndInjuriesRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ProductionInput + { + get + { + return this.ProductionInputField; + } + set + { + if ((this.ProductionInputField.Equals(value) != true)) + { + this.ProductionInputField = value; + this.RaisePropertyChanged("ProductionInput"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ProductionInputRemark + { + get + { + return this.ProductionInputRemarkField; + } + set + { + if ((object.ReferenceEquals(this.ProductionInputRemarkField, value) != true)) + { + this.ProductionInputRemarkField = value; + this.RaisePropertyChanged("ProductionInputRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ProductionSafetyInTotal + { + get + { + return this.ProductionSafetyInTotalField; + } + set + { + if ((this.ProductionSafetyInTotalField.Equals(value) != true)) + { + this.ProductionSafetyInTotalField = value; + this.RaisePropertyChanged("ProductionSafetyInTotal"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ProductionSafetyInTotalRemark + { + get + { + return this.ProductionSafetyInTotalRemarkField; + } + set + { + if ((object.ReferenceEquals(this.ProductionSafetyInTotalRemarkField, value) != true)) + { + this.ProductionSafetyInTotalRemarkField = value; + this.RaisePropertyChanged("ProductionSafetyInTotalRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ProjectCostRate + { + get + { + return this.ProjectCostRateField; + } + set + { + if ((this.ProjectCostRateField.Equals(value) != true)) + { + this.ProjectCostRateField = value; + this.RaisePropertyChanged("ProjectCostRate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ProjectCostRateRemark + { + get + { + return this.ProjectCostRateRemarkField; + } + set + { + if ((object.ReferenceEquals(this.ProjectCostRateRemarkField, value) != true)) + { + this.ProjectCostRateRemarkField = value; + this.RaisePropertyChanged("ProjectCostRateRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ProjectLeaderEdu + { + get + { + return this.ProjectLeaderEduField; + } + set + { + if ((this.ProjectLeaderEduField.Equals(value) != true)) + { + this.ProjectLeaderEduField = value; + this.RaisePropertyChanged("ProjectLeaderEdu"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ProjectLeaderEduRemark + { + get + { + return this.ProjectLeaderEduRemarkField; + } + set + { + if ((object.ReferenceEquals(this.ProjectLeaderEduRemarkField, value) != true)) + { + this.ProjectLeaderEduRemarkField = value; + this.RaisePropertyChanged("ProjectLeaderEduRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ProtectionInput + { + get + { + return this.ProtectionInputField; + } + set + { + if ((this.ProtectionInputField.Equals(value) != true)) + { + this.ProtectionInputField = value; + this.RaisePropertyChanged("ProtectionInput"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ProtectionInputRemark + { + get + { + return this.ProtectionInputRemarkField; + } + set + { + if ((object.ReferenceEquals(this.ProtectionInputRemarkField, value) != true)) + { + this.ProtectionInputRemarkField = value; + this.RaisePropertyChanged("ProtectionInputRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Quarters + { + get + { + return this.QuartersField; + } + set + { + if ((this.QuartersField.Equals(value) != true)) + { + this.QuartersField = value; + this.RaisePropertyChanged("Quarters"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string Remarks + { + get + { + return this.RemarksField; + } + set + { + if ((object.ReferenceEquals(this.RemarksField, value) != true)) + { + this.RemarksField = value; + this.RaisePropertyChanged("Remarks"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Revenue + { + get + { + return this.RevenueField; + } + set + { + if ((this.RevenueField.Equals(value) != true)) + { + this.RevenueField = value; + this.RaisePropertyChanged("Revenue"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string RevenueRemark + { + get + { + return this.RevenueRemarkField; + } + set + { + if ((object.ReferenceEquals(this.RevenueRemarkField, value) != true)) + { + this.RevenueRemarkField = value; + this.RaisePropertyChanged("RevenueRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string SafetyQuarterlyReportId + { + get + { + return this.SafetyQuarterlyReportIdField; + } + set + { + if ((object.ReferenceEquals(this.SafetyQuarterlyReportIdField, value) != true)) + { + this.SafetyQuarterlyReportIdField = value; + this.RaisePropertyChanged("SafetyQuarterlyReportId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SeriousInjuryAccident + { + get + { + return this.SeriousInjuryAccidentField; + } + set + { + if ((this.SeriousInjuryAccidentField.Equals(value) != true)) + { + this.SeriousInjuryAccidentField = value; + this.RaisePropertyChanged("SeriousInjuryAccident"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string SeriousInjuryAccidentRemark + { + get + { + return this.SeriousInjuryAccidentRemarkField; + } + set + { + if ((object.ReferenceEquals(this.SeriousInjuryAccidentRemarkField, value) != true)) + { + this.SeriousInjuryAccidentRemarkField = value; + this.RaisePropertyChanged("SeriousInjuryAccidentRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TechnologyProgressIn + { + get + { + return this.TechnologyProgressInField; + } + set + { + if ((this.TechnologyProgressInField.Equals(value) != true)) + { + this.TechnologyProgressInField = value; + this.RaisePropertyChanged("TechnologyProgressIn"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string TechnologyProgressInRemark + { + get + { + return this.TechnologyProgressInRemarkField; + } + set + { + if ((object.ReferenceEquals(this.TechnologyProgressInRemarkField, value) != true)) + { + this.TechnologyProgressInRemarkField = value; + this.RaisePropertyChanged("TechnologyProgressInRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ThreeKidsEduRate + { + get + { + return this.ThreeKidsEduRateField; + } + set + { + if ((this.ThreeKidsEduRateField.Equals(value) != true)) + { + this.ThreeKidsEduRateField = value; + this.RaisePropertyChanged("ThreeKidsEduRate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ThreeKidsEduRateRemark + { + get + { + return this.ThreeKidsEduRateRemarkField; + } + set + { + if ((object.ReferenceEquals(this.ThreeKidsEduRateRemarkField, value) != true)) + { + this.ThreeKidsEduRateRemarkField = value; + this.RaisePropertyChanged("ThreeKidsEduRateRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalInWorkHours + { + get + { + return this.TotalInWorkHoursField; + } + set + { + if ((this.TotalInWorkHoursField.Equals(value) != true)) + { + this.TotalInWorkHoursField = value; + this.RaisePropertyChanged("TotalInWorkHours"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string TotalInWorkHoursRemark + { + get + { + return this.TotalInWorkHoursRemarkField; + } + set + { + if ((object.ReferenceEquals(this.TotalInWorkHoursRemarkField, value) != true)) + { + this.TotalInWorkHoursRemarkField = value; + this.RaisePropertyChanged("TotalInWorkHoursRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalOutWorkHours + { + get + { + return this.TotalOutWorkHoursField; + } + set + { + if ((this.TotalOutWorkHoursField.Equals(value) != true)) + { + this.TotalOutWorkHoursField = value; + this.RaisePropertyChanged("TotalOutWorkHours"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string TotalOutWorkHoursRemark + { + get + { + return this.TotalOutWorkHoursRemarkField; + } + set + { + if ((object.ReferenceEquals(this.TotalOutWorkHoursRemarkField, value) != true)) + { + this.TotalOutWorkHoursRemarkField = value; + this.RaisePropertyChanged("TotalOutWorkHoursRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string UnitId + { + get + { + return this.UnitIdField; + } + set + { + if ((object.ReferenceEquals(this.UnitIdField, value) != true)) + { + this.UnitIdField = value; + this.RaisePropertyChanged("UnitId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable UnitTimeIncome + { + get + { + return this.UnitTimeIncomeField; + } + set + { + if ((this.UnitTimeIncomeField.Equals(value) != true)) + { + this.UnitTimeIncomeField = value; + this.RaisePropertyChanged("UnitTimeIncome"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string UnitTimeIncomeRemark + { + get + { + return this.UnitTimeIncomeRemarkField; + } + set + { + if ((object.ReferenceEquals(this.UnitTimeIncomeRemarkField, value) != true)) + { + this.UnitTimeIncomeRemarkField = value; + this.RaisePropertyChanged("UnitTimeIncomeRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable UplinReportRate + { + get + { + return this.UplinReportRateField; + } + set + { + if ((this.UplinReportRateField.Equals(value) != true)) + { + this.UplinReportRateField = value; + this.RaisePropertyChanged("UplinReportRate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string UplinReportRateRemark + { + get + { + return this.UplinReportRateRemarkField; + } + set + { + if ((object.ReferenceEquals(this.UplinReportRateRemarkField, value) != true)) + { + this.UplinReportRateRemarkField = value; + this.RaisePropertyChanged("UplinReportRateRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable WorkHoursAccuracy + { + get + { + return this.WorkHoursAccuracyField; + } + set + { + if ((this.WorkHoursAccuracyField.Equals(value) != true)) + { + this.WorkHoursAccuracyField = value; + this.RaisePropertyChanged("WorkHoursAccuracy"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string WorkHoursAccuracyRemark + { + get + { + return this.WorkHoursAccuracyRemarkField; + } + set + { + if ((object.ReferenceEquals(this.WorkHoursAccuracyRemarkField, value) != true)) + { + this.WorkHoursAccuracyRemarkField = value; + this.RaisePropertyChanged("WorkHoursAccuracyRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable WorkHoursLossRate + { + get + { + return this.WorkHoursLossRateField; + } + set + { + if ((this.WorkHoursLossRateField.Equals(value) != true)) + { + this.WorkHoursLossRateField = value; + this.RaisePropertyChanged("WorkHoursLossRate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string WorkHoursLossRateRemark + { + get + { + return this.WorkHoursLossRateRemarkField; + } + set + { + if ((object.ReferenceEquals(this.WorkHoursLossRateRemarkField, value) != true)) + { + this.WorkHoursLossRateRemarkField = value; + this.RaisePropertyChanged("WorkHoursLossRateRemark"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable YearId + { + get + { + return this.YearIdField; + } + set + { + if ((this.YearIdField.Equals(value) != true)) + { + this.YearIdField = value; + this.RaisePropertyChanged("YearId"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) + { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + public partial class Information_DrillConductedQuarterlyReport : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string CompileManField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DrillConductedQuarterlyReportIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable QuarterField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ReportDateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string UnitIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable YearIdField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData + { + get + { + return this.extensionDataField; + } + set + { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string CompileMan + { + get + { + return this.CompileManField; + } + set + { + if ((object.ReferenceEquals(this.CompileManField, value) != true)) + { + this.CompileManField = value; + this.RaisePropertyChanged("CompileMan"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DrillConductedQuarterlyReportId + { + get + { + return this.DrillConductedQuarterlyReportIdField; + } + set + { + if ((object.ReferenceEquals(this.DrillConductedQuarterlyReportIdField, value) != true)) + { + this.DrillConductedQuarterlyReportIdField = value; + this.RaisePropertyChanged("DrillConductedQuarterlyReportId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable Quarter + { + get + { + return this.QuarterField; + } + set + { + if ((this.QuarterField.Equals(value) != true)) + { + this.QuarterField = value; + this.RaisePropertyChanged("Quarter"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ReportDate + { + get + { + return this.ReportDateField; + } + set + { + if ((this.ReportDateField.Equals(value) != true)) + { + this.ReportDateField = value; + this.RaisePropertyChanged("ReportDate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string UnitId + { + get + { + return this.UnitIdField; + } + set + { + if ((object.ReferenceEquals(this.UnitIdField, value) != true)) + { + this.UnitIdField = value; + this.RaisePropertyChanged("UnitId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable YearId + { + get + { + return this.YearIdField; + } + set + { + if ((this.YearIdField.Equals(value) != true)) + { + this.YearIdField = value; + this.RaisePropertyChanged("YearId"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) + { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + public partial class Information_DrillConductedQuarterlyReportItem : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable BasicConductCountField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable BasicInvestmentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable BasicPeopleCountField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable CPDesktopField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable CPSceneField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable ComprehensivePracticeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DrillConductedQuarterlyReportIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DrillConductedQuarterlyReportItemIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable HQConductCountField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable HQInvestmentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable HQPeopleCountField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string IndustryTypeField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SDDesktopField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SDSceneField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SortIndexField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SpecialDrillField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalConductCountField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalInvestmentField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable TotalPeopleCountField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData + { + get + { + return this.extensionDataField; + } + set + { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable BasicConductCount + { + get + { + return this.BasicConductCountField; + } + set + { + if ((this.BasicConductCountField.Equals(value) != true)) + { + this.BasicConductCountField = value; + this.RaisePropertyChanged("BasicConductCount"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable BasicInvestment + { + get + { + return this.BasicInvestmentField; + } + set + { + if ((this.BasicInvestmentField.Equals(value) != true)) + { + this.BasicInvestmentField = value; + this.RaisePropertyChanged("BasicInvestment"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable BasicPeopleCount + { + get + { + return this.BasicPeopleCountField; + } + set + { + if ((this.BasicPeopleCountField.Equals(value) != true)) + { + this.BasicPeopleCountField = value; + this.RaisePropertyChanged("BasicPeopleCount"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable CPDesktop + { + get + { + return this.CPDesktopField; + } + set + { + if ((this.CPDesktopField.Equals(value) != true)) + { + this.CPDesktopField = value; + this.RaisePropertyChanged("CPDesktop"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable CPScene + { + get + { + return this.CPSceneField; + } + set + { + if ((this.CPSceneField.Equals(value) != true)) + { + this.CPSceneField = value; + this.RaisePropertyChanged("CPScene"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable ComprehensivePractice + { + get + { + return this.ComprehensivePracticeField; + } + set + { + if ((this.ComprehensivePracticeField.Equals(value) != true)) + { + this.ComprehensivePracticeField = value; + this.RaisePropertyChanged("ComprehensivePractice"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DrillConductedQuarterlyReportId + { + get + { + return this.DrillConductedQuarterlyReportIdField; + } + set + { + if ((object.ReferenceEquals(this.DrillConductedQuarterlyReportIdField, value) != true)) + { + this.DrillConductedQuarterlyReportIdField = value; + this.RaisePropertyChanged("DrillConductedQuarterlyReportId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DrillConductedQuarterlyReportItemId + { + get + { + return this.DrillConductedQuarterlyReportItemIdField; + } + set + { + if ((object.ReferenceEquals(this.DrillConductedQuarterlyReportItemIdField, value) != true)) + { + this.DrillConductedQuarterlyReportItemIdField = value; + this.RaisePropertyChanged("DrillConductedQuarterlyReportItemId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable HQConductCount + { + get + { + return this.HQConductCountField; + } + set + { + if ((this.HQConductCountField.Equals(value) != true)) + { + this.HQConductCountField = value; + this.RaisePropertyChanged("HQConductCount"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable HQInvestment + { + get + { + return this.HQInvestmentField; + } + set + { + if ((this.HQInvestmentField.Equals(value) != true)) + { + this.HQInvestmentField = value; + this.RaisePropertyChanged("HQInvestment"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable HQPeopleCount + { + get + { + return this.HQPeopleCountField; + } + set + { + if ((this.HQPeopleCountField.Equals(value) != true)) + { + this.HQPeopleCountField = value; + this.RaisePropertyChanged("HQPeopleCount"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string IndustryType + { + get + { + return this.IndustryTypeField; + } + set + { + if ((object.ReferenceEquals(this.IndustryTypeField, value) != true)) + { + this.IndustryTypeField = value; + this.RaisePropertyChanged("IndustryType"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SDDesktop + { + get + { + return this.SDDesktopField; + } + set + { + if ((this.SDDesktopField.Equals(value) != true)) + { + this.SDDesktopField = value; + this.RaisePropertyChanged("SDDesktop"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SDScene + { + get + { + return this.SDSceneField; + } + set + { + if ((this.SDSceneField.Equals(value) != true)) + { + this.SDSceneField = value; + this.RaisePropertyChanged("SDScene"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SortIndex + { + get + { + return this.SortIndexField; + } + set + { + if ((this.SortIndexField.Equals(value) != true)) + { + this.SortIndexField = value; + this.RaisePropertyChanged("SortIndex"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SpecialDrill + { + get + { + return this.SpecialDrillField; + } + set + { + if ((this.SpecialDrillField.Equals(value) != true)) + { + this.SpecialDrillField = value; + this.RaisePropertyChanged("SpecialDrill"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalConductCount + { + get + { + return this.TotalConductCountField; + } + set + { + if ((this.TotalConductCountField.Equals(value) != true)) + { + this.TotalConductCountField = value; + this.RaisePropertyChanged("TotalConductCount"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalInvestment + { + get + { + return this.TotalInvestmentField; + } + set + { + if ((this.TotalInvestmentField.Equals(value) != true)) + { + this.TotalInvestmentField = value; + this.RaisePropertyChanged("TotalInvestment"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable TotalPeopleCount + { + get + { + return this.TotalPeopleCountField; + } + set + { + if ((this.TotalPeopleCountField.Equals(value) != true)) + { + this.TotalPeopleCountField = value; + this.RaisePropertyChanged("TotalPeopleCount"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) + { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + public partial class Information_DrillPlanHalfYearReport : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable CompileDateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string CompileManField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DrillPlanHalfYearReportIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable HalfYearIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string TelephoneField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string UnitIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable YearIdField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData + { + get + { + return this.extensionDataField; + } + set + { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable CompileDate + { + get + { + return this.CompileDateField; + } + set + { + if ((this.CompileDateField.Equals(value) != true)) + { + this.CompileDateField = value; + this.RaisePropertyChanged("CompileDate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string CompileMan + { + get + { + return this.CompileManField; + } + set + { + if ((object.ReferenceEquals(this.CompileManField, value) != true)) + { + this.CompileManField = value; + this.RaisePropertyChanged("CompileMan"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DrillPlanHalfYearReportId + { + get + { + return this.DrillPlanHalfYearReportIdField; + } + set + { + if ((object.ReferenceEquals(this.DrillPlanHalfYearReportIdField, value) != true)) + { + this.DrillPlanHalfYearReportIdField = value; + this.RaisePropertyChanged("DrillPlanHalfYearReportId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable HalfYearId + { + get + { + return this.HalfYearIdField; + } + set + { + if ((this.HalfYearIdField.Equals(value) != true)) + { + this.HalfYearIdField = value; + this.RaisePropertyChanged("HalfYearId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string Telephone + { + get + { + return this.TelephoneField; + } + set + { + if ((object.ReferenceEquals(this.TelephoneField, value) != true)) + { + this.TelephoneField = value; + this.RaisePropertyChanged("Telephone"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string UnitId + { + get + { + return this.UnitIdField; + } + set + { + if ((object.ReferenceEquals(this.UnitIdField, value) != true)) + { + this.UnitIdField = value; + this.RaisePropertyChanged("UnitId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable YearId + { + get + { + return this.YearIdField; + } + set + { + if ((this.YearIdField.Equals(value) != true)) + { + this.YearIdField = value; + this.RaisePropertyChanged("YearId"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) + { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + + public partial class Information_DrillPlanHalfYearReportItem : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged + { + + [System.NonSerializedAttribute()] + private System.Runtime.Serialization.ExtensionDataObject extensionDataField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string AccidentSceneField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DrillPlanDateField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DrillPlanHalfYearReportIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DrillPlanHalfYearReportItemIdField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string DrillPlanNameField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string ExerciseWayField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private string OrganizationUnitField; + + [System.Runtime.Serialization.OptionalFieldAttribute()] + private System.Nullable SortIndexField; + + [global::System.ComponentModel.BrowsableAttribute(false)] + public System.Runtime.Serialization.ExtensionDataObject ExtensionData + { + get + { + return this.extensionDataField; + } + set + { + this.extensionDataField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string AccidentScene + { + get + { + return this.AccidentSceneField; + } + set + { + if ((object.ReferenceEquals(this.AccidentSceneField, value) != true)) + { + this.AccidentSceneField = value; + this.RaisePropertyChanged("AccidentScene"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DrillPlanDate + { + get + { + return this.DrillPlanDateField; + } + set + { + if ((object.ReferenceEquals(this.DrillPlanDateField, value) != true)) + { + this.DrillPlanDateField = value; + this.RaisePropertyChanged("DrillPlanDate"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DrillPlanHalfYearReportId + { + get + { + return this.DrillPlanHalfYearReportIdField; + } + set + { + if ((object.ReferenceEquals(this.DrillPlanHalfYearReportIdField, value) != true)) + { + this.DrillPlanHalfYearReportIdField = value; + this.RaisePropertyChanged("DrillPlanHalfYearReportId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DrillPlanHalfYearReportItemId + { + get + { + return this.DrillPlanHalfYearReportItemIdField; + } + set + { + if ((object.ReferenceEquals(this.DrillPlanHalfYearReportItemIdField, value) != true)) + { + this.DrillPlanHalfYearReportItemIdField = value; + this.RaisePropertyChanged("DrillPlanHalfYearReportItemId"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string DrillPlanName + { + get + { + return this.DrillPlanNameField; + } + set + { + if ((object.ReferenceEquals(this.DrillPlanNameField, value) != true)) + { + this.DrillPlanNameField = value; + this.RaisePropertyChanged("DrillPlanName"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string ExerciseWay + { + get + { + return this.ExerciseWayField; + } + set + { + if ((object.ReferenceEquals(this.ExerciseWayField, value) != true)) + { + this.ExerciseWayField = value; + this.RaisePropertyChanged("ExerciseWay"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string OrganizationUnit + { + get + { + return this.OrganizationUnitField; + } + set + { + if ((object.ReferenceEquals(this.OrganizationUnitField, value) != true)) + { + this.OrganizationUnitField = value; + this.RaisePropertyChanged("OrganizationUnit"); + } + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public System.Nullable SortIndex + { + get + { + return this.SortIndexField; + } + set + { + if ((this.SortIndexField.Equals(value) != true)) + { + this.SortIndexField = value; + this.RaisePropertyChanged("SortIndex"); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected void RaisePropertyChanged(string propertyName) + { + System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; + if ((propertyChanged != null)) + { + propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + } + } +} diff --git a/SGGL/BLL/WebService/FileStructService.cs b/SGGL/BLL/WebService/FileStructService.cs new file mode 100644 index 00000000..43f84382 --- /dev/null +++ b/SGGL/BLL/WebService/FileStructService.cs @@ -0,0 +1,107 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Collections; +using System.IO; +using System.Web; + +namespace BLL +{ + public static class FileStructService + { + /// + /// 获取附件数据流类 + /// + /// 附件路径 + /// + public static List GetFileStructByAttachUrl(string attachUrl) + { + List fileContext = new List(); + if (!String.IsNullOrEmpty(attachUrl)) + { + string filePath = string.Empty; + string physicalpath = Funs.RootPath; + //HttpContext.Current.Request.PhysicalApplicationPath; + filePath = physicalpath + attachUrl; + if (File.Exists(filePath)) + { + FileInfo fileInfo = new FileInfo(filePath); + Stream stream = fileInfo.OpenRead(); + //读取指定大小的文件流内容到uploadFile.Context以便上传 + int b; + while (stream.Position > -1 && stream.Position < stream.Length) + { + if (stream.Length - stream.Position >= 20000000) + { + b = 20000000; + } + else + { + b = (int)(stream.Length - stream.Position); + } + + byte[] filebyte = new byte[b]; + stream.Read(filebyte, 0, b); + fileContext.Add(filebyte); + } + stream.Close(); + } + } + + return fileContext; + } + + /// + /// 获取附件数据流类 多附件的情况 + /// + /// 附件路径 + /// + public static List GetMoreFileStructByAttachUrl(string attachUrl) + { + List fileContext = new List(); + if (!String.IsNullOrEmpty(attachUrl)) + { + string[] strs = attachUrl.Trim().Split(','); + foreach (var item in strs) + { + string filePath = string.Empty; + string physicalpath = Funs.RootPath; + //HttpContext.Current.Request.PhysicalApplicationPath; + filePath = physicalpath + item; + if (File.Exists(filePath)) + { + FileInfo fileInfo = new FileInfo(filePath); + if (fileInfo != null) + { + Stream stream = fileInfo.OpenRead(); + if (stream != null) + { + //读取指定大小的文件流内容到uploadFile.Context以便上传 + int b; + while (stream.Position > -1 && stream.Position < stream.Length) + { + if (stream.Length - stream.Position >= 20000000) + { + b = 20000000; + } + else + { + b = (int)(stream.Length - stream.Position); + } + + byte[] filebyte = new byte[b]; + stream.Read(filebyte, 0, b); + fileContext.Add(filebyte); + } + } + + stream.Close(); + } + } + } + } + return fileContext; + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/AccidentCauseReportItemService.cs b/SGGL/BLL/ZHGL/Information/AccidentCauseReportItemService.cs new file mode 100644 index 00000000..04e1716c --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/AccidentCauseReportItemService.cs @@ -0,0 +1,181 @@ +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + public static class AccidentCauseReportItemService + { + /// + /// 职工伤亡事故原因分析报表明细表 + /// + /// 职工伤亡事故原因分析报表明细表Id + /// 职工伤亡事故原因分析报表明细表 + public static Model.Information_AccidentCauseReportItem GetAccidentCauseReportItemByAccidentCauseReportItemId(string AccidentCauseReportItemId) + { + return Funs.DB.Information_AccidentCauseReportItem.FirstOrDefault(e => e.AccidentCauseReportItemId == AccidentCauseReportItemId); + } + + /// + /// 职工伤亡事故原因分析报表明细表 + /// + /// 职工伤亡事故原因分析报表明细表Id + /// 职工伤亡事故原因分析报表明细表 + public static Model.Information_AccidentCauseReportItem GetAccidentCauseReportItemByAccidentCauseReportIdAndTypeId(string AccidentCauseReportId, string AccidentType) + { + return Funs.DB.Information_AccidentCauseReportItem.FirstOrDefault(e => e.AccidentCauseReportId == AccidentCauseReportId && e.AccidentType == AccidentType); + } + + /// + /// 根据主表Id判断是否存在明细记录 + /// + /// 职工伤亡事故原因分析报表表Id + /// 是否存在明细记录 + public static bool IsExitItems(string AccidentCauseReportId) + { + return (from x in Funs.DB.Information_AccidentCauseReportItem where x.AccidentCauseReportId == AccidentCauseReportId select x).Count() > 0; + } + + /// + /// 根据主表Id获取明细记录集合 + /// + /// 职工伤亡事故原因分析报表明细表Id + /// 明细记录集合 + public static List GetItems(string AccidentCauseReportId) + { + return (from x in Funs.DB.Information_AccidentCauseReportItem + join y in Funs.DB.Sys_Const on x.AccidentType equals y.ConstText + where x.AccidentCauseReportId == AccidentCauseReportId && y.GroupId == ConstValue.Group_0012 + orderby y.SortIndex + select x).ToList(); + } + + /// + /// 根据主表Id获取明细记录集合(不包含总计行) + /// + /// 职工伤亡事故原因分析报表明细表Id + /// 明细记录集合 + public static List GetItemsNoSum(string AccidentCauseReportId) + { + return (from x in Funs.DB.Information_AccidentCauseReportItem + join y in Funs.DB.Sys_Const on x.AccidentType equals y.ConstText + where x.AccidentCauseReportId == AccidentCauseReportId && x.AccidentType != "总计" && y.GroupId == ConstValue.Group_0012 + orderby y.SortIndex + select x).ToList(); + } + + /// + /// 增加职工伤亡事故原因分析报表明细表 + /// + /// 职工伤亡事故原因分析报表明细表实体 + public static void AddAccidentCauseReportItem(Model.Information_AccidentCauseReportItem AccidentCauseReportItem) + { + Model.Information_AccidentCauseReportItem newAccidentCauseReportItem = new Model.Information_AccidentCauseReportItem + { + AccidentCauseReportItemId = AccidentCauseReportItem.AccidentCauseReportItemId, + AccidentCauseReportId = AccidentCauseReportItem.AccidentCauseReportId, + AccidentType = AccidentCauseReportItem.AccidentType, + TotalDeath = AccidentCauseReportItem.TotalDeath, + TotalInjuries = AccidentCauseReportItem.TotalInjuries, + TotalMinorInjuries = AccidentCauseReportItem.TotalMinorInjuries, + Death1 = AccidentCauseReportItem.Death1, + Injuries1 = AccidentCauseReportItem.Injuries1, + MinorInjuries1 = AccidentCauseReportItem.MinorInjuries1, + Death2 = AccidentCauseReportItem.Death2, + Injuries2 = AccidentCauseReportItem.Injuries2, + MinorInjuries2 = AccidentCauseReportItem.MinorInjuries2, + Death3 = AccidentCauseReportItem.Death3, + Injuries3 = AccidentCauseReportItem.Injuries3, + MinorInjuries3 = AccidentCauseReportItem.MinorInjuries3, + Death4 = AccidentCauseReportItem.Death4, + Injuries4 = AccidentCauseReportItem.Injuries4, + MinorInjuries4 = AccidentCauseReportItem.MinorInjuries4, + Death5 = AccidentCauseReportItem.Death5, + Injuries5 = AccidentCauseReportItem.Injuries5, + MinorInjuries5 = AccidentCauseReportItem.MinorInjuries5, + Death6 = AccidentCauseReportItem.Death6, + Injuries6 = AccidentCauseReportItem.Injuries6, + MinorInjuries6 = AccidentCauseReportItem.MinorInjuries6, + Death7 = AccidentCauseReportItem.Death7, + Injuries7 = AccidentCauseReportItem.Injuries7, + MinorInjuries7 = AccidentCauseReportItem.MinorInjuries7, + Death8 = AccidentCauseReportItem.Death8, + Injuries8 = AccidentCauseReportItem.Injuries8, + MinorInjuries8 = AccidentCauseReportItem.MinorInjuries8, + Death9 = AccidentCauseReportItem.Death9, + Injuries9 = AccidentCauseReportItem.Injuries9, + MinorInjuries9 = AccidentCauseReportItem.MinorInjuries9, + Death10 = AccidentCauseReportItem.Death10, + Injuries10 = AccidentCauseReportItem.Injuries10, + MinorInjuries10 = AccidentCauseReportItem.MinorInjuries10, + Death11 = AccidentCauseReportItem.Death11, + Injuries11 = AccidentCauseReportItem.Injuries11, + MinorInjuries11 = AccidentCauseReportItem.MinorInjuries11 + }; + + Funs.DB.Information_AccidentCauseReportItem.InsertOnSubmit(newAccidentCauseReportItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改职工伤亡事故原因分析报表明细表 + /// + /// 职工伤亡事故原因分析报表明细表实体 + public static void UpdateAccidentCauseReportItem(Model.Information_AccidentCauseReportItem AccidentCauseReportItem) + { + Model.Information_AccidentCauseReportItem newAccidentCauseReportItem = Funs.DB.Information_AccidentCauseReportItem.FirstOrDefault(e => e.AccidentCauseReportItemId == AccidentCauseReportItem.AccidentCauseReportItemId); + newAccidentCauseReportItem.AccidentType = AccidentCauseReportItem.AccidentType; + newAccidentCauseReportItem.TotalDeath = AccidentCauseReportItem.TotalDeath; + newAccidentCauseReportItem.TotalInjuries = AccidentCauseReportItem.TotalInjuries; + newAccidentCauseReportItem.TotalMinorInjuries = AccidentCauseReportItem.TotalMinorInjuries; + newAccidentCauseReportItem.Death1 = AccidentCauseReportItem.Death1; + newAccidentCauseReportItem.Injuries1 = AccidentCauseReportItem.Injuries1; + newAccidentCauseReportItem.MinorInjuries1 = AccidentCauseReportItem.MinorInjuries1; + newAccidentCauseReportItem.Death2 = AccidentCauseReportItem.Death2; + newAccidentCauseReportItem.Injuries2 = AccidentCauseReportItem.Injuries2; + newAccidentCauseReportItem.MinorInjuries2 = AccidentCauseReportItem.MinorInjuries2; + newAccidentCauseReportItem.Death3 = AccidentCauseReportItem.Death3; + newAccidentCauseReportItem.Injuries3 = AccidentCauseReportItem.Injuries3; + newAccidentCauseReportItem.MinorInjuries3 = AccidentCauseReportItem.MinorInjuries3; + newAccidentCauseReportItem.Death4 = AccidentCauseReportItem.Death4; + newAccidentCauseReportItem.Injuries4 = AccidentCauseReportItem.Injuries4; + newAccidentCauseReportItem.MinorInjuries4 = AccidentCauseReportItem.MinorInjuries4; + newAccidentCauseReportItem.Death5 = AccidentCauseReportItem.Death5; + newAccidentCauseReportItem.Injuries5 = AccidentCauseReportItem.Injuries5; + newAccidentCauseReportItem.MinorInjuries5 = AccidentCauseReportItem.MinorInjuries5; + newAccidentCauseReportItem.Death6 = AccidentCauseReportItem.Death6; + newAccidentCauseReportItem.Injuries6 = AccidentCauseReportItem.Injuries6; + newAccidentCauseReportItem.MinorInjuries6 = AccidentCauseReportItem.MinorInjuries6; + newAccidentCauseReportItem.Death7 = AccidentCauseReportItem.Death7; + newAccidentCauseReportItem.Injuries7 = AccidentCauseReportItem.Injuries7; + newAccidentCauseReportItem.MinorInjuries7 = AccidentCauseReportItem.MinorInjuries7; + newAccidentCauseReportItem.Death8 = AccidentCauseReportItem.Death8; + newAccidentCauseReportItem.Injuries8 = AccidentCauseReportItem.Injuries8; + newAccidentCauseReportItem.MinorInjuries8 = AccidentCauseReportItem.MinorInjuries8; + newAccidentCauseReportItem.Death9 = AccidentCauseReportItem.Death9; + newAccidentCauseReportItem.Injuries9 = AccidentCauseReportItem.Injuries9; + newAccidentCauseReportItem.MinorInjuries9 = AccidentCauseReportItem.MinorInjuries9; + newAccidentCauseReportItem.Death10 = AccidentCauseReportItem.Death10; + newAccidentCauseReportItem.Injuries10 = AccidentCauseReportItem.Injuries10; + newAccidentCauseReportItem.MinorInjuries10 = AccidentCauseReportItem.MinorInjuries10; + newAccidentCauseReportItem.Death11 = AccidentCauseReportItem.Death11; + newAccidentCauseReportItem.Injuries11 = AccidentCauseReportItem.Injuries11; + newAccidentCauseReportItem.MinorInjuries11 = AccidentCauseReportItem.MinorInjuries11; + + Funs.DB.SubmitChanges(); + } + + /// + /// 根据Id删除所有数据 + /// + /// + public static void DeleteAccidentCauseReportItemByAccidentCauseReportId(string AccidentCauseReportId) + { + var q = from x in Funs.DB.Information_AccidentCauseReportItem where x.AccidentCauseReportId == AccidentCauseReportId select x; + if (q != null) + { + Funs.DB.Information_AccidentCauseReportItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/AccidentCauseReportService.cs b/SGGL/BLL/ZHGL/Information/AccidentCauseReportService.cs new file mode 100644 index 00000000..98c58cbe --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/AccidentCauseReportService.cs @@ -0,0 +1,154 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + public static class AccidentCauseReportService + { + /// + /// 职工伤亡事故原因分析报表 + /// + /// 职工伤亡事故原因分析报表Id + /// 职工伤亡事故原因分析报表 + public static Model.Information_AccidentCauseReport GetAccidentCauseReportByAccidentCauseReportId(string AccidentCauseReportId) + { + return Funs.DB.Information_AccidentCauseReport.FirstOrDefault(e => e.AccidentCauseReportId == AccidentCauseReportId); + } + + /// + /// 职工伤亡事故原因分析报表 + /// + /// 单位Id + /// 年度 + /// 月份 + /// 职工伤亡事故原因分析报表 + public static Model.Information_AccidentCauseReport GetAccidentCauseReportByUnitIdAndYearAndMonth(string unitId, int year, int month) + { + return Funs.DB.Information_AccidentCauseReport.FirstOrDefault(e => e.UnitId == unitId && e.Month == month && e.Year == year); + } + + /// + /// 根据单位Id获取职工伤亡事故原因分析报表集合 + /// + /// 单位Id + /// 职工伤亡事故原因分析报表集合 + public static List GetAccidentCauseReportsByUnitId(string UnitId) + { + return (from x in Funs.DB.View_Information_AccidentCauseReport where x.UnitId == UnitId orderby x.FillingDate descending select x).ToList(); + } + + + /// + /// 增加职工伤亡事故原因分析报表 + /// + /// 职工伤亡事故原因分析报表实体 + public static void AddAccidentCauseReport(Model.Information_AccidentCauseReport AccidentCauseReport) + { + Model.Information_AccidentCauseReport newAccidentCauseReport = new Model.Information_AccidentCauseReport + { + AccidentCauseReportId = AccidentCauseReport.AccidentCauseReportId, + AccidentCauseReportCode = AccidentCauseReport.AccidentCauseReportCode, + Year = AccidentCauseReport.Year, + Month = AccidentCauseReport.Month, + UnitId = AccidentCauseReport.UnitId, + DeathAccident = AccidentCauseReport.DeathAccident, + DeathToll = AccidentCauseReport.DeathToll, + InjuredAccident = AccidentCauseReport.InjuredAccident, + InjuredToll = AccidentCauseReport.InjuredToll, + MinorWoundAccident = AccidentCauseReport.MinorWoundAccident, + MinorWoundToll = AccidentCauseReport.MinorWoundToll, + AverageTotalHours = AccidentCauseReport.AverageTotalHours, + AverageManHours = AccidentCauseReport.AverageManHours, + TotalLossMan = AccidentCauseReport.TotalLossMan, + LastMonthLossHoursTotal = AccidentCauseReport.LastMonthLossHoursTotal, + KnockOffTotal = AccidentCauseReport.KnockOffTotal, + DirectLoss = AccidentCauseReport.DirectLoss, + IndirectLosses = AccidentCauseReport.IndirectLosses, + TotalLoss = AccidentCauseReport.TotalLoss, + TotalLossTime = AccidentCauseReport.TotalLossTime, + FillCompanyPersonCharge = AccidentCauseReport.FillCompanyPersonCharge, + TabPeople = AccidentCauseReport.TabPeople, + FillingDate = AccidentCauseReport.FillingDate, + AuditPerson = AccidentCauseReport.AuditPerson, + UpState = AccidentCauseReport.UpState, + HandleState = AccidentCauseReport.HandleState, + HandleMan = AccidentCauseReport.HandleMan + }; + + Funs.DB.Information_AccidentCauseReport.InsertOnSubmit(newAccidentCauseReport); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改职工伤亡事故原因分析报表 + /// + /// 职工伤亡事故原因分析报表实体 + public static void UpdateAccidentCauseReport(Model.Information_AccidentCauseReport AccidentCauseReport) + { + Model.Information_AccidentCauseReport newAccidentCauseReport = Funs.DB.Information_AccidentCauseReport.FirstOrDefault(e => e.AccidentCauseReportId == AccidentCauseReport.AccidentCauseReportId); + if (newAccidentCauseReport != null) + { + newAccidentCauseReport.AccidentCauseReportCode = AccidentCauseReport.AccidentCauseReportCode; + newAccidentCauseReport.Year = AccidentCauseReport.Year; + newAccidentCauseReport.Month = AccidentCauseReport.Month; + newAccidentCauseReport.UnitId = AccidentCauseReport.UnitId; + newAccidentCauseReport.DeathAccident = AccidentCauseReport.DeathAccident; + newAccidentCauseReport.DeathToll = AccidentCauseReport.DeathToll; + newAccidentCauseReport.InjuredAccident = AccidentCauseReport.InjuredAccident; + newAccidentCauseReport.InjuredToll = AccidentCauseReport.InjuredToll; + newAccidentCauseReport.MinorWoundAccident = AccidentCauseReport.MinorWoundAccident; + newAccidentCauseReport.MinorWoundToll = AccidentCauseReport.MinorWoundToll; + newAccidentCauseReport.AverageTotalHours = AccidentCauseReport.AverageTotalHours; + newAccidentCauseReport.AverageManHours = AccidentCauseReport.AverageManHours; + newAccidentCauseReport.TotalLossMan = AccidentCauseReport.TotalLossMan; + newAccidentCauseReport.LastMonthLossHoursTotal = AccidentCauseReport.LastMonthLossHoursTotal; + newAccidentCauseReport.KnockOffTotal = AccidentCauseReport.KnockOffTotal; + newAccidentCauseReport.DirectLoss = AccidentCauseReport.DirectLoss; + newAccidentCauseReport.IndirectLosses = AccidentCauseReport.IndirectLosses; + newAccidentCauseReport.TotalLoss = AccidentCauseReport.TotalLoss; + newAccidentCauseReport.TotalLossTime = AccidentCauseReport.TotalLossTime; + newAccidentCauseReport.FillCompanyPersonCharge = AccidentCauseReport.FillCompanyPersonCharge; + newAccidentCauseReport.TabPeople = AccidentCauseReport.TabPeople; + newAccidentCauseReport.AuditPerson = AccidentCauseReport.AuditPerson; + newAccidentCauseReport.FillCompanyPersonCharge = AccidentCauseReport.FillCompanyPersonCharge; + newAccidentCauseReport.TabPeople = AccidentCauseReport.TabPeople; + newAccidentCauseReport.AuditPerson = AccidentCauseReport.AuditPerson; + newAccidentCauseReport.FillingDate = AccidentCauseReport.FillingDate; + newAccidentCauseReport.UpState = AccidentCauseReport.UpState; + newAccidentCauseReport.HandleState = AccidentCauseReport.HandleState; + newAccidentCauseReport.HandleMan = AccidentCauseReport.HandleMan; + + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据Id获取数据 + /// + /// + public static void DeleteAccidentCauseReportByAccidentCauseReportId(string AccidentCauseReportId) + { + Model.Information_AccidentCauseReport newAccidentCauseReport = Funs.DB.Information_AccidentCauseReport.FirstOrDefault(e => e.AccidentCauseReportId == AccidentCauseReportId); + if (newAccidentCauseReport != null) + { + ////删除审核流程表 + BLL.CommonService.DeleteFlowOperateByID(AccidentCauseReportId); + Funs.DB.Information_AccidentCauseReport.DeleteOnSubmit(newAccidentCauseReport); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据报表单位,报表时间判断是否存在 + /// + /// Id + /// + public static Model.Information_AccidentCauseReport GetAccidentCauseReportByUnitIdDate(string unitId, int year, int Month) + { + return Funs.DB.Information_AccidentCauseReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Month == Month); + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportItemService.cs b/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportItemService.cs new file mode 100644 index 00000000..5905c642 --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportItemService.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 应急演练开展情况季报明细表 + /// + public static class DrillConductedQuarterlyReportItemService + { + /// + /// 根据主键获取应急演练开展情况季报表明细信息 + /// + /// + /// + public static Model.Information_DrillConductedQuarterlyReportItem GetDrillConductedQuarterlyReportItemById(string drillConductedQuarterlyReportItemId) + { + return Funs.DB.Information_DrillConductedQuarterlyReportItem.FirstOrDefault(e => e.DrillConductedQuarterlyReportItemId == drillConductedQuarterlyReportItemId); + } + + /// + /// 根据应急演练开展情况季报Id获取所有相关明细信息 + /// + /// + /// + public static List GetDrillConductedQuarterlyReportItemList(string drillConductedQuarterlyReportId) + { + return (from x in Funs.DB.Information_DrillConductedQuarterlyReportItem where x.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId orderby x.SortIndex select x).ToList(); + } + + /// + /// 添加应急演练开展情况季报明细信息 + /// + /// + public static void AddDrillConductedQuarterlyReportItem(Model.Information_DrillConductedQuarterlyReportItem drillConductedQuarterlyReportItem) + { + Model.Information_DrillConductedQuarterlyReportItem newDrillConductedQuarterlyReportItem = new Model.Information_DrillConductedQuarterlyReportItem + { + DrillConductedQuarterlyReportItemId = drillConductedQuarterlyReportItem.DrillConductedQuarterlyReportItemId, + DrillConductedQuarterlyReportId = drillConductedQuarterlyReportItem.DrillConductedQuarterlyReportId, + IndustryType = drillConductedQuarterlyReportItem.IndustryType, + TotalConductCount = drillConductedQuarterlyReportItem.TotalConductCount, + TotalPeopleCount = drillConductedQuarterlyReportItem.TotalPeopleCount, + TotalInvestment = drillConductedQuarterlyReportItem.TotalInvestment, + HQConductCount = drillConductedQuarterlyReportItem.HQConductCount, + HQPeopleCount = drillConductedQuarterlyReportItem.HQPeopleCount, + HQInvestment = drillConductedQuarterlyReportItem.HQInvestment, + BasicConductCount = drillConductedQuarterlyReportItem.BasicConductCount, + BasicPeopleCount = drillConductedQuarterlyReportItem.BasicPeopleCount, + BasicInvestment = drillConductedQuarterlyReportItem.BasicInvestment, + ComprehensivePractice = drillConductedQuarterlyReportItem.ComprehensivePractice, + CPScene = drillConductedQuarterlyReportItem.CPScene, + CPDesktop = drillConductedQuarterlyReportItem.CPDesktop, + SpecialDrill = drillConductedQuarterlyReportItem.SpecialDrill, + SDScene = drillConductedQuarterlyReportItem.SDScene, + SDDesktop = drillConductedQuarterlyReportItem.SDDesktop, + SortIndex = drillConductedQuarterlyReportItem.SortIndex + }; + Funs.DB.Information_DrillConductedQuarterlyReportItem.InsertOnSubmit(newDrillConductedQuarterlyReportItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改应急演练开展情况季报明细信息 + /// + /// + public static void UpdateDrillConductedQuarterlyReportItem(Model.Information_DrillConductedQuarterlyReportItem drillConductedQuarterlyReportItem) + { + Model.Information_DrillConductedQuarterlyReportItem newDrillConductedQuarterlyReportItem = Funs.DB.Information_DrillConductedQuarterlyReportItem.FirstOrDefault(e => e.DrillConductedQuarterlyReportItemId == drillConductedQuarterlyReportItem.DrillConductedQuarterlyReportItemId); + if (newDrillConductedQuarterlyReportItem != null) + { + newDrillConductedQuarterlyReportItem.IndustryType = drillConductedQuarterlyReportItem.IndustryType; + newDrillConductedQuarterlyReportItem.TotalConductCount = drillConductedQuarterlyReportItem.TotalConductCount; + newDrillConductedQuarterlyReportItem.TotalPeopleCount = drillConductedQuarterlyReportItem.TotalPeopleCount; + newDrillConductedQuarterlyReportItem.TotalInvestment = drillConductedQuarterlyReportItem.TotalInvestment; + newDrillConductedQuarterlyReportItem.HQConductCount = drillConductedQuarterlyReportItem.HQConductCount; + newDrillConductedQuarterlyReportItem.HQPeopleCount = drillConductedQuarterlyReportItem.HQPeopleCount; + newDrillConductedQuarterlyReportItem.HQInvestment = drillConductedQuarterlyReportItem.HQInvestment; + newDrillConductedQuarterlyReportItem.BasicConductCount = drillConductedQuarterlyReportItem.BasicConductCount; + newDrillConductedQuarterlyReportItem.BasicPeopleCount = drillConductedQuarterlyReportItem.BasicPeopleCount; + newDrillConductedQuarterlyReportItem.BasicInvestment = drillConductedQuarterlyReportItem.BasicInvestment; + newDrillConductedQuarterlyReportItem.ComprehensivePractice = drillConductedQuarterlyReportItem.ComprehensivePractice; + newDrillConductedQuarterlyReportItem.CPScene = drillConductedQuarterlyReportItem.CPScene; + newDrillConductedQuarterlyReportItem.CPDesktop = drillConductedQuarterlyReportItem.CPDesktop; + newDrillConductedQuarterlyReportItem.SpecialDrill = drillConductedQuarterlyReportItem.SpecialDrill; + newDrillConductedQuarterlyReportItem.SDScene = drillConductedQuarterlyReportItem.SDScene; + newDrillConductedQuarterlyReportItem.SDDesktop = drillConductedQuarterlyReportItem.SDDesktop; + newDrillConductedQuarterlyReportItem.SortIndex = drillConductedQuarterlyReportItem.SortIndex; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除应急演练开展情况季报明细信息 + /// + /// + public static void DeleteDrillConductedQuarterlyReportItemById(string drillConductedQuarterlyReportItemId) + { + Model.Information_DrillConductedQuarterlyReportItem drillConductedQuarterlyReportItem = Funs.DB.Information_DrillConductedQuarterlyReportItem.FirstOrDefault(e => e.DrillConductedQuarterlyReportItemId == drillConductedQuarterlyReportItemId); + if (drillConductedQuarterlyReportItem != null) + { + Funs.DB.Information_DrillConductedQuarterlyReportItem.DeleteOnSubmit(drillConductedQuarterlyReportItem); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据应急演练开展情况季报主表id删除所有相关明细信息 + /// + /// + public static void DeleteDrillConductedQuarterlyReportItemList(string drillConductedQuarterlyReportId) + { + var q = (from x in Funs.DB.Information_DrillConductedQuarterlyReportItem where x.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId select x).ToList(); + if (q != null) + { + Funs.DB.Information_DrillConductedQuarterlyReportItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportService.cs b/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportService.cs new file mode 100644 index 00000000..632d321a --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/DrillConductedQuarterlyReportService.cs @@ -0,0 +1,113 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 应急演练开展情况季报主表 + /// + public static class DrillConductedQuarterlyReportService + { + /// + /// 根据主键获取应急演练开展情况季报表 + /// + /// + /// + public static Model.Information_DrillConductedQuarterlyReport GetDrillConductedQuarterlyReportById(string drillConductedQuarterlyReportId) + { + return Funs.DB.Information_DrillConductedQuarterlyReport.FirstOrDefault(e => e.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId); + } + + /// + /// 应急演练开展情况季报表 + /// + /// 单位Id + /// 年度 + /// 季度 + /// 应急演练开展情况季报表 + public static Model.Information_DrillConductedQuarterlyReport GetDrillConductedQuarterlyReportByUnitIdAndYearAndQuarters(string unitId, int year, int quarters) + { + return Funs.DB.Information_DrillConductedQuarterlyReport.FirstOrDefault(e => e.UnitId == unitId && e.Quarter == quarters && e.YearId == year); + } + + /// + /// 根据单位Id获取安全生产数据季报集合 + /// + /// 单位Id + /// 安全生产数据季报集合 + public static List GetDrillConductedQuarterlyReportsByUnitId(string UnitId) + { + return (from x in Funs.DB.View_Information_DrillConductedQuarterlyReport where x.UnitId == UnitId orderby x.ReportDate descending select x).ToList(); + } + + /// + /// 添加应急演练开展情况季报表 + /// + /// + public static void AddDrillConductedQuarterlyReport(Model.Information_DrillConductedQuarterlyReport drillConductedQuarterlyReport) + { + Model.Information_DrillConductedQuarterlyReport newDrillConductedQuarterlyReport = new Model.Information_DrillConductedQuarterlyReport + { + DrillConductedQuarterlyReportId = drillConductedQuarterlyReport.DrillConductedQuarterlyReportId, + UnitId = drillConductedQuarterlyReport.UnitId, + ReportDate = drillConductedQuarterlyReport.ReportDate, + YearId = drillConductedQuarterlyReport.YearId, + Quarter = drillConductedQuarterlyReport.Quarter, + CompileMan = drillConductedQuarterlyReport.CompileMan, + UpState = drillConductedQuarterlyReport.UpState, + HandleState = drillConductedQuarterlyReport.HandleState, + HandleMan = drillConductedQuarterlyReport.HandleMan + }; + Funs.DB.Information_DrillConductedQuarterlyReport.InsertOnSubmit(newDrillConductedQuarterlyReport); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改应急演练开展情况季报表 + /// + /// + public static void UpdateDrillConductedQuarterlyReport(Model.Information_DrillConductedQuarterlyReport drillConductedQuarterlyReport) + { + Model.Information_DrillConductedQuarterlyReport newDrillConductedQuarterlyReport = Funs.DB.Information_DrillConductedQuarterlyReport.FirstOrDefault(e => e.DrillConductedQuarterlyReportId == drillConductedQuarterlyReport.DrillConductedQuarterlyReportId); + if (newDrillConductedQuarterlyReport != null) + { + newDrillConductedQuarterlyReport.UnitId = drillConductedQuarterlyReport.UnitId; + newDrillConductedQuarterlyReport.ReportDate = drillConductedQuarterlyReport.ReportDate; + newDrillConductedQuarterlyReport.YearId = drillConductedQuarterlyReport.YearId; + newDrillConductedQuarterlyReport.Quarter = drillConductedQuarterlyReport.Quarter; + newDrillConductedQuarterlyReport.UpState = drillConductedQuarterlyReport.UpState; + newDrillConductedQuarterlyReport.HandleState = drillConductedQuarterlyReport.HandleState; + newDrillConductedQuarterlyReport.HandleMan = drillConductedQuarterlyReport.HandleMan; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除应急演练开展情况季报表 + /// + /// + public static void DeleteDrillConductedQuarterlyReportById(string drillConductedQuarterlyReportId) + { + Model.Information_DrillConductedQuarterlyReport drillConductedQuarterlyReport = Funs.DB.Information_DrillConductedQuarterlyReport.FirstOrDefault(e => e.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId); + if (drillConductedQuarterlyReport != null) + { + Funs.DB.Information_DrillConductedQuarterlyReport.DeleteOnSubmit(drillConductedQuarterlyReport); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据单位、季度获取应急演练开展情况季报表 + /// + /// + /// + /// + public static Model.Information_DrillConductedQuarterlyReport GetDrillConductedQuarterlyReportByUnitIdDate(string unitId, int yearId, int quarter, string drillConductedQuarterlyReportId) + { + return Funs.DB.Information_DrillConductedQuarterlyReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarter && ((drillConductedQuarterlyReportId == null && e.DrillConductedQuarterlyReportId != null) || e.DrillConductedQuarterlyReportId != drillConductedQuarterlyReportId)); + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportItemService.cs b/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportItemService.cs new file mode 100644 index 00000000..abeefef0 --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportItemService.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 应急演练工作计划半年报明细表 + /// + public static class DrillPlanHalfYearReportItemService + { + /// + /// 根据主键获取应急演练工作计划半年报明细信息 + /// + /// + /// + public static Model.Information_DrillPlanHalfYearReportItem GetDrillPlanHalfYearReportItemById(string drillPlanHalfYearReportItemId) + { + return Funs.DB.Information_DrillPlanHalfYearReportItem.FirstOrDefault(e => e.DrillPlanHalfYearReportItemId == drillPlanHalfYearReportItemId); + } + + /// + /// 根据应急演练工作计划半年报Id获取所有相关明细信息 + /// + /// + /// + public static List GetDrillPlanHalfYearReportItemList(string drillPlanHalfYearReportId) + { + return (from x in Funs.DB.Information_DrillPlanHalfYearReportItem where x.DrillPlanHalfYearReportId == drillPlanHalfYearReportId orderby x.SortIndex select x).ToList(); + } + + /// + /// 添加 + /// + /// + public static void AddDrillPlanHalfYearReportItem(Model.Information_DrillPlanHalfYearReportItem drillPlanHalfYearReportItem) + { + Model.Information_DrillPlanHalfYearReportItem newDrillPlanHalfYearReportItem = new Model.Information_DrillPlanHalfYearReportItem + { + DrillPlanHalfYearReportItemId = drillPlanHalfYearReportItem.DrillPlanHalfYearReportItemId, + DrillPlanHalfYearReportId = drillPlanHalfYearReportItem.DrillPlanHalfYearReportId, + DrillPlanName = drillPlanHalfYearReportItem.DrillPlanName, + OrganizationUnit = drillPlanHalfYearReportItem.OrganizationUnit, + DrillPlanDate = drillPlanHalfYearReportItem.DrillPlanDate, + AccidentScene = drillPlanHalfYearReportItem.AccidentScene, + ExerciseWay = drillPlanHalfYearReportItem.ExerciseWay, + SortIndex = drillPlanHalfYearReportItem.SortIndex + }; + Funs.DB.Information_DrillPlanHalfYearReportItem.InsertOnSubmit(newDrillPlanHalfYearReportItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改 + /// + /// + public static void UpdateDrillPlanHalfYearReportItem(Model.Information_DrillPlanHalfYearReportItem drillPlanHalfYearReportItem) + { + Model.Information_DrillPlanHalfYearReportItem newDrillPlanHalfYearReportItem = Funs.DB.Information_DrillPlanHalfYearReportItem.FirstOrDefault(e => e.DrillPlanHalfYearReportItemId == drillPlanHalfYearReportItem.DrillPlanHalfYearReportItemId); + if (newDrillPlanHalfYearReportItem != null) + { + //newDrillPlanHalfYearReportItem.DrillPlanHalfYearReportId = drillPlanHalfYearReportItem.DrillPlanHalfYearReportId; + newDrillPlanHalfYearReportItem.DrillPlanName = drillPlanHalfYearReportItem.DrillPlanName; + newDrillPlanHalfYearReportItem.OrganizationUnit = drillPlanHalfYearReportItem.OrganizationUnit; + newDrillPlanHalfYearReportItem.DrillPlanDate = drillPlanHalfYearReportItem.DrillPlanDate; + newDrillPlanHalfYearReportItem.AccidentScene = drillPlanHalfYearReportItem.AccidentScene; + newDrillPlanHalfYearReportItem.ExerciseWay = drillPlanHalfYearReportItem.ExerciseWay; + newDrillPlanHalfYearReportItem.SortIndex = drillPlanHalfYearReportItem.SortIndex; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除 + /// + /// + public static void DeleteDrillPlanHalfYearReportItemById(string drillPlanHalfYearReportItemId) + { + Model.Information_DrillPlanHalfYearReportItem drillPlanHalfYearReportItem = Funs.DB.Information_DrillPlanHalfYearReportItem.FirstOrDefault(e => e.DrillPlanHalfYearReportItemId == drillPlanHalfYearReportItemId); + if (drillPlanHalfYearReportItem != null) + { + Funs.DB.Information_DrillPlanHalfYearReportItem.DeleteOnSubmit(drillPlanHalfYearReportItem); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主表主键删除所有相关明细信息 + /// + /// + public static void DeleteDrillPlanHalfYearReportItemList(string drillPlanHalfYearReportId) + { + var q = (from x in Funs.DB.Information_DrillPlanHalfYearReportItem where x.DrillPlanHalfYearReportId == drillPlanHalfYearReportId select x).ToList(); + if (q != null) + { + Funs.DB.Information_DrillPlanHalfYearReportItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportService.cs b/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportService.cs new file mode 100644 index 00000000..33a9a966 --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/DrillPlanHalfYearReportService.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 应急演练工作计划半年报主表 + /// + public static class DrillPlanHalfYearReportService + { + /// + /// 根据主键获取应急演练工作计划半年报 + /// + /// + /// + public static Model.Information_DrillPlanHalfYearReport GetDrillPlanHalfYearReportById(string drillPlanHalfYearReportId) + { + return Funs.DB.Information_DrillPlanHalfYearReport.FirstOrDefault(e => e.DrillPlanHalfYearReportId == drillPlanHalfYearReportId); + } + + /// + /// 应急演练工作计划半年报 + /// + /// 单位Id + /// 年度 + /// 半年Id + /// 应急演练工作计划半年报 + public static Model.Information_DrillPlanHalfYearReport GetDrillPlanHalfYearReportByUnitIdAndYearAndHalfYear(string unitId, int year, int halfYearId) + { + return Funs.DB.Information_DrillPlanHalfYearReport.FirstOrDefault(e => e.UnitId == unitId && e.HalfYearId == halfYearId && e.YearId == year); + } + + /// + /// 根据单位Id获取应急演练工作计划半年报集合 + /// + /// 单位Id + /// 应急演练工作计划半年报集合 + public static List GetDrillPlanHalfYearReportsByUnitId(string UnitId) + { + return (from x in Funs.DB.View_Information_DrillPlanHalfYearReport where x.UnitId == UnitId orderby x.Years descending select x).ToList(); + } + + /// + /// 根据单位、年数时间获取信息 + /// + /// + /// + /// + public static Model.Information_DrillPlanHalfYearReport GetDrillPlanHalfYearReportByUnitIdDate(string unitId, int yearId, int halfYearId) + { + return Funs.DB.Information_DrillPlanHalfYearReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.HalfYearId == halfYearId); + } + + /// + /// 添加应急演练工作计划半年报 + /// + /// + public static void AddDrillPlanHalfYearReport(Model.Information_DrillPlanHalfYearReport drillPlanHalfYearReport) + { + Model.Information_DrillPlanHalfYearReport newDrillPlanHalfYearReport = new Model.Information_DrillPlanHalfYearReport + { + DrillPlanHalfYearReportId = drillPlanHalfYearReport.DrillPlanHalfYearReportId, + UnitId = drillPlanHalfYearReport.UnitId, + CompileMan = drillPlanHalfYearReport.CompileMan, + CompileDate = drillPlanHalfYearReport.CompileDate, + YearId = drillPlanHalfYearReport.YearId, + HalfYearId = drillPlanHalfYearReport.HalfYearId, + Telephone = drillPlanHalfYearReport.Telephone, + UpState = drillPlanHalfYearReport.UpState, + HandleState = drillPlanHalfYearReport.HandleState, + HandleMan = drillPlanHalfYearReport.HandleMan + }; + Funs.DB.Information_DrillPlanHalfYearReport.InsertOnSubmit(newDrillPlanHalfYearReport); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改应急演练工作计划半年报 + /// + /// + public static void UpdateDrillPlanHalfYearReport(Model.Information_DrillPlanHalfYearReport drillPlanHalfYearReport) + { + Model.Information_DrillPlanHalfYearReport newDrillPlanHalfYearReport = Funs.DB.Information_DrillPlanHalfYearReport.FirstOrDefault(e => e.DrillPlanHalfYearReportId == drillPlanHalfYearReport.DrillPlanHalfYearReportId); + if (newDrillPlanHalfYearReport != null) + { + newDrillPlanHalfYearReport.UnitId = drillPlanHalfYearReport.UnitId; + newDrillPlanHalfYearReport.CompileMan = drillPlanHalfYearReport.CompileMan; + newDrillPlanHalfYearReport.CompileDate = drillPlanHalfYearReport.CompileDate; + newDrillPlanHalfYearReport.YearId = drillPlanHalfYearReport.YearId; + newDrillPlanHalfYearReport.HalfYearId = drillPlanHalfYearReport.HalfYearId; + newDrillPlanHalfYearReport.Telephone = drillPlanHalfYearReport.Telephone; + newDrillPlanHalfYearReport.UpState = drillPlanHalfYearReport.UpState; + newDrillPlanHalfYearReport.HandleState = drillPlanHalfYearReport.HandleState; + newDrillPlanHalfYearReport.HandleMan = drillPlanHalfYearReport.HandleMan; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除应急演练工作计划半年报 + /// + /// + public static void DeleteDrillPlanHalfYearReportById(string drillPlanHalfYearReportId) + { + Model.Information_DrillPlanHalfYearReport drillPlanHalfYearReport = Funs.DB.Information_DrillPlanHalfYearReport.FirstOrDefault(e => e.DrillPlanHalfYearReportId == drillPlanHalfYearReportId); + if (drillPlanHalfYearReport != null) + { + Funs.DB.Information_DrillPlanHalfYearReport.DeleteOnSubmit(drillPlanHalfYearReport); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportItemService.cs b/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportItemService.cs new file mode 100644 index 00000000..fc0bd1e6 --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportItemService.cs @@ -0,0 +1,195 @@ +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + public static class MillionsMonthlyReportItemService + { + /// + /// 百万工时安全统计月报表明细表 + /// + /// 百万工时安全统计月报表明细表Id + /// 百万工时安全统计月报表明细表 + public static Model.Information_MillionsMonthlyReportItem GetMillionsMonthlyReportItemByMillionsMonthlyReportItemId(string MillionsMonthlyReportItemId) + { + return Funs.DB.Information_MillionsMonthlyReportItem.FirstOrDefault(e => e.MillionsMonthlyReportItemId == MillionsMonthlyReportItemId); + } + + /// + /// 百万工时安全统计月报表明细表 + /// + /// 百万工时安全统计月报表明细表Id + /// 百万工时安全统计月报表明细表 + public static Model.Information_MillionsMonthlyReportItem GetMillionsMonthlyReportItemByMillionsMonthlyReportIdAndTypeId(string MillionsMonthlyReportId) + { + return Funs.DB.Information_MillionsMonthlyReportItem.FirstOrDefault(e => e.MillionsMonthlyReportId == MillionsMonthlyReportId); + } + + /// + /// 根据主表Id判断是否存在明细记录 + /// + /// 百万工时安全统计月报表表Id + /// 是否存在明细记录 + public static bool IsExitItems(string MillionsMonthlyReportId) + { + return (from x in Funs.DB.Information_MillionsMonthlyReportItem where x.MillionsMonthlyReportId == MillionsMonthlyReportId select x).Count() > 0; + } + + /// + /// 根据主表Id获取明细记录集合 + /// + /// 百万工时安全统计月报表明细表Id + /// 明细记录集合 + public static List GetItems(string MillionsMonthlyReportId) + { + return (from x in Funs.DB.Information_MillionsMonthlyReportItem + where x.MillionsMonthlyReportId == MillionsMonthlyReportId + orderby x.SortIndex + select x).ToList(); + } + + /// + /// 根据主表Id获取明细记录集合 + /// + /// 百万工时安全统计月报表明细表Id + /// 明细记录集合 + public static List GetYearSumItems(string unitId, int? year, int? month) + { + return (from x in Funs.DB.Information_MillionsMonthlyReportItem + join y in Funs.DB.Information_MillionsMonthlyReport + on x.MillionsMonthlyReportId equals y.MillionsMonthlyReportId + where y.UnitId == unitId && y.Year == year && y.Month <= month + && x.Affiliation == "本月合计" + select x).Distinct().ToList(); + } + + /// + /// 根据主表Id获取明细记录集合 + /// + /// 百万工时安全统计月报表明细表Id + /// 明细记录集合 + public static List GetAllUnitYearSumItems(int year, int month) + { + return (from x in Funs.DB.Information_MillionsMonthlyReportItem + join y in Funs.DB.Information_MillionsMonthlyReport + on x.MillionsMonthlyReportId equals y.MillionsMonthlyReportId + where y.Year == year && y.Month <= month && x.Affiliation == "本月合计" + select x).Distinct().ToList(); + } + + /// + /// 根据主表Id获取明细记录集合(不包含本月合计行) + /// + /// 百万工时安全统计月报表明细表Id + /// 明细记录集合 + public static List GetItemsNoSum(string MillionsMonthlyReportId) + { + return (from x in Funs.DB.Information_MillionsMonthlyReportItem + where x.MillionsMonthlyReportId == MillionsMonthlyReportId + && (x.Affiliation != "本月合计" || x.Affiliation == null) + orderby x.SortIndex + select x).ToList(); + } + + /// + /// 增加百万工时安全统计月报表明细表 + /// + /// 百万工时安全统计月报表明细表实体 + public static void AddMillionsMonthlyReportItem(Model.Information_MillionsMonthlyReportItem MillionsMonthlyReportItem) + { + Model.Information_MillionsMonthlyReportItem newMillionsMonthlyReportItem = new Model.Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = MillionsMonthlyReportItem.MillionsMonthlyReportItemId, + MillionsMonthlyReportId = MillionsMonthlyReportItem.MillionsMonthlyReportId, + SortIndex = MillionsMonthlyReportItem.SortIndex, + Affiliation = MillionsMonthlyReportItem.Affiliation, + Name = MillionsMonthlyReportItem.Name, + PostPersonNum = MillionsMonthlyReportItem.PostPersonNum, + SnapPersonNum = MillionsMonthlyReportItem.SnapPersonNum, + ContractorNum = MillionsMonthlyReportItem.ContractorNum, + SumPersonNum = MillionsMonthlyReportItem.SumPersonNum, + TotalWorkNum = MillionsMonthlyReportItem.TotalWorkNum, + SeriousInjuriesNum = MillionsMonthlyReportItem.SeriousInjuriesNum, + SeriousInjuriesPersonNum = MillionsMonthlyReportItem.SeriousInjuriesPersonNum, + SeriousInjuriesLossHour = MillionsMonthlyReportItem.SeriousInjuriesLossHour, + MinorAccidentNum = MillionsMonthlyReportItem.MinorAccidentNum, + MinorAccidentPersonNum = MillionsMonthlyReportItem.MinorAccidentPersonNum, + MinorAccidentLossHour = MillionsMonthlyReportItem.MinorAccidentLossHour, + OtherAccidentNum = MillionsMonthlyReportItem.OtherAccidentNum, + OtherAccidentPersonNum = MillionsMonthlyReportItem.OtherAccidentPersonNum, + OtherAccidentLossHour = MillionsMonthlyReportItem.OtherAccidentLossHour, + RestrictedWorkPersonNum = MillionsMonthlyReportItem.RestrictedWorkPersonNum, + RestrictedWorkLossHour = MillionsMonthlyReportItem.RestrictedWorkLossHour, + MedicalTreatmentPersonNum = MillionsMonthlyReportItem.MedicalTreatmentPersonNum, + MedicalTreatmentLossHour = MillionsMonthlyReportItem.MedicalTreatmentLossHour, + FireNum = MillionsMonthlyReportItem.FireNum, + ExplosionNum = MillionsMonthlyReportItem.ExplosionNum, + TrafficNum = MillionsMonthlyReportItem.TrafficNum, + EquipmentNum = MillionsMonthlyReportItem.EquipmentNum, + QualityNum = MillionsMonthlyReportItem.QualityNum, + OtherNum = MillionsMonthlyReportItem.OtherNum, + FirstAidDressingsNum = MillionsMonthlyReportItem.FirstAidDressingsNum, + AttemptedEventNum = MillionsMonthlyReportItem.AttemptedEventNum, + LossDayNum = MillionsMonthlyReportItem.LossDayNum + }; + + Funs.DB.Information_MillionsMonthlyReportItem.InsertOnSubmit(newMillionsMonthlyReportItem); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改百万工时安全统计月报表明细表 + /// + /// 百万工时安全统计月报表明细表实体 + public static void UpdateMillionsMonthlyReportItem(Model.Information_MillionsMonthlyReportItem MillionsMonthlyReportItem) + { + Model.Information_MillionsMonthlyReportItem newMillionsMonthlyReportItem = Funs.DB.Information_MillionsMonthlyReportItem.FirstOrDefault(e => e.MillionsMonthlyReportItemId == MillionsMonthlyReportItem.MillionsMonthlyReportItemId); + newMillionsMonthlyReportItem.SortIndex = MillionsMonthlyReportItem.SortIndex; + newMillionsMonthlyReportItem.Affiliation = MillionsMonthlyReportItem.Affiliation; + newMillionsMonthlyReportItem.Name = MillionsMonthlyReportItem.Name; + newMillionsMonthlyReportItem.PostPersonNum = MillionsMonthlyReportItem.PostPersonNum; + newMillionsMonthlyReportItem.SnapPersonNum = MillionsMonthlyReportItem.SnapPersonNum; + newMillionsMonthlyReportItem.ContractorNum = MillionsMonthlyReportItem.ContractorNum; + newMillionsMonthlyReportItem.SumPersonNum = MillionsMonthlyReportItem.SumPersonNum; + newMillionsMonthlyReportItem.TotalWorkNum = MillionsMonthlyReportItem.TotalWorkNum; + newMillionsMonthlyReportItem.SeriousInjuriesNum = MillionsMonthlyReportItem.SeriousInjuriesNum; + newMillionsMonthlyReportItem.SeriousInjuriesPersonNum = MillionsMonthlyReportItem.SeriousInjuriesPersonNum; + newMillionsMonthlyReportItem.SeriousInjuriesLossHour = MillionsMonthlyReportItem.SeriousInjuriesLossHour; + newMillionsMonthlyReportItem.MinorAccidentNum = MillionsMonthlyReportItem.MinorAccidentNum; + newMillionsMonthlyReportItem.MinorAccidentPersonNum = MillionsMonthlyReportItem.MinorAccidentPersonNum; + newMillionsMonthlyReportItem.MinorAccidentLossHour = MillionsMonthlyReportItem.MinorAccidentLossHour; + newMillionsMonthlyReportItem.OtherAccidentNum = MillionsMonthlyReportItem.OtherAccidentNum; + newMillionsMonthlyReportItem.OtherAccidentPersonNum = MillionsMonthlyReportItem.OtherAccidentPersonNum; + newMillionsMonthlyReportItem.OtherAccidentLossHour = MillionsMonthlyReportItem.OtherAccidentLossHour; + newMillionsMonthlyReportItem.RestrictedWorkPersonNum = MillionsMonthlyReportItem.RestrictedWorkPersonNum; + newMillionsMonthlyReportItem.RestrictedWorkLossHour = MillionsMonthlyReportItem.RestrictedWorkLossHour; + newMillionsMonthlyReportItem.MedicalTreatmentPersonNum = MillionsMonthlyReportItem.MedicalTreatmentPersonNum; + newMillionsMonthlyReportItem.MedicalTreatmentLossHour = MillionsMonthlyReportItem.MedicalTreatmentLossHour; + newMillionsMonthlyReportItem.FireNum = MillionsMonthlyReportItem.FireNum; + newMillionsMonthlyReportItem.ExplosionNum = MillionsMonthlyReportItem.ExplosionNum; + newMillionsMonthlyReportItem.TrafficNum = MillionsMonthlyReportItem.TrafficNum; + newMillionsMonthlyReportItem.EquipmentNum = MillionsMonthlyReportItem.EquipmentNum; + newMillionsMonthlyReportItem.QualityNum = MillionsMonthlyReportItem.QualityNum; + newMillionsMonthlyReportItem.OtherNum = MillionsMonthlyReportItem.OtherNum; + newMillionsMonthlyReportItem.FirstAidDressingsNum = MillionsMonthlyReportItem.FirstAidDressingsNum; + newMillionsMonthlyReportItem.AttemptedEventNum = MillionsMonthlyReportItem.AttemptedEventNum; + newMillionsMonthlyReportItem.LossDayNum = MillionsMonthlyReportItem.LossDayNum; + + Funs.DB.SubmitChanges(); + } + + /// + /// 根据Id删除所有数据 + /// + /// + public static void DeleteMillionsMonthlyReportItemByMillionsMonthlyReportId(string MillionsMonthlyReportId) + { + var q = from x in Funs.DB.Information_MillionsMonthlyReportItem where x.MillionsMonthlyReportId == MillionsMonthlyReportId select x; + if (q != null) + { + Funs.DB.Information_MillionsMonthlyReportItem.DeleteAllOnSubmit(q); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportService.cs b/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportService.cs new file mode 100644 index 00000000..4c951c09 --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/MillionsMonthlyReportService.cs @@ -0,0 +1,120 @@ +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + public static class MillionsMonthlyReportService + { + /// + /// 百万工时安全统计月报表 + /// + /// 百万工时安全统计月报表Id + /// 百万工时安全统计月报表 + public static Model.Information_MillionsMonthlyReport GetMillionsMonthlyReportByMillionsMonthlyReportId(string MillionsMonthlyReportId) + { + return Funs.DB.Information_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == MillionsMonthlyReportId); + } + + /// + /// 百万工时安全统计月报表 + /// + /// 单位Id + /// 年度 + /// 月份 + /// 百万工时安全统计月报表 + public static Model.Information_MillionsMonthlyReport GetMillionsMonthlyReportByUnitIdAndYearAndMonth(string unitId, int year, int month) + { + return Funs.DB.Information_MillionsMonthlyReport.FirstOrDefault(e => e.UnitId == unitId && e.Month == month && e.Year == year); + } + + /// + /// 根据单位Id获取百万工时安全统计月报表集合 + /// + /// 单位Id + /// 百万工时安全统计月报表集合 + public static List GetMillionsMonthlyReportsByUnitId(string UnitId) + { + return (from x in Funs.DB.View_Information_MillionsMonthlyReport where x.UnitId == UnitId orderby x.FillingDate descending select x).ToList(); + } + + /// + /// 增加百万工时安全统计月报表 + /// + /// 百万工时安全统计月报表实体 + public static void AddMillionsMonthlyReport(Model.Information_MillionsMonthlyReport MillionsMonthlyReport) + { + Model.Information_MillionsMonthlyReport newMillionsMonthlyReport = new Model.Information_MillionsMonthlyReport + { + MillionsMonthlyReportId = MillionsMonthlyReport.MillionsMonthlyReportId, + Year = MillionsMonthlyReport.Year, + Month = MillionsMonthlyReport.Month, + UnitId = MillionsMonthlyReport.UnitId, + FillingDate = MillionsMonthlyReport.FillingDate, + DutyPerson = MillionsMonthlyReport.DutyPerson, + RecordableIncidentRate = MillionsMonthlyReport.RecordableIncidentRate, + LostTimeRate = MillionsMonthlyReport.LostTimeRate, + LostTimeInjuryRate = MillionsMonthlyReport.LostTimeInjuryRate, + DeathAccidentFrequency = MillionsMonthlyReport.DeathAccidentFrequency, + AccidentMortality = MillionsMonthlyReport.AccidentMortality, + FillingMan = MillionsMonthlyReport.FillingMan, + UpState = MillionsMonthlyReport.UpState, + HandleState = MillionsMonthlyReport.HandleState, + HandleMan = MillionsMonthlyReport.HandleMan + }; + + Funs.DB.Information_MillionsMonthlyReport.InsertOnSubmit(newMillionsMonthlyReport); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改百万工时安全统计月报表 + /// + /// 百万工时安全统计月报表实体 + public static void UpdateMillionsMonthlyReport(Model.Information_MillionsMonthlyReport MillionsMonthlyReport) + { + Model.Information_MillionsMonthlyReport newMillionsMonthlyReport = Funs.DB.Information_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == MillionsMonthlyReport.MillionsMonthlyReportId); + if (newMillionsMonthlyReport != null) + { + newMillionsMonthlyReport.Year = MillionsMonthlyReport.Year; + newMillionsMonthlyReport.Month = MillionsMonthlyReport.Month; + newMillionsMonthlyReport.UnitId = MillionsMonthlyReport.UnitId; + newMillionsMonthlyReport.FillingDate = MillionsMonthlyReport.FillingDate; + newMillionsMonthlyReport.DutyPerson = MillionsMonthlyReport.DutyPerson; + newMillionsMonthlyReport.RecordableIncidentRate = MillionsMonthlyReport.RecordableIncidentRate; + newMillionsMonthlyReport.LostTimeRate = MillionsMonthlyReport.LostTimeRate; + newMillionsMonthlyReport.LostTimeInjuryRate = MillionsMonthlyReport.LostTimeInjuryRate; + newMillionsMonthlyReport.DeathAccidentFrequency = MillionsMonthlyReport.DeathAccidentFrequency; + newMillionsMonthlyReport.AccidentMortality = MillionsMonthlyReport.AccidentMortality; + newMillionsMonthlyReport.UpState = MillionsMonthlyReport.UpState; + newMillionsMonthlyReport.HandleState = MillionsMonthlyReport.HandleState; + newMillionsMonthlyReport.HandleMan = MillionsMonthlyReport.HandleMan; + + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据Id获取数据 + /// + /// + public static void DeleteMillionsMonthlyReportByMillionsMonthlyReportId(string MillionsMonthlyReportId) + { + Model.Information_MillionsMonthlyReport newMillionsMonthlyReport = Funs.DB.Information_MillionsMonthlyReport.FirstOrDefault(e => e.MillionsMonthlyReportId == MillionsMonthlyReportId); + if (newMillionsMonthlyReport != null) + { + Funs.DB.Information_MillionsMonthlyReport.DeleteOnSubmit(newMillionsMonthlyReport); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据报表单位,报表时间判断是否存在 + /// + /// Id + /// + public static Model.Information_MillionsMonthlyReport GetMillionsMonthlyReportByUnitIdDate(string unitId, int year, int Month) + { + return Funs.DB.Information_MillionsMonthlyReport.FirstOrDefault(e => e.UnitId == unitId && e.Year == year && e.Month == Month); + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/SafetyQuarterlyReportService.cs b/SGGL/BLL/ZHGL/Information/SafetyQuarterlyReportService.cs new file mode 100644 index 00000000..11136073 --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/SafetyQuarterlyReportService.cs @@ -0,0 +1,267 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 安全生产数据季报 + /// + public static class SafetyQuarterlyReportService + { + /// + /// 根据主键获取安全生产数据季报 + /// + /// + /// + public static Model.Information_SafetyQuarterlyReport GetSafetyQuarterlyReportById(string safetyQuarterlyReportId) + { + return Funs.DB.Information_SafetyQuarterlyReport.FirstOrDefault(e => e.SafetyQuarterlyReportId == safetyQuarterlyReportId); + } + + /// + /// 安全生产数据季报 + /// + /// 单位Id + /// 年度 + /// 季度 + /// 安全生产数据季报 + public static Model.Information_SafetyQuarterlyReport GetSafetyQuarterlyReportByUnitIdAndYearAndQuarters(string unitId, int year, int quarters) + { + return Funs.DB.Information_SafetyQuarterlyReport.FirstOrDefault(e => e.UnitId == unitId && e.Quarters == quarters && e.YearId == year); + } + + /// + /// 根据单位Id获取安全生产数据季报集合 + /// + /// 单位Id + /// 安全生产数据季报集合 + public static List GetSafetyQuarterlyReportsByUnitId(string UnitId) + { + return (from x in Funs.DB.View_Information_SafetyQuarterlyReport where x.UnitId == UnitId orderby x.FillingDate descending select x).ToList(); + } + + /// + /// 根据单位、年度、季度获取安全生产数据季报 + /// + /// + /// + /// + /// + public static Model.Information_SafetyQuarterlyReport GetSafetyQuarterlyReportByUnitYearQuarters(string unitId, int yearId, int quarters) + { + return Funs.DB.Information_SafetyQuarterlyReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarters == quarters); + } + + /// + /// 增加安全生产数据季报 + /// + /// + public static void AddSafetyQuarterlyReport(Model.Information_SafetyQuarterlyReport safetyQuarterlyReport) + { + Model.Information_SafetyQuarterlyReport newSafetyQuarterlyReport = new Model.Information_SafetyQuarterlyReport + { + SafetyQuarterlyReportId = safetyQuarterlyReport.SafetyQuarterlyReportId, + UnitId = safetyQuarterlyReport.UnitId, + YearId = safetyQuarterlyReport.YearId, + FillingDate = DateTime.Now, + Quarters = safetyQuarterlyReport.Quarters, + TotalInWorkHours = safetyQuarterlyReport.TotalInWorkHours, + TotalInWorkHoursRemark = safetyQuarterlyReport.TotalInWorkHoursRemark, + TotalOutWorkHours = safetyQuarterlyReport.TotalOutWorkHours, + TotalOutWorkHoursRemark = safetyQuarterlyReport.TotalOutWorkHoursRemark, + WorkHoursLossRate = safetyQuarterlyReport.WorkHoursLossRate, + WorkHoursLossRateRemark = safetyQuarterlyReport.WorkHoursLossRateRemark, + WorkHoursAccuracy = safetyQuarterlyReport.WorkHoursAccuracy, + WorkHoursAccuracyRemark = safetyQuarterlyReport.WorkHoursAccuracyRemark, + MainBusinessIncome = safetyQuarterlyReport.MainBusinessIncome, + MainBusinessIncomeRemark = safetyQuarterlyReport.MainBusinessIncomeRemark, + ConstructionRevenue = safetyQuarterlyReport.ConstructionRevenue, + ConstructionRevenueRemark = safetyQuarterlyReport.ConstructionRevenueRemark, + UnitTimeIncome = safetyQuarterlyReport.UnitTimeIncome, + UnitTimeIncomeRemark = safetyQuarterlyReport.UnitTimeIncomeRemark, + BillionsOutputMortality = safetyQuarterlyReport.BillionsOutputMortality, + BillionsOutputMortalityRemark = safetyQuarterlyReport.BillionsOutputMortalityRemark, + MajorFireAccident = safetyQuarterlyReport.MajorFireAccident, + MajorFireAccidentRemark = safetyQuarterlyReport.MajorFireAccidentRemark, + MajorEquipAccident = safetyQuarterlyReport.MajorEquipAccident, + MajorEquipAccidentRemark = safetyQuarterlyReport.MajorEquipAccidentRemark, + AccidentFrequency = safetyQuarterlyReport.AccidentFrequency, + AccidentFrequencyRemark = safetyQuarterlyReport.AccidentFrequencyRemark, + SeriousInjuryAccident = safetyQuarterlyReport.SeriousInjuryAccident, + SeriousInjuryAccidentRemark = safetyQuarterlyReport.SeriousInjuryAccidentRemark, + FireAccident = safetyQuarterlyReport.FireAccident, + FireAccidentRemark = safetyQuarterlyReport.FireAccidentRemark, + EquipmentAccident = safetyQuarterlyReport.EquipmentAccident, + EquipmentAccidentRemark = safetyQuarterlyReport.EquipmentAccidentRemark, + PoisoningAndInjuries = safetyQuarterlyReport.PoisoningAndInjuries, + PoisoningAndInjuriesRemark = safetyQuarterlyReport.PoisoningAndInjuriesRemark, + ProductionSafetyInTotal = safetyQuarterlyReport.ProductionSafetyInTotal, + ProductionSafetyInTotalRemark = safetyQuarterlyReport.ProductionSafetyInTotalRemark, + ProtectionInput = safetyQuarterlyReport.ProtectionInput, + ProtectionInputRemark = safetyQuarterlyReport.ProtectionInputRemark, + LaboAndHealthIn = safetyQuarterlyReport.LaboAndHealthIn, + LaborAndHealthInRemark = safetyQuarterlyReport.LaborAndHealthInRemark, + TechnologyProgressIn = safetyQuarterlyReport.TechnologyProgressIn, + TechnologyProgressInRemark = safetyQuarterlyReport.TechnologyProgressInRemark, + EducationTrainIn = safetyQuarterlyReport.EducationTrainIn, + EducationTrainInRemark = safetyQuarterlyReport.EducationTrainInRemark, + ProjectCostRate = safetyQuarterlyReport.ProjectCostRate, + ProjectCostRateRemark = safetyQuarterlyReport.ProjectCostRateRemark, + ProductionInput = safetyQuarterlyReport.ProductionInput, + ProductionInputRemark = safetyQuarterlyReport.ProductionInputRemark, + Revenue = safetyQuarterlyReport.Revenue, + RevenueRemark = safetyQuarterlyReport.RevenueRemark, + FullTimeMan = safetyQuarterlyReport.FullTimeMan, + FullTimeManRemark = safetyQuarterlyReport.FullTimeManRemark, + FullTimeManAttachUrl = safetyQuarterlyReport.FullTimeManAttachUrl, + PMMan = safetyQuarterlyReport.PMMan, + PMManRemark = safetyQuarterlyReport.PMManRemark, + PMManAttachUrl = safetyQuarterlyReport.PMManAttachUrl, + CorporateDirectorEdu = safetyQuarterlyReport.CorporateDirectorEdu, + CorporateDirectorEduRemark = safetyQuarterlyReport.CorporateDirectorEduRemark, + ProjectLeaderEdu = safetyQuarterlyReport.ProjectLeaderEdu, + ProjectLeaderEduRemark = safetyQuarterlyReport.ProjectLeaderEduRemark, + FullTimeEdu = safetyQuarterlyReport.FullTimeEdu, + FullTimeEduRemark = safetyQuarterlyReport.FullTimeEduRemark, + ThreeKidsEduRate = safetyQuarterlyReport.ThreeKidsEduRate, + ThreeKidsEduRateRemark = safetyQuarterlyReport.ThreeKidsEduRateRemark, + UplinReportRate = safetyQuarterlyReport.UplinReportRate, + UplinReportRateRemark = safetyQuarterlyReport.UplinReportRateRemark, + Remarks = safetyQuarterlyReport.Remarks, + CompileMan = safetyQuarterlyReport.CompileMan, + UpState = safetyQuarterlyReport.UpState, + HandleState = safetyQuarterlyReport.HandleState, + HandleMan = safetyQuarterlyReport.HandleMan, + KeyEquipmentTotal = safetyQuarterlyReport.KeyEquipmentTotal, + KeyEquipmentTotalRemark = safetyQuarterlyReport.KeyEquipmentTotalRemark, + KeyEquipmentReportCount = safetyQuarterlyReport.KeyEquipmentReportCount, + KeyEquipmentReportCountRemark = safetyQuarterlyReport.KeyEquipmentReportCountRemark, + ChemicalAreaProjectCount = safetyQuarterlyReport.ChemicalAreaProjectCount, + ChemicalAreaProjectCountRemark = safetyQuarterlyReport.ChemicalAreaProjectCountRemark, + HarmfulMediumCoverCount = safetyQuarterlyReport.HarmfulMediumCoverCount, + HarmfulMediumCoverCountRemark = safetyQuarterlyReport.HarmfulMediumCoverCountRemark, + HarmfulMediumCoverRate = safetyQuarterlyReport.HarmfulMediumCoverRate, + HarmfulMediumCoverRateRemark = safetyQuarterlyReport.HarmfulMediumCoverRateRemark + }; + Funs.DB.Information_SafetyQuarterlyReport.InsertOnSubmit(newSafetyQuarterlyReport); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改安全生产数据季报 + /// + /// + public static void UpdateSafetyQuarterlyReport(Model.Information_SafetyQuarterlyReport safetyQuarterlyReport) + { + Model.Information_SafetyQuarterlyReport newSafetyQuarterlyReport = Funs.DB.Information_SafetyQuarterlyReport.FirstOrDefault(e => e.SafetyQuarterlyReportId == safetyQuarterlyReport.SafetyQuarterlyReportId); + if (newSafetyQuarterlyReport != null) + { + newSafetyQuarterlyReport.UnitId = safetyQuarterlyReport.UnitId; + newSafetyQuarterlyReport.YearId = safetyQuarterlyReport.YearId; + newSafetyQuarterlyReport.Quarters = safetyQuarterlyReport.Quarters; + newSafetyQuarterlyReport.TotalInWorkHours = safetyQuarterlyReport.TotalInWorkHours; + newSafetyQuarterlyReport.TotalInWorkHoursRemark = safetyQuarterlyReport.TotalInWorkHoursRemark; + newSafetyQuarterlyReport.TotalOutWorkHours = safetyQuarterlyReport.TotalOutWorkHours; + newSafetyQuarterlyReport.TotalOutWorkHoursRemark = safetyQuarterlyReport.TotalOutWorkHoursRemark; + newSafetyQuarterlyReport.WorkHoursLossRate = safetyQuarterlyReport.WorkHoursLossRate; + newSafetyQuarterlyReport.WorkHoursLossRateRemark = safetyQuarterlyReport.WorkHoursLossRateRemark; + newSafetyQuarterlyReport.WorkHoursAccuracy = safetyQuarterlyReport.WorkHoursAccuracy; + newSafetyQuarterlyReport.WorkHoursAccuracyRemark = safetyQuarterlyReport.WorkHoursAccuracyRemark; + newSafetyQuarterlyReport.MainBusinessIncome = safetyQuarterlyReport.MainBusinessIncome; + newSafetyQuarterlyReport.MainBusinessIncomeRemark = safetyQuarterlyReport.MainBusinessIncomeRemark; + newSafetyQuarterlyReport.ConstructionRevenue = safetyQuarterlyReport.ConstructionRevenue; + newSafetyQuarterlyReport.ConstructionRevenueRemark = safetyQuarterlyReport.ConstructionRevenueRemark; + newSafetyQuarterlyReport.UnitTimeIncome = safetyQuarterlyReport.UnitTimeIncome; + newSafetyQuarterlyReport.UnitTimeIncomeRemark = safetyQuarterlyReport.UnitTimeIncomeRemark; + newSafetyQuarterlyReport.BillionsOutputMortality = safetyQuarterlyReport.BillionsOutputMortality; + newSafetyQuarterlyReport.BillionsOutputMortalityRemark = safetyQuarterlyReport.BillionsOutputMortalityRemark; + newSafetyQuarterlyReport.MajorFireAccident = safetyQuarterlyReport.MajorFireAccident; + newSafetyQuarterlyReport.MajorFireAccidentRemark = safetyQuarterlyReport.MajorFireAccidentRemark; + newSafetyQuarterlyReport.MajorEquipAccident = safetyQuarterlyReport.MajorEquipAccident; + newSafetyQuarterlyReport.MajorEquipAccidentRemark = safetyQuarterlyReport.MajorEquipAccidentRemark; + newSafetyQuarterlyReport.AccidentFrequency = safetyQuarterlyReport.AccidentFrequency; + newSafetyQuarterlyReport.AccidentFrequencyRemark = safetyQuarterlyReport.AccidentFrequencyRemark; + newSafetyQuarterlyReport.SeriousInjuryAccident = safetyQuarterlyReport.SeriousInjuryAccident; + newSafetyQuarterlyReport.SeriousInjuryAccidentRemark = safetyQuarterlyReport.SeriousInjuryAccidentRemark; + newSafetyQuarterlyReport.FireAccident = safetyQuarterlyReport.FireAccident; + newSafetyQuarterlyReport.FireAccidentRemark = safetyQuarterlyReport.FireAccidentRemark; + newSafetyQuarterlyReport.EquipmentAccident = safetyQuarterlyReport.EquipmentAccident; + newSafetyQuarterlyReport.EquipmentAccidentRemark = safetyQuarterlyReport.EquipmentAccidentRemark; + newSafetyQuarterlyReport.PoisoningAndInjuries = safetyQuarterlyReport.PoisoningAndInjuries; + newSafetyQuarterlyReport.PoisoningAndInjuriesRemark = safetyQuarterlyReport.PoisoningAndInjuriesRemark; + newSafetyQuarterlyReport.ProductionSafetyInTotal = safetyQuarterlyReport.ProductionSafetyInTotal; + newSafetyQuarterlyReport.ProductionSafetyInTotalRemark = safetyQuarterlyReport.ProductionSafetyInTotalRemark; + newSafetyQuarterlyReport.ProtectionInput = safetyQuarterlyReport.ProtectionInput; + newSafetyQuarterlyReport.ProtectionInputRemark = safetyQuarterlyReport.ProtectionInputRemark; + newSafetyQuarterlyReport.LaboAndHealthIn = safetyQuarterlyReport.LaboAndHealthIn; + newSafetyQuarterlyReport.LaborAndHealthInRemark = safetyQuarterlyReport.LaborAndHealthInRemark; + newSafetyQuarterlyReport.TechnologyProgressIn = safetyQuarterlyReport.TechnologyProgressIn; + newSafetyQuarterlyReport.TechnologyProgressInRemark = safetyQuarterlyReport.TechnologyProgressInRemark; + newSafetyQuarterlyReport.EducationTrainIn = safetyQuarterlyReport.EducationTrainIn; + newSafetyQuarterlyReport.EducationTrainInRemark = safetyQuarterlyReport.EducationTrainInRemark; + newSafetyQuarterlyReport.ProjectCostRate = safetyQuarterlyReport.ProjectCostRate; + newSafetyQuarterlyReport.ProjectCostRateRemark = safetyQuarterlyReport.ProjectCostRateRemark; + newSafetyQuarterlyReport.ProductionInput = safetyQuarterlyReport.ProductionInput; + newSafetyQuarterlyReport.ProductionInputRemark = safetyQuarterlyReport.ProductionInputRemark; + newSafetyQuarterlyReport.Revenue = safetyQuarterlyReport.Revenue; + newSafetyQuarterlyReport.RevenueRemark = safetyQuarterlyReport.RevenueRemark; + newSafetyQuarterlyReport.FullTimeMan = safetyQuarterlyReport.FullTimeMan; + newSafetyQuarterlyReport.FullTimeManRemark = safetyQuarterlyReport.FullTimeManRemark; + newSafetyQuarterlyReport.FullTimeManAttachUrl = safetyQuarterlyReport.FullTimeManAttachUrl; + newSafetyQuarterlyReport.PMMan = safetyQuarterlyReport.PMMan; + newSafetyQuarterlyReport.PMManRemark = safetyQuarterlyReport.PMManRemark; + newSafetyQuarterlyReport.PMManAttachUrl = safetyQuarterlyReport.PMManAttachUrl; + newSafetyQuarterlyReport.CorporateDirectorEdu = safetyQuarterlyReport.CorporateDirectorEdu; + newSafetyQuarterlyReport.CorporateDirectorEduRemark = safetyQuarterlyReport.CorporateDirectorEduRemark; + newSafetyQuarterlyReport.ProjectLeaderEdu = safetyQuarterlyReport.ProjectLeaderEdu; + newSafetyQuarterlyReport.ProjectLeaderEduRemark = safetyQuarterlyReport.ProjectLeaderEduRemark; + newSafetyQuarterlyReport.FullTimeEdu = safetyQuarterlyReport.FullTimeEdu; + newSafetyQuarterlyReport.FullTimeEduRemark = safetyQuarterlyReport.FullTimeEduRemark; + newSafetyQuarterlyReport.ThreeKidsEduRate = safetyQuarterlyReport.ThreeKidsEduRate; + newSafetyQuarterlyReport.ThreeKidsEduRateRemark = safetyQuarterlyReport.ThreeKidsEduRateRemark; + newSafetyQuarterlyReport.UplinReportRate = safetyQuarterlyReport.UplinReportRate; + newSafetyQuarterlyReport.UplinReportRateRemark = safetyQuarterlyReport.UplinReportRateRemark; + newSafetyQuarterlyReport.Remarks = safetyQuarterlyReport.Remarks; + newSafetyQuarterlyReport.UpState = safetyQuarterlyReport.UpState; + newSafetyQuarterlyReport.HandleState = safetyQuarterlyReport.HandleState; + newSafetyQuarterlyReport.HandleMan = safetyQuarterlyReport.HandleMan; + newSafetyQuarterlyReport.KeyEquipmentTotal = safetyQuarterlyReport.KeyEquipmentTotal; + newSafetyQuarterlyReport.KeyEquipmentTotalRemark = safetyQuarterlyReport.KeyEquipmentTotalRemark; + newSafetyQuarterlyReport.KeyEquipmentReportCount = safetyQuarterlyReport.KeyEquipmentReportCount; + newSafetyQuarterlyReport.KeyEquipmentReportCountRemark = safetyQuarterlyReport.KeyEquipmentReportCountRemark; + newSafetyQuarterlyReport.ChemicalAreaProjectCount = safetyQuarterlyReport.ChemicalAreaProjectCount; + newSafetyQuarterlyReport.ChemicalAreaProjectCountRemark = safetyQuarterlyReport.ChemicalAreaProjectCountRemark; + newSafetyQuarterlyReport.HarmfulMediumCoverCount = safetyQuarterlyReport.HarmfulMediumCoverCount; + newSafetyQuarterlyReport.HarmfulMediumCoverCountRemark = safetyQuarterlyReport.HarmfulMediumCoverCountRemark; + newSafetyQuarterlyReport.HarmfulMediumCoverRate = safetyQuarterlyReport.HarmfulMediumCoverRate; + newSafetyQuarterlyReport.HarmfulMediumCoverRateRemark = safetyQuarterlyReport.HarmfulMediumCoverRateRemark; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除安全生产数据季报 + /// + /// + public static void DeleteSafetyQuarterlyReportById(string safetyQuarterlyReportId) + { + Model.Information_SafetyQuarterlyReport safetyQuarterlyReport = Funs.DB.Information_SafetyQuarterlyReport.FirstOrDefault(e => e.SafetyQuarterlyReportId == safetyQuarterlyReportId); + if (safetyQuarterlyReport != null) + { + if (!string.IsNullOrEmpty(safetyQuarterlyReport.FullTimeManAttachUrl)) + { + BLL.UploadFileService.DeleteFile(Funs.RootPath, safetyQuarterlyReport.FullTimeManAttachUrl); + } + if (!string.IsNullOrEmpty(safetyQuarterlyReport.PMManAttachUrl)) + { + BLL.UploadFileService.DeleteFile(Funs.RootPath, safetyQuarterlyReport.PMManAttachUrl); + } + Funs.DB.Information_SafetyQuarterlyReport.DeleteOnSubmit(safetyQuarterlyReport); + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/BLL/ZHGL/Information/UrgeReportService.cs b/SGGL/BLL/ZHGL/Information/UrgeReportService.cs new file mode 100644 index 00000000..274ceecb --- /dev/null +++ b/SGGL/BLL/ZHGL/Information/UrgeReportService.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// + /// + public static class UrgeReportService + { + /// + /// 更新催报完成 + /// + /// + /// + /// + /// + public static void SetComplete(string unitId, string reportType, string year, string value) + { + Model.Information_UrgeReport urgeReport = new Model.Information_UrgeReport(); + if (reportType == Const.ReportType_1 || reportType == Const.ReportType_2) + { + urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year && x.MonthId == value); + } + else if (reportType == Const.ReportType_3 || reportType == Const.ReportType_4) + { + urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year && x.QuarterId == value); + } + else if (reportType == Const.ReportType_5) + { + urgeReport = Funs.DB.Information_UrgeReport.FirstOrDefault(x => x.UnitId == unitId && x.ReprotType == reportType && x.YearId == year && x.HalfYearId == value); + } + if (urgeReport != null) + { + urgeReport.IsComplete = true; + Funs.DB.SubmitChanges(); + } + } + } +} diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 79b18dc0..110ce531 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1389,6 +1389,21 @@ + + + + + + + + + + + + + + + @@ -1405,6 +1420,18 @@ + + + + + + + + + + + + @@ -12319,6 +12346,111 @@ TestRecord.aspx + + AccidentCauseReportBar.aspx + ASPXCodeBehind + + + AccidentCauseReportBar.aspx + + + AccidentCauseReportBarIn.aspx + ASPXCodeBehind + + + AccidentCauseReportBarIn.aspx + + + AccidentCauseReportImport.aspx + ASPXCodeBehind + + + AccidentCauseReportImport.aspx + + + DrillConductedQuarterlyReportBar.aspx + ASPXCodeBehind + + + DrillConductedQuarterlyReportBar.aspx + + + DrillConductedQuarterlyReportBarIn.aspx + ASPXCodeBehind + + + DrillConductedQuarterlyReportBarIn.aspx + + + DrillConductedQuarterlyReportImport.aspx + ASPXCodeBehind + + + DrillConductedQuarterlyReportImport.aspx + + + DrillPlanHalfYearReportBar.aspx + ASPXCodeBehind + + + DrillPlanHalfYearReportBar.aspx + + + DrillPlanHalfYearReportBarIn.aspx + ASPXCodeBehind + + + DrillPlanHalfYearReportBarIn.aspx + + + DrillPlanHalfYearReportImport.aspx + ASPXCodeBehind + + + DrillPlanHalfYearReportImport.aspx + + + MillionsMonthlyReportBar.aspx + ASPXCodeBehind + + + MillionsMonthlyReportBar.aspx + + + MillionsMonthlyReportBarIn.aspx + ASPXCodeBehind + + + MillionsMonthlyReportBarIn.aspx + + + MillionsMonthlyReportImport.aspx + ASPXCodeBehind + + + MillionsMonthlyReportImport.aspx + + + SafetyQuarterlyReportBar.aspx + ASPXCodeBehind + + + SafetyQuarterlyReportBar.aspx + + + SafetyQuarterlyReportBarIn.aspx + ASPXCodeBehind + + + SafetyQuarterlyReportBarIn.aspx + + + SafetyQuarterlyReportImport.aspx + ASPXCodeBehind + + + SafetyQuarterlyReportImport.aspx + CQMSData_CQMS.aspx ASPXCodeBehind @@ -12431,6 +12563,90 @@ SYHSEData_SYHSEEdit.aspx + + AccidentCauseReport.aspx + ASPXCodeBehind + + + AccidentCauseReport.aspx + + + AccidentCauseReportSave.aspx + ASPXCodeBehind + + + AccidentCauseReportSave.aspx + + + DrillConductedQuarterlyReport.aspx + ASPXCodeBehind + + + DrillConductedQuarterlyReport.aspx + + + DrillConductedQuarterlyReportAdd.aspx + ASPXCodeBehind + + + DrillConductedQuarterlyReportAdd.aspx + + + DrillPlanHalfYearReport.aspx + ASPXCodeBehind + + + DrillPlanHalfYearReport.aspx + + + DrillPlanHalfYearReportAdd.aspx + ASPXCodeBehind + + + DrillPlanHalfYearReportAdd.aspx + + + MillionsMonthlyReport.aspx + ASPXCodeBehind + + + MillionsMonthlyReport.aspx + + + MillionsMonthlyReportSave.aspx + ASPXCodeBehind + + + MillionsMonthlyReportSave.aspx + + + ReportAuditSee.aspx + ASPXCodeBehind + + + ReportAuditSee.aspx + + + ReportSubmit.aspx + ASPXCodeBehind + + + ReportSubmit.aspx + + + SafetyQuarterlyReport.aspx + ASPXCodeBehind + + + SafetyQuarterlyReport.aspx + + + SafetyQuarterlyReportEdit.aspx + ASPXCodeBehind + + + SafetyQuarterlyReportEdit.aspx + MainPlan.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx new file mode 100644 index 00000000..1623d17c --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccidentCauseReportBar.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.AccidentCauseReportBar" %> + + + + + + + 审核职工伤亡事故原因分析 + + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx.cs new file mode 100644 index 00000000..67f10226 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx.cs @@ -0,0 +1,778 @@ +using BLL; +using System; +using System.Data; +using System.Data.OleDb; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class AccidentCauseReportBar : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + } + #endregion + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 54); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var accidentTypes = from x in Funs.DB.Sys_Const where x.GroupId == "0012" select x; + for (int i = 0; i < ir; i++) + { + string row1 = pds.Rows[i][0].ToString(); + string unitId = string.Empty; + if (!string.IsNullOrEmpty(row1)) + { + var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitName == row1.Trim()); + if (unit == null) + { + result += "第" + (i + 2).ToString() + "行," + "填报单位" + "," + "[" + row1 + "]不存在!" + "|"; + } + else + { + unitId = unit.UnitId; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "填报单位" + "," + "此项为必填项!" + "|"; + } + string row2 = pds.Rows[i][1].ToString(); + if (string.IsNullOrEmpty(row2)) + { + result += "第" + (i + 2).ToString() + "行," + "编号" + "," + "此项为必填项!" + "|"; + } + string row3 = pds.Rows[i][2].ToString(); + if (!string.IsNullOrEmpty(row3)) + { + try + { + Int32 year = Convert.ToInt32(row3.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "年份" + "," + "[" + row3 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "年份" + "," + "此项为必填项!" + "|"; + } + string row4 = pds.Rows[i][3].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + Int32 month = Convert.ToInt32(row4.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "月份" + "," + "[" + row4 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "月份" + "," + "此项为必填项!" + "|"; + } + + ////判断是否 已存在该月份数据 + var accidentCauseReport = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(unitId, Funs.GetNewIntOrZero(row3.Trim()), Funs.GetNewIntOrZero(row4.Trim())); + if (accidentCauseReport != null) + { + result += "第" + (i + 2).ToString() + "行," + "已存在该月份月报!" + "|"; + } + + string row5 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(row5)) + { + try + { + Int32 deathAccident = Convert.ToInt32(row5); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "死亡事故数" + "," + "[" + row5 + "]错误!" + "|"; + } + } + string row6 = pds.Rows[i][5].ToString().Trim(); + if (!string.IsNullOrEmpty(row6)) + { + try + { + Int32 deathToll = Convert.ToInt32(row6); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "死亡人数" + "," + "[" + row6 + "]错误!" + "|"; + } + } + string row7 = pds.Rows[i][6].ToString().Trim(); + if (!string.IsNullOrEmpty(row7)) + { + try + { + Int32 injuredAccident = Convert.ToInt32(row7); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重伤事故" + "," + "[" + row7 + "]错误!" + "|"; + } + } + string row8 = pds.Rows[i][7].ToString().Trim(); + if (!string.IsNullOrEmpty(row8)) + { + try + { + Int32 injuredToll = Convert.ToInt32(row8); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重伤人数" + "," + "[" + row8 + "]错误!" + "|"; + } + } + string row9 = pds.Rows[i][8].ToString().Trim(); + if (!string.IsNullOrEmpty(row9)) + { + try + { + Int32 minorWoundAccident = Convert.ToInt32(row9); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "轻伤事故" + "," + "[" + row9 + "]错误!" + "|"; + } + } + string row10 = pds.Rows[i][9].ToString().Trim(); + if (!string.IsNullOrEmpty(row10)) + { + try + { + Int32 minorWoundToll = Convert.ToInt32(row10); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "轻伤人数" + "," + "[" + row10 + "]错误!" + "|"; + } + } + string row11 = pds.Rows[i][10].ToString().Trim(); + if (!string.IsNullOrEmpty(row11)) + { + try + { + Decimal averageTotalHours = Funs.GetNewDecimalOrZero(row11); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "平均工时总数" + "," + "[" + row11 + "]错误!" + "|"; + } + } + string row12 = pds.Rows[i][11].ToString().Trim(); + if (!string.IsNullOrEmpty(row12)) + { + try + { + Int32 averageManHours = Convert.ToInt32(row12); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "平均工时人数" + "," + "[" + row12 + "]错误!" + "|"; + } + } + string row13 = pds.Rows[i][12].ToString().Trim(); + if (!string.IsNullOrEmpty(row13)) + { + try + { + Int32 totalLossMan = Convert.ToInt32(row13); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "损失工时总数" + "," + "[" + row13 + "]错误!" + "|"; + } + } + string row14 = pds.Rows[i][13].ToString().Trim(); + if (!string.IsNullOrEmpty(row14)) + { + try + { + Int32 lastMonthLossHoursTotal = Convert.ToInt32(row14); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "上月损失工时总数" + "," + "[" + row14 + "]错误!" + "|"; + } + } + string row15 = pds.Rows[i][14].ToString().Trim(); + if (!string.IsNullOrEmpty(row15)) + { + try + { + Int32 knockOffTotal = Convert.ToInt32(row15); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "歇工总日数" + "," + "[" + row15 + "]错误!" + "|"; + } + } + string row16 = pds.Rows[i][15].ToString().Trim(); + if (!string.IsNullOrEmpty(row16)) + { + try + { + Int32 directLoss = Convert.ToInt32(row16); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "直接损失" + "," + "[" + row16 + "]错误!" + "|"; + } + } + string row17 = pds.Rows[i][16].ToString().Trim(); + if (!string.IsNullOrEmpty(row17)) + { + try + { + Int32 indirectLosses = Convert.ToInt32(row17); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "间接损失" + "," + "[" + row17 + "]错误!" + "|"; + } + } + string row18 = pds.Rows[i][17].ToString().Trim(); + if (!string.IsNullOrEmpty(row18)) + { + try + { + Int32 totalLoss = Convert.ToInt32(row18); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "总损失" + "," + "[" + row18 + "]错误!" + "|"; + } + } + string row19 = pds.Rows[i][18].ToString().Trim(); + if (!string.IsNullOrEmpty(row19)) + { + try + { + Int32 totalLossTime = Convert.ToInt32(row19); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "无损失工时总数" + "," + "[" + row19 + "]错误!" + "|"; + } + } + //string row20 = pds.Rows[i][19].ToString().Trim(); + string row21 = pds.Rows[i][20].ToString().Trim(); + if (!string.IsNullOrEmpty(row21)) + { + if (accidentTypes.Where(x => x.ConstValue == row21.Trim()).FirstOrDefault() == null) + { + result += "第" + (i + 2).ToString() + "行," + "事故类别" + "," + "[" + row21 + "]不存在!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "事故类别" + "," + "此项为必填项!" + "|"; + } + string row22 = pds.Rows[i][21].ToString().Trim(); + if (!string.IsNullOrEmpty(row22)) + { + try + { + Int32 death1 = Convert.ToInt32(row22); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "防护保险信号缺失死亡数" + "," + "[" + row22 + "]错误!" + "|"; + } + } + string row23 = pds.Rows[i][22].ToString().Trim(); + if (!string.IsNullOrEmpty(row23)) + { + try + { + Int32 injuries1 = Convert.ToInt32(row23); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "防护保险信号缺失重伤数" + "," + "[" + row23 + "]错误!" + "|"; + } + } + string row24 = pds.Rows[i][23].ToString().Trim(); + if (!string.IsNullOrEmpty(row24)) + { + try + { + Int32 minorInjuries1 = Convert.ToInt32(row24); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "防护保险信号缺失轻伤数" + "," + "[" + row24 + "]错误!" + "|"; + } + } + string row25 = pds.Rows[i][24].ToString().Trim(); + if (!string.IsNullOrEmpty(row25)) + { + try + { + Int32 death2 = Convert.ToInt32(row25); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "设备工具缺陷死亡数" + "," + "[" + row25 + "]错误!" + "|"; + } + } + string row26 = pds.Rows[i][25].ToString().Trim(); + if (!string.IsNullOrEmpty(row26)) + { + try + { + Int32 injuries2 = Convert.ToInt32(row26); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "设备工具缺陷重伤数" + "," + "[" + row26 + "]错误!" + "|"; + } + } + string row27 = pds.Rows[i][26].ToString().Trim(); + if (!string.IsNullOrEmpty(row27)) + { + try + { + Int32 minorInjuries2 = Convert.ToInt32(row27); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "设备工具缺陷轻伤数" + "," + "[" + row27 + "]错误!" + "|"; + } + } + string row28 = pds.Rows[i][27].ToString().Trim(); + if (!string.IsNullOrEmpty(row28)) + { + try + { + Int32 death3 = Convert.ToInt32(row28); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "个人防护缺陷死亡数" + "," + "[" + row28 + "]错误!" + "|"; + } + } + string row29 = pds.Rows[i][28].ToString().Trim(); + if (!string.IsNullOrEmpty(row29)) + { + try + { + Int32 injuries3 = Convert.ToInt32(row29); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "个人防护缺陷重伤数" + "," + "[" + row29 + "]错误!" + "|"; + } + } + string row30 = pds.Rows[i][29].ToString().Trim(); + if (!string.IsNullOrEmpty(row30)) + { + try + { + Int32 minorInjuries3 = Convert.ToInt32(row30); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "个人防护缺陷轻伤数" + "," + "[" + row30 + "]错误!" + "|"; + } + } + string row31 = pds.Rows[i][30].ToString().Trim(); + if (!string.IsNullOrEmpty(row31)) + { + try + { + Int32 death4 = Convert.ToInt32(row31); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "光线不足死亡数" + "," + "[" + row31 + "]错误!" + "|"; + } + } + string row32 = pds.Rows[i][31].ToString().Trim(); + if (!string.IsNullOrEmpty(row32)) + { + try + { + Int32 injuries4 = Convert.ToInt32(row32); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "光线不足重伤数" + "," + "[" + row32 + "]错误!" + "|"; + } + } + string row33 = pds.Rows[i][32].ToString().Trim(); + if (!string.IsNullOrEmpty(row33)) + { + try + { + Int32 minorInjuries4 = Convert.ToInt32(row33); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "光线不足轻伤数" + "," + "[" + row33 + "]错误!" + "|"; + } + } + string row34 = pds.Rows[i][33].ToString().Trim(); + if (!string.IsNullOrEmpty(row34)) + { + try + { + Int32 death5 = Convert.ToInt32(row34); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "劳动组织不合理死亡数" + "," + "[" + row34 + "]错误!" + "|"; + } + } + string row35 = pds.Rows[i][34].ToString().Trim(); + if (!string.IsNullOrEmpty(row35)) + { + try + { + Int32 injuries5 = Convert.ToInt32(row35); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "劳动组织不合理重伤数" + "," + "[" + row35 + "]错误!" + "|"; + } + } + string row36 = pds.Rows[i][35].ToString().Trim(); + if (!string.IsNullOrEmpty(row36)) + { + try + { + Int32 minorInjuries5 = Convert.ToInt32(row36); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "劳动组织不合理轻伤数" + "," + "[" + row36 + "]错误!" + "|"; + } + } + string row37 = pds.Rows[i][36].ToString().Trim(); + if (!string.IsNullOrEmpty(row37)) + { + try + { + Int32 death6 = Convert.ToInt32(row37); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "现场指导错误死亡数" + "," + "[" + row37 + "]错误!" + "|"; + } + } + string row38 = pds.Rows[i][37].ToString().Trim(); + if (!string.IsNullOrEmpty(row38)) + { + try + { + Int32 injuries6 = Convert.ToInt32(row38); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "现场指导错误重伤数" + "," + "[" + row38 + "]错误!" + "|"; + } + } + string row39 = pds.Rows[i][38].ToString().Trim(); + if (!string.IsNullOrEmpty(row39)) + { + try + { + Int32 minorInjuries6 = Convert.ToInt32(row39); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "现场指导错误轻伤数" + "," + "[" + row39 + "]错误!" + "|"; + } + } + string row40 = pds.Rows[i][39].ToString().Trim(); + if (!string.IsNullOrEmpty(row40)) + { + try + { + Int32 death7 = Convert.ToInt32(row40); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "设计有缺陷死亡数" + "," + "[" + row40 + "]错误!" + "|"; + } + } + string row41 = pds.Rows[i][40].ToString().Trim(); + if (!string.IsNullOrEmpty(row41)) + { + try + { + Int32 injuries7 = Convert.ToInt32(row41); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "设计有缺陷重伤数" + "," + "[" + row41 + "]错误!" + "|"; + } + } + string row42 = pds.Rows[i][41].ToString().Trim(); + if (!string.IsNullOrEmpty(row42)) + { + try + { + Int32 minorInjuries7 = Convert.ToInt32(row42); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "设计有缺陷轻伤数" + "," + "[" + row42 + "]错误!" + "|"; + } + } + string row43 = pds.Rows[i][42].ToString().Trim(); + if (!string.IsNullOrEmpty(row43)) + { + try + { + Int32 death8 = Convert.ToInt32(row43); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "不懂操作死亡数" + "," + "[" + row43 + "]错误!" + "|"; + } + } + string row44 = pds.Rows[i][43].ToString().Trim(); + if (!string.IsNullOrEmpty(row44)) + { + try + { + Int32 injuries8 = Convert.ToInt32(row44); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "不懂操作重伤数" + "," + "[" + row44 + "]错误!" + "|"; + } + } + string row45 = pds.Rows[i][44].ToString().Trim(); + if (!string.IsNullOrEmpty(row45)) + { + try + { + Int32 minorInjuries8 = Convert.ToInt32(row45); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "不懂操作轻伤数" + "," + "[" + row45 + "]错误!" + "|"; + } + } + string row46 = pds.Rows[i][45].ToString().Trim(); + if (!string.IsNullOrEmpty(row46)) + { + try + { + Int32 death9 = Convert.ToInt32(row46); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "违反操作死亡数" + "," + "[" + row46 + "]错误!" + "|"; + } + } + string row47 = pds.Rows[i][46].ToString().Trim(); + if (!string.IsNullOrEmpty(row47)) + { + try + { + Int32 injuries9 = Convert.ToInt32(row47); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "违反操作重伤数" + "," + "[" + row47 + "]错误!" + "|"; + } + } + string row48 = pds.Rows[i][47].ToString().Trim(); + if (!string.IsNullOrEmpty(row48)) + { + try + { + Int32 minorInjuries9 = Convert.ToInt32(row48); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "违反操作轻伤数" + "," + "[" + row48 + "]错误!" + "|"; + } + } + string row49 = pds.Rows[i][48].ToString().Trim(); + if (!string.IsNullOrEmpty(row49)) + { + try + { + Int32 death10 = Convert.ToInt32(row49); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "没有安全操作死亡数" + "," + "[" + row49 + "]错误!" + "|"; + } + } + string row50 = pds.Rows[i][49].ToString().Trim(); + if (!string.IsNullOrEmpty(row50)) + { + try + { + Int32 injuries10 = Convert.ToInt32(row50); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "没有安全操作重伤数" + "," + "[" + row50 + "]错误!" + "|"; + } + } + string row51 = pds.Rows[i][50].ToString().Trim(); + if (!string.IsNullOrEmpty(row51)) + { + try + { + Int32 minorInjuries10 = Convert.ToInt32(row51); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "没有安全操作轻伤数" + "," + "[" + row51 + "]错误!" + "|"; + } + } + string row52 = pds.Rows[i][51].ToString().Trim(); + if (!string.IsNullOrEmpty(row52)) + { + try + { + Int32 death11 = Convert.ToInt32(row52); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "其他死亡数" + "," + "[" + row52 + "]错误!" + "|"; + } + } + string row53 = pds.Rows[i][52].ToString().Trim(); + if (!string.IsNullOrEmpty(row53)) + { + try + { + Int32 injuries11 = Convert.ToInt32(row53); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "其他重伤数" + "," + "[" + row53 + "]错误!" + "|"; + } + } + string row54 = pds.Rows[i][53].ToString().Trim(); + if (!string.IsNullOrEmpty(row54)) + { + try + { + Int32 minorInjuries11 = Convert.ToInt32(row54); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "其他轻伤数" + "," + "[" + row54 + "]错误!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + ShowNotify(result, MessageBoxIcon.Warning); + Session["errorInfos"] = result; + } + else + { + Session["errorInfos"] = null; + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx.designer.cs new file mode 100644 index 00000000..3755ffe3 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBar.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class AccidentCauseReportBar { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx new file mode 100644 index 00000000..6d16a72a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx @@ -0,0 +1,15 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccidentCauseReportBarIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.AccidentCauseReportBarIn" %> + + + + + + + 导入职工伤亡事故原因分析报表 + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx.cs new file mode 100644 index 00000000..ff5f0f3d --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx.cs @@ -0,0 +1,432 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class AccidentCauseReportBarIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 职工伤亡事故原因分析表集合 + /// + private List reports = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Session["reports"] = null; + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + } + #endregion + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 54); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + int ic, ir; + reports.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var units = from x in Funs.DB.Base_Unit select x; + + for (int i = 0; i < ir; i++) + { + int totalDeath = 0; + int totalInjuries = 0; + int totalMinorInjuries = 0; + Model.View_DataIn_AccidentCauseReport report = new Model.View_DataIn_AccidentCauseReport(); + string row1 = pds.Rows[i][0].ToString().Trim(); + string row2 = pds.Rows[i][1].ToString().Trim(); + string row3 = pds.Rows[i][2].ToString().Trim(); + string row4 = pds.Rows[i][3].ToString().Trim(); + string row5 = pds.Rows[i][4].ToString().Trim(); + string row6 = pds.Rows[i][5].ToString().Trim(); + string row7 = pds.Rows[i][6].ToString().Trim(); + string row8 = pds.Rows[i][7].ToString().Trim(); + string row9 = pds.Rows[i][8].ToString().Trim(); + string row10 = pds.Rows[i][9].ToString().Trim(); + string row11 = pds.Rows[i][10].ToString().Trim(); + string row12 = pds.Rows[i][11].ToString().Trim(); + string row13 = pds.Rows[i][12].ToString().Trim(); + string row14 = pds.Rows[i][13].ToString().Trim(); + string row15 = pds.Rows[i][14].ToString().Trim(); + string row16 = pds.Rows[i][15].ToString().Trim(); + string row17 = pds.Rows[i][16].ToString().Trim(); + string row18 = pds.Rows[i][17].ToString().Trim(); + string row19 = pds.Rows[i][18].ToString().Trim(); + string row20 = pds.Rows[i][19].ToString().Trim(); + string row21 = pds.Rows[i][20].ToString().Trim(); + string row22 = pds.Rows[i][21].ToString().Trim(); + string row23 = pds.Rows[i][22].ToString().Trim(); + string row24 = pds.Rows[i][23].ToString().Trim(); + string row25 = pds.Rows[i][24].ToString().Trim(); + string row26 = pds.Rows[i][25].ToString().Trim(); + string row27 = pds.Rows[i][26].ToString().Trim(); + string row28 = pds.Rows[i][27].ToString().Trim(); + string row29 = pds.Rows[i][28].ToString().Trim(); + string row30 = pds.Rows[i][29].ToString().Trim(); + string row31 = pds.Rows[i][30].ToString().Trim(); + string row32 = pds.Rows[i][31].ToString().Trim(); + string row33 = pds.Rows[i][32].ToString().Trim(); + string row34 = pds.Rows[i][33].ToString().Trim(); + string row35 = pds.Rows[i][34].ToString().Trim(); + string row36 = pds.Rows[i][35].ToString().Trim(); + string row37 = pds.Rows[i][36].ToString().Trim(); + string row38 = pds.Rows[i][37].ToString().Trim(); + string row39 = pds.Rows[i][38].ToString().Trim(); + string row40 = pds.Rows[i][39].ToString().Trim(); + string row41 = pds.Rows[i][40].ToString().Trim(); + string row42 = pds.Rows[i][41].ToString().Trim(); + string row43 = pds.Rows[i][42].ToString().Trim(); + string row44 = pds.Rows[i][43].ToString().Trim(); + string row45 = pds.Rows[i][44].ToString().Trim(); + string row46 = pds.Rows[i][45].ToString().Trim(); + string row47 = pds.Rows[i][46].ToString().Trim(); + string row48 = pds.Rows[i][47].ToString().Trim(); + string row49 = pds.Rows[i][48].ToString().Trim(); + string row50 = pds.Rows[i][49].ToString().Trim(); + string row51 = pds.Rows[i][50].ToString().Trim(); + string row52 = pds.Rows[i][51].ToString().Trim(); + string row53 = pds.Rows[i][52].ToString().Trim(); + string row54 = pds.Rows[i][53].ToString().Trim(); + + if (!string.IsNullOrEmpty(row1))//填报单位 + { + report.UnitId = units.Where(x => x.UnitName == row1.Trim()).FirstOrDefault().UnitId; + } + report.AccidentCauseReportCode = row2;//编号 + if (!string.IsNullOrEmpty(row3))//年份 + { + report.Year = Convert.ToInt32(row3); + } + if (!string.IsNullOrEmpty(row4))//月份 + { + report.Month = Convert.ToInt32(row4); + } + if (!string.IsNullOrEmpty(row5))//死亡事故 + { + report.DeathAccident = Convert.ToInt32(row5); + } + if (!string.IsNullOrEmpty(row6))//死亡人数 + { + report.DeathToll = Convert.ToInt32(row6); + } + if (!string.IsNullOrEmpty(row7))//重伤事故 + { + report.InjuredAccident = Convert.ToInt32(row7); + } + if (!string.IsNullOrEmpty(row8))//重伤人数 + { + report.InjuredToll = Convert.ToInt32(row8); + } + if (!string.IsNullOrEmpty(row9))//轻伤事故 + { + report.MinorWoundAccident = Convert.ToInt32(row9); + } + if (!string.IsNullOrEmpty(row10))//轻伤人数 + { + report.MinorWoundToll = Convert.ToInt32(row10); + } + if (!string.IsNullOrEmpty(row11))//平均工时总数 + { + report.AverageTotalHours = Convert.ToInt32(row11); + } + if (!string.IsNullOrEmpty(row12))//平均工时人数 + { + report.AverageManHours = Convert.ToInt32(row12); + } + if (!string.IsNullOrEmpty(row13))//损失工时总数 + { + report.TotalLossMan = Convert.ToInt32(row13); + } + if (!string.IsNullOrEmpty(row14))//上月损失工时总数 + { + report.LastMonthLossHoursTotal = Convert.ToInt32(row14); + } + if (!string.IsNullOrEmpty(row15))//歇工总日数 + { + report.KnockOffTotal = Convert.ToInt32(row15); + } + if (!string.IsNullOrEmpty(row16))//直接损失 + { + report.DirectLoss = Convert.ToInt32(row16); + } + if (!string.IsNullOrEmpty(row17))//间接损失 + { + report.IndirectLosses = Convert.ToInt32(row17); + } + if (!string.IsNullOrEmpty(row18))//总损失 + { + report.TotalLoss = Convert.ToInt32(row18); + } + if (!string.IsNullOrEmpty(row19))//无损失工时总数 + { + report.TotalLossTime = Convert.ToInt32(row19); + } + report.FillCompanyPersonCharge = row20;//填报单位负责人 + report.AccidentType = row21;//事故类别 + if (!string.IsNullOrEmpty(row22))//防护保险信号缺失死亡数 + { + report.Death1 = Convert.ToInt32(row22); + totalDeath += Convert.ToInt32(row22); + } + if (!string.IsNullOrEmpty(row23))//防护保险信号缺失重伤数 + { + report.Injuries1 = Convert.ToInt32(row23); + totalInjuries += Convert.ToInt32(row23); + } + if (!string.IsNullOrEmpty(row24))//防护保险信号缺失轻伤数 + { + report.MinorInjuries1 = Convert.ToInt32(row24); + totalInjuries += Convert.ToInt32(row24); + } + if (!string.IsNullOrEmpty(row25))//设备工具缺陷死亡数 + { + report.Death2 = Convert.ToInt32(row25); + totalDeath += Convert.ToInt32(row25); + } + if (!string.IsNullOrEmpty(row26))//设备工具缺陷重伤数 + { + report.Injuries2 = Convert.ToInt32(row26); + totalInjuries += Convert.ToInt32(row26); + } + if (!string.IsNullOrEmpty(row27))//设备工具缺陷轻伤数 + { + report.MinorInjuries2 = Convert.ToInt32(row27); + totalMinorInjuries += Convert.ToInt32(row27); + } + if (!string.IsNullOrEmpty(row28))//个人防护缺陷死亡数 + { + report.Death3 = Convert.ToInt32(row28); + totalDeath += Convert.ToInt32(row28); + } + if (!string.IsNullOrEmpty(row29))//个人防护缺陷重伤数 + { + report.Injuries3 = Convert.ToInt32(row29); + totalInjuries += Convert.ToInt32(row29); + } + if (!string.IsNullOrEmpty(row30))//个人防护缺陷轻伤数 + { + report.MinorInjuries3 = Convert.ToInt32(row30); + totalMinorInjuries += Convert.ToInt32(row30); + } + if (!string.IsNullOrEmpty(row31))//光线不足死亡数 + { + report.Death4 = Convert.ToInt32(row31); + totalDeath += Convert.ToInt32(row31); + } + if (!string.IsNullOrEmpty(row32))//光线不足重伤数 + { + report.Injuries4 = Convert.ToInt32(row32); + totalInjuries += Convert.ToInt32(row32); + } + if (!string.IsNullOrEmpty(row33))//光线不足轻伤数 + { + report.MinorInjuries4 = Convert.ToInt32(row33); + totalMinorInjuries += Convert.ToInt32(row33); + } + if (!string.IsNullOrEmpty(row34))//劳动组织不合理死亡数 + { + report.Death5 = Convert.ToInt32(row34); + totalDeath += Convert.ToInt32(row34); + } + if (!string.IsNullOrEmpty(row35))//劳动组织不合理重伤数 + { + report.Injuries5 = Convert.ToInt32(row35); + totalInjuries += Convert.ToInt32(row35); + } + if (!string.IsNullOrEmpty(row36))//劳动组织不合理轻伤数 + { + report.MinorInjuries5 = Convert.ToInt32(row36); + totalMinorInjuries += Convert.ToInt32(row36); + } + if (!string.IsNullOrEmpty(row37))//现场指导错误死亡数 + { + report.Death6 = Convert.ToInt32(row37); + totalDeath += Convert.ToInt32(row37); + } + if (!string.IsNullOrEmpty(row38))//现场指导错误重伤数 + { + report.Injuries6 = Convert.ToInt32(row38); + totalInjuries += Convert.ToInt32(row38); + } + if (!string.IsNullOrEmpty(row39))//现场指导错误轻伤数 + { + report.MinorInjuries6 = Convert.ToInt32(row39); + totalMinorInjuries += Convert.ToInt32(row39); + } + if (!string.IsNullOrEmpty(row40))//设计有缺陷死亡数 + { + report.Death7 = Convert.ToInt32(row40); + totalDeath += Convert.ToInt32(row40); + } + if (!string.IsNullOrEmpty(row41))//设计有缺陷重伤数 + { + report.Injuries7 = Convert.ToInt32(row41); + totalInjuries += Convert.ToInt32(row41); + } + if (!string.IsNullOrEmpty(row42))//设计有缺陷轻伤数 + { + report.MinorInjuries7 = Convert.ToInt32(row42); + totalMinorInjuries += Convert.ToInt32(row42); + } + if (!string.IsNullOrEmpty(row43))//不懂操作死亡数 + { + report.Death8 = Convert.ToInt32(row43); + totalDeath += Convert.ToInt32(row43); + } + if (!string.IsNullOrEmpty(row44))//不懂操作重伤数 + { + report.Injuries8 = Convert.ToInt32(row44); + totalInjuries += Convert.ToInt32(row44); + } + if (!string.IsNullOrEmpty(row45))//不懂操作轻伤数 + { + report.MinorInjuries8 = Convert.ToInt32(row45); + totalMinorInjuries += Convert.ToInt32(row45); + } + if (!string.IsNullOrEmpty(row46))//违反操作死亡数 + { + report.Death9 = Convert.ToInt32(row46); + totalDeath += Convert.ToInt32(row46); + } + if (!string.IsNullOrEmpty(row47))//违反操作重伤数 + { + report.Injuries9 = Convert.ToInt32(row47); + totalInjuries += Convert.ToInt32(row47); + } + if (!string.IsNullOrEmpty(row48))//违反操作轻伤数 + { + report.MinorInjuries9 = Convert.ToInt32(row48); + totalMinorInjuries += Convert.ToInt32(row48); + } + if (!string.IsNullOrEmpty(row49))//没有安全操作死亡数 + { + report.Death10 = Convert.ToInt32(row49); + totalDeath += Convert.ToInt32(row49); + } + if (!string.IsNullOrEmpty(row50))//没有安全操作重伤数 + { + report.Injuries10 = Convert.ToInt32(row50); + totalInjuries += Convert.ToInt32(row50); + } + if (!string.IsNullOrEmpty(row51))//没有安全操作轻伤数 + { + report.MinorInjuries10 = Convert.ToInt32(row51); + totalMinorInjuries += Convert.ToInt32(row51); + } + if (!string.IsNullOrEmpty(row52))//其他死亡数 + { + report.Death11 = Convert.ToInt32(row52); + totalDeath += Convert.ToInt32(row52); + } + if (!string.IsNullOrEmpty(row53))//其他重伤数 + { + report.Injuries11 = Convert.ToInt32(row53); + totalInjuries += Convert.ToInt32(row53); + } + if (!string.IsNullOrEmpty(row54))//其他轻伤数 + { + report.MinorInjuries11 = Convert.ToInt32(row54); + totalMinorInjuries += Convert.ToInt32(row54); + } + report.TotalDeath = totalDeath; + report.TotalInjuries = totalInjuries; + report.TotalMinorInjuries = totalMinorInjuries; + + if (reports.Where(e => e.AccidentCauseReportItemId == report.AccidentCauseReportItemId).FirstOrDefault() == null) + { + report.AccidentCauseReportItemId = SQLHelper.GetNewID(typeof(Model.View_DataIn_AccidentCauseReport)); + reports.Add(report); + } + } + Session["reports"] = reports; + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx.designer.cs new file mode 100644 index 00000000..06bfcdda --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportBarIn.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class AccidentCauseReportBarIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx new file mode 100644 index 00000000..35741241 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx @@ -0,0 +1,326 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccidentCauseReportImport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.AccidentCauseReportImport" %> + + + + + + + 导入职工伤亡事故原因分析报表 + + + +
+ + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + --%> + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.cs new file mode 100644 index 00000000..cabfc630 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.cs @@ -0,0 +1,428 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.IO; +using BLL; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class AccidentCauseReportImport : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 职工伤亡事故原因分析表明细 + /// + private static List reports = new List(); + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (reports != null) + { + reports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (reports != null) + { + reports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("AccidentCauseReportBar.aspx?FileName={0}", this.hdFileName.Text, "审核 - "))); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("AccidentCauseReportBarIn.aspx?FileName={0}", this.hdFileName.Text, "导入 - "))); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + List report = new List(); + if (Session["reports"] != null) + { + report = Session["reports"] as List; + } + + int a = report.Count(); + for (int i = 0; i < a; i++) + { + string accidentCauseReportId = string.Empty; + //判断职工伤亡事故原因分析是否存在 + var isExist = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(report[i].UnitId, Convert.ToInt32(report[i].Year), Convert.ToInt32(report[i].Month)); + if (isExist != null) + { + accidentCauseReportId = isExist.AccidentCauseReportId; + } + else + { + accidentCauseReportId = SQLHelper.GetNewID(typeof(Model.Information_AccidentCauseReport)); + Model.Information_AccidentCauseReport newReport = new Model.Information_AccidentCauseReport + { + AccidentCauseReportId = accidentCauseReportId, + UnitId = report[i].UnitId, + AccidentCauseReportCode = report[i].AccidentCauseReportCode, + Year = report[i].Year, + Month = report[i].Month, + DeathAccident = report[i].DeathAccident, + DeathToll = report[i].DeathToll, + InjuredAccident = report[i].InjuredAccident, + InjuredToll = report[i].InjuredToll, + MinorWoundAccident = report[i].MinorWoundAccident, + MinorWoundToll = report[i].MinorWoundToll, + AverageTotalHours = report[i].AverageTotalHours, + AverageManHours = report[i].AverageManHours, + TotalLossMan = report[i].TotalLossMan, + LastMonthLossHoursTotal = report[i].LastMonthLossHoursTotal, + KnockOffTotal = report[i].KnockOffTotal, + DirectLoss = report[i].DirectLoss, + IndirectLosses = report[i].IndirectLosses, + TotalLoss = report[i].TotalLoss, + TotalLossTime = report[i].TotalLossTime, + FillCompanyPersonCharge = report[i].FillCompanyPersonCharge, + TabPeople = this.CurrUser.PersonName, + AuditPerson = this.CurrUser.PersonName, + FillingDate = DateTime.Now, + UpState = BLL.Const.UpState_2, + HandleState = BLL.Const.HandleState_1, + HandleMan = this.CurrUser.PersonId + }; + BLL.AccidentCauseReportService.AddAccidentCauseReport(newReport); + } + Model.Information_AccidentCauseReportItem newReportItem = new Model.Information_AccidentCauseReportItem + { + AccidentCauseReportItemId = report[i].AccidentCauseReportItemId, + AccidentCauseReportId = accidentCauseReportId, + AccidentType = report[i].AccidentType, + Death1 = report[i].Death1, + Injuries1 = report[i].Injuries1, + MinorInjuries1 = report[i].MinorInjuries1, + Death2 = report[i].Death2, + Injuries2 = report[i].Injuries2, + MinorInjuries2 = report[i].MinorInjuries2, + Death3 = report[i].Death3, + Injuries3 = report[i].Injuries3, + MinorInjuries3 = report[i].MinorInjuries3, + Death4 = report[i].Death4, + Injuries4 = report[i].Injuries4, + MinorInjuries4 = report[i].MinorInjuries4, + Death5 = report[i].Death5, + Injuries5 = report[i].Injuries5, + MinorInjuries5 = report[i].MinorInjuries5, + Death6 = report[i].Death6, + Injuries6 = report[i].Injuries6, + MinorInjuries6 = report[i].MinorInjuries6, + Death7 = report[i].Death7, + Injuries7 = report[i].Injuries7, + MinorInjuries7 = report[i].MinorInjuries7, + Death8 = report[i].Death8, + Injuries8 = report[i].Injuries8, + MinorInjuries8 = report[i].MinorInjuries8, + Death9 = report[i].Death9, + Injuries9 = report[i].Injuries9, + MinorInjuries9 = report[i].MinorInjuries9, + Death10 = report[i].Death10, + Injuries10 = report[i].Injuries10, + MinorInjuries10 = report[i].MinorInjuries10, + Death11 = report[i].Death11, + Injuries11 = report[i].Injuries11, + MinorInjuries11 = report[i].MinorInjuries11, + TotalDeath = report[i].TotalDeath, + TotalInjuries = report[i].TotalInjuries, + TotalMinorInjuries = report[i].TotalMinorInjuries + }; + BLL.AccidentCauseReportItemService.AddAccidentCauseReportItem(newReportItem); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭审核弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + //errorInfos.Clear(); + //if (Session["errorInfos"] != null) + //{ + // this.hdCheckResult.Text = Session["errorInfos"].ToString(); + //} + //else + //{ + // this.hdCheckResult.Text = string.Empty; + // this.Grid1.Hidden = false; + // this.gvErrorInfo.Hidden = true; + //} + //if (!string.IsNullOrEmpty(this.hdCheckResult.Text.Trim())) + //{ + // string result = this.hdCheckResult.Text.Trim(); + // List errorInfoList = result.Split('|').ToList(); + // foreach (var item in errorInfoList) + // { + // string[] errors = item.Split(','); + // Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + // errorInfo.Row = errors[0]; + // errorInfo.Column = errors[1]; + // errorInfo.Reason = errors[2]; + // errorInfos.Add(errorInfo); + // } + // if (errorInfos.Count > 0) + // { + // this.Grid1.Hidden = true; + // this.gvErrorInfo.Hidden = false; + // //this.btnOut.Hidden = false; + // this.gvErrorInfo.DataSource = errorInfos; + // this.gvErrorInfo.DataBind(); + // } + //} + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + if (Session["reports"] != null) + { + reports = Session["reports"] as List; + } + if (reports.Count > 0) + { + this.Grid1.Hidden = false; + //this.gvErrorInfo.Hidden = true; + //this.btnOut.Hidden = true; + this.Grid1.DataSource = reports; + this.Grid1.DataBind(); + } + } + + ///// + ///// 关闭保存弹出窗口 + ///// + ///// + ///// + //protected void Window3_Close(object sender, WindowCloseEventArgs e) + //{ + // if (Session["reports"] != null) + // { + // reports = Session["reports"] as List; + // } + // if (reports.Count > 0) + // { + // this.Grid1.Visible = true; + // this.Form2.Visible = false; + // this.Grid1.DataSource = reports; + // this.Grid1.DataBind(); + // } + //} + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.AccidentCauseReportTemplateUrl; + string filePath = Const.AccidentCauseReportTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + + #region 转换字符串 + /// + /// 转换单位 + /// + /// + /// + protected string ConvertUnit(object u) + { + string unitName = string.Empty; + if (u != null) + { + var unit = BLL.UnitService.GetUnitByUnitId(u.ToString()); + if (unit != null) + { + unitName = unit.UnitName; + } + } + return unitName; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.designer.cs new file mode 100644 index 00000000..d9166a2b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/AccidentCauseReportImport.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class AccidentCauseReportImport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// lblBottom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblBottom; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx new file mode 100644 index 00000000..e979000d --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillConductedQuarterlyReportBar.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.DrillConductedQuarterlyReportBar" %> + + + + + + + 审核应急演练开展情况季报 + + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.cs new file mode 100644 index 00000000..63d0f16e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.cs @@ -0,0 +1,362 @@ +using BLL; +using System; +using System.Data; +using System.Data.OleDb; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class DrillConductedQuarterlyReportBar :PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + #endregion + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 19); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 1; i < ir; i++) + { + string row1 = pds.Rows[i][0].ToString(); + string unitId = string.Empty; + if (!string.IsNullOrEmpty(row1)) + { + var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitName == row1.Trim()); + if (unit == null) + { + result += "第" + (i + 2).ToString() + "行," + "单位名称" + "," + "[" + row1 + "]不存在!" + "|"; + } + else + { + unitId = unit.UnitId; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "单位名称" + "," + "此项为必填项!" + "|"; + } + + string row2 = pds.Rows[i][1].ToString(); + if (!string.IsNullOrEmpty(row2)) + { + try + { + Int32 year = Convert.ToInt32(row2.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "年份" + "," + "[" + row2 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "年份" + "," + "此项为必填项!" + "|"; + } + + string row3 = pds.Rows[i][2].ToString(); + if (!string.IsNullOrEmpty(row3)) + { + try + { + Int32 month = Convert.ToInt32(row3.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "季度" + "," + "[" + row3 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "季度" + "," + "此项为必填项!" + "|"; + } + + ////判断是否 已存在该季度数据 + var drillConductedQuarterlyReport = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportByUnitIdAndYearAndQuarters(unitId, Funs.GetNewIntOrZero(row2.Trim()), Funs.GetNewIntOrZero(row3.Trim())); + if (drillConductedQuarterlyReport != null) + { + result += "第" + (i + 2).ToString() + "行," + "已存在该季度季报!" + "|"; + } + + string row5 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(row5)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row5); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "总体情况举办次数" + "," + "[" + row5 + "]错误!" + "|"; + } + } + string row6 = pds.Rows[i][5].ToString().Trim(); + if (!string.IsNullOrEmpty(row6)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row6); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "总体情况参演人数" + "," + "[" + row6 + "]错误!" + "|"; + } + } + string row7 = pds.Rows[i][6].ToString().Trim(); + if (!string.IsNullOrEmpty(row7)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row7); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "总体情况直接投入" + "," + "[" + row7 + "]错误!" + "|"; + } + } + string row8 = pds.Rows[i][7].ToString().Trim(); + if (!string.IsNullOrEmpty(row8)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row8); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "企业总部举办次数" + "," + "[" + row8 + "]错误!" + "|"; + } + } + string row9 = pds.Rows[i][8].ToString().Trim(); + if (!string.IsNullOrEmpty(row9)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row9); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "企业总部参演人数" + "," + "[" + row9 + "]错误!" + "|"; + } + } + string row10 = pds.Rows[i][9].ToString().Trim(); + if (!string.IsNullOrEmpty(row10)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row10); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "企业总部直接投入" + "," + "[" + row10 + "]错误!" + "|"; + } + } + string row11 = pds.Rows[i][10].ToString().Trim(); + if (!string.IsNullOrEmpty(row11)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row11); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "基层单位举办次数" + "," + "[" + row11 + "]错误!" + "|"; + } + } + string row12 = pds.Rows[i][11].ToString().Trim(); + if (!string.IsNullOrEmpty(row12)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row12); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "基层单位参演人数" + "," + "[" + row12 + "]错误!" + "|"; + } + } + string row13 = pds.Rows[i][12].ToString().Trim(); + if (!string.IsNullOrEmpty(row13)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row13); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "基层单位直接投入" + "," + "[" + row13 + "]错误!" + "|"; + } + } + string row14 = pds.Rows[i][13].ToString().Trim(); + if (!string.IsNullOrEmpty(row14)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row14); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "综合演练" + "," + "[" + row14 + "]错误!" + "|"; + } + } + string row15 = pds.Rows[i][14].ToString().Trim(); + if (!string.IsNullOrEmpty(row15)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row15); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "综合演练其中现场" + "," + "[" + row15 + "]错误!" + "|"; + } + } + string row16 = pds.Rows[i][15].ToString().Trim(); + if (!string.IsNullOrEmpty(row16)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row16); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "综合演练其中桌面" + "," + "[" + row16 + "]错误!" + "|"; + } + } + + string row17 = pds.Rows[i][16].ToString().Trim(); + if (!string.IsNullOrEmpty(row17)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row17); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "专项演练" + "," + "[" + row17 + "]错误!" + "|"; + } + } + string row18 = pds.Rows[i][17].ToString().Trim(); + if (!string.IsNullOrEmpty(row18)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row18); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "专项演练其中现场" + "," + "[" + row18 + "]错误!" + "|"; + } + } + string row19 = pds.Rows[i][18].ToString().Trim(); + if (!string.IsNullOrEmpty(row19)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row19); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "专项演练其中桌面" + "," + "[" + row19 + "]错误!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + ShowNotify(result, MessageBoxIcon.Warning); + //Session["errorInfos"] = result; + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.designer.cs new file mode 100644 index 00000000..56dd1dcd --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBar.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class DrillConductedQuarterlyReportBar { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx new file mode 100644 index 00000000..da30986a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx @@ -0,0 +1,15 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillConductedQuarterlyReportBarIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.DrillConductedQuarterlyReportBarIn" %> + + + + + + + 导入应急演练开展情况季报 + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.cs new file mode 100644 index 00000000..631e421c --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.cs @@ -0,0 +1,219 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using BLL; +using System.IO; +using System.Data.OleDb; +using System.Data; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class DrillConductedQuarterlyReportBarIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 应急演练开展情况季报集合 + /// + private List reports = new List(); + #endregion + + #region 加载 + protected void Page_Load(object sender, EventArgs e) + { + Session["reports"] = null; + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + #endregion + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 19); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + int ic, ir; + reports.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var units = from x in Funs.DB.Base_Unit select x; + + for (int i = 1; i < ir; i++) + { + Model.View_Information_DrillConductedQuarterlyReportItem report = new Model.View_Information_DrillConductedQuarterlyReportItem(); + string row1 = pds.Rows[i][0].ToString().Trim(); + string row2 = pds.Rows[i][1].ToString().Trim(); + string row3 = pds.Rows[i][2].ToString().Trim(); + string row4 = pds.Rows[i][3].ToString().Trim(); + string row5 = pds.Rows[i][4].ToString().Trim(); + string row6 = pds.Rows[i][5].ToString().Trim(); + string row7 = pds.Rows[i][6].ToString().Trim(); + string row8 = pds.Rows[i][7].ToString().Trim(); + string row9 = pds.Rows[i][8].ToString().Trim(); + string row10 = pds.Rows[i][9].ToString().Trim(); + string row11 = pds.Rows[i][10].ToString().Trim(); + string row12 = pds.Rows[i][11].ToString().Trim(); + string row13 = pds.Rows[i][12].ToString().Trim(); + string row14 = pds.Rows[i][13].ToString().Trim(); + string row15 = pds.Rows[i][14].ToString().Trim(); + string row16 = pds.Rows[i][15].ToString().Trim(); + string row17 = pds.Rows[i][16].ToString().Trim(); + string row18 = pds.Rows[i][17].ToString().Trim(); + string row19 = pds.Rows[i][18].ToString().Trim(); + if (!string.IsNullOrEmpty(row1)) + { + report.UnitId = units.Where(x => x.UnitName == row1.Trim()).FirstOrDefault().UnitId; + } + if (!string.IsNullOrEmpty(row2)) + { + report.YearId = Convert.ToInt32(row2); + } + if (!string.IsNullOrEmpty(row3)) + { + report.Quarter = Convert.ToInt32(row3); + } + report.IndustryType = row4; + if (!string.IsNullOrEmpty(row5)) + { + report.TotalConductCount = Convert.ToInt32(row5); + } + if (!string.IsNullOrEmpty(row6)) + { + report.TotalPeopleCount = Convert.ToInt32(row6); + } + if (!string.IsNullOrEmpty(row7)) + { + report.TotalInvestment = Convert.ToDecimal(row7); + } + if (!string.IsNullOrEmpty(row8)) + { + report.HQConductCount = Convert.ToInt32(row8); + } + if (!string.IsNullOrEmpty(row9)) + { + report.HQPeopleCount = Convert.ToInt32(row9); + } + if (!string.IsNullOrEmpty(row10)) + { + report.HQInvestment = Convert.ToDecimal(row10); + } + if (!string.IsNullOrEmpty(row11)) + { + report.BasicConductCount = Convert.ToInt32(row11); + } + if (!string.IsNullOrEmpty(row12)) + { + report.BasicPeopleCount = Convert.ToInt32(row12); + } + if (!string.IsNullOrEmpty(row13)) + { + report.BasicInvestment = Convert.ToDecimal(row13); + } + if (!string.IsNullOrEmpty(row14)) + { + report.ComprehensivePractice = Convert.ToInt32(row14); + } + if (!string.IsNullOrEmpty(row15)) + { + report.CPScene = Convert.ToInt32(row15); + } + if (!string.IsNullOrEmpty(row16)) + { + report.CPDesktop = Convert.ToInt32(row16); + } + if (!string.IsNullOrEmpty(row17)) + { + report.SpecialDrill = Convert.ToInt32(row17); + } + if (!string.IsNullOrEmpty(row18)) + { + report.SDScene = Convert.ToInt32(row18); + } + if (!string.IsNullOrEmpty(row19)) + { + report.SDDesktop = Convert.ToInt32(row19); + } + + if (reports.Where(e => e.DrillConductedQuarterlyReportItemId == report.DrillConductedQuarterlyReportItemId).FirstOrDefault() == null) + { + report.DrillConductedQuarterlyReportItemId = SQLHelper.GetNewID(typeof(Model.View_Information_DrillConductedQuarterlyReportItem)); + reports.Add(report); + } + } + Session["reports"] = reports; + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.designer.cs new file mode 100644 index 00000000..489f4b85 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportBarIn.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class DrillConductedQuarterlyReportBarIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx new file mode 100644 index 00000000..ad362d5a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx @@ -0,0 +1,178 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillConductedQuarterlyReportImport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.DrillConductedQuarterlyReportImport" %> + + + + + + + 导入应急演练开展情况季报 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --%> + + + <%-- --%> + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.cs new file mode 100644 index 00000000..b2945ed1 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.cs @@ -0,0 +1,381 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using BLL; +using System.IO; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class DrillConductedQuarterlyReportImport : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 应急演练开展情况季报集合 + /// + private static List reports = new List(); + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (reports != null) + { + reports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (reports != null) + { + reports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrillConductedQuarterlyReportBar.aspx?FileName={0}", this.hdFileName.Text, "审核 - "))); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DrillConductedQuarterlyReportBarIn.aspx?FileName={0}", this.hdFileName.Text, "导入 - "))); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + List report = new List(); + if (Session["reports"] != null) + { + report = Session["reports"] as List; + } + + int a = report.Count(); + for (int i = 0; i < a; i++) + { + string drillConductedQuarterlyReportId = string.Empty; + //判断应急演练开展情况季报是否存在 + var isExist = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportByUnitIdAndYearAndQuarters(report[i].UnitId, Convert.ToInt32(report[i].YearId), Convert.ToInt32(report[i].Quarter)); + if (isExist != null) + { + drillConductedQuarterlyReportId = isExist.DrillConductedQuarterlyReportId; + } + else + { + drillConductedQuarterlyReportId = SQLHelper.GetNewID(typeof(Model.Information_DrillConductedQuarterlyReport)); + Model.Information_DrillConductedQuarterlyReport newReport = new Model.Information_DrillConductedQuarterlyReport + { + DrillConductedQuarterlyReportId = drillConductedQuarterlyReportId, + UnitId = report[i].UnitId, + YearId = report[i].YearId, + Quarter = report[i].Quarter, + CompileMan = this.CurrUser.PersonName, + ReportDate = DateTime.Now + }; + newReport.CompileMan = this.CurrUser.PersonName; + newReport.UpState = BLL.Const.UpState_2; + newReport.HandleMan = this.CurrUser.PersonId; + newReport.HandleState = BLL.Const.HandleState_1; + + BLL.DrillConductedQuarterlyReportService.AddDrillConductedQuarterlyReport(newReport); + } + Model.Information_DrillConductedQuarterlyReportItem newReportItem = new Model.Information_DrillConductedQuarterlyReportItem + { + DrillConductedQuarterlyReportItemId = report[i].DrillConductedQuarterlyReportItemId, + DrillConductedQuarterlyReportId = drillConductedQuarterlyReportId, + IndustryType = report[i].IndustryType, + TotalConductCount = report[i].TotalConductCount, + TotalPeopleCount = report[i].TotalPeopleCount, + TotalInvestment = report[i].TotalInvestment, + HQConductCount = report[i].HQConductCount, + HQPeopleCount = report[i].HQPeopleCount, + HQInvestment = report[i].HQInvestment, + BasicConductCount = report[i].BasicConductCount, + BasicPeopleCount = report[i].BasicPeopleCount, + BasicInvestment = report[i].BasicInvestment, + ComprehensivePractice = report[i].ComprehensivePractice, + CPScene = report[i].CPScene, + CPDesktop = report[i].CPDesktop, + SpecialDrill = report[i].SpecialDrill, + SDScene = report[i].SDScene, + SDDesktop = report[i].SDDesktop, + SortIndex = i + }; + + BLL.DrillConductedQuarterlyReportItemService.AddDrillConductedQuarterlyReportItem(newReportItem); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭审核弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + //errorInfos.Clear(); + //if (!string.IsNullOrEmpty(this.hdCheckResult.Text.Trim())) + //{ + // string result = this.hdCheckResult.Text.Trim(); + // List errorInfoList = result.Split('|').ToList(); + // foreach (var item in errorInfoList) + // { + // string[] errors = item.Split(','); + // Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + // errorInfo.Row = Convert.ToInt32(errors[0]); + // errorInfo.Column = errors[1]; + // errorInfo.Reason = errors[2]; + // errorInfos.Add(errorInfo); + // } + // if (errorInfos.Count > 0) + // { + // this.Grid1.Visible = false; + // this.Form2.Visible = true; + // this.gvErrorInfo.DataSource = errorInfos; + // this.gvErrorInfo.DataBind(); + // } + //} + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + if (Session["reports"] != null) + { + reports = Session["reports"] as List; + } + if (reports.Count > 0) + { + this.Grid1.Visible = true; + //this.Form2.Visible = false; + this.Grid1.DataSource = reports; + this.Grid1.DataBind(); + } + } + + ///// + ///// 关闭保存导入数据窗口 + ///// + ///// + ///// + //protected void Window3_Close(object sender, WindowCloseEventArgs e) + //{ + // if (Session["reports"] != null) + // { + // reports = Session["reports"] as List; + // } + // if (reports.Count > 0) + // { + // this.Grid1.Visible = true; + // this.Form2.Visible = false; + // this.Grid1.DataSource = reports; + // this.Grid1.DataBind(); + // } + //} + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.DrillConductedQuarterlyReportTemplateUrl; + string filePath = Const.DrillConductedQuarterlyReportTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + + #region 转换字符串 + /// + /// 转换单位 + /// + /// + /// + protected string ConvertUnit(object u) + { + string unitName = string.Empty; + if (u != null) + { + var unit = BLL.UnitService.GetUnitByUnitId(u.ToString()); + if (unit != null) + { + unitName = unit.UnitName; + } + } + return unitName; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.designer.cs new file mode 100644 index 00000000..d5366346 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillConductedQuarterlyReportImport.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class DrillConductedQuarterlyReportImport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// lblBottom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblBottom; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx new file mode 100644 index 00000000..c092e58a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillPlanHalfYearReportBar.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.DrillPlanHalfYearReportBar" %> + + + + + + + 审核应急演练工作计划半年报表 + + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx.cs new file mode 100644 index 00000000..1e2916ef --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx.cs @@ -0,0 +1,181 @@ +using BLL; +using System; +using System.Data; +using System.Data.OleDb; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class DrillPlanHalfYearReportBar : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + #endregion + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 9); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string row1 = pds.Rows[i][0].ToString(); + string unitId = string.Empty; + if (!string.IsNullOrEmpty(row1)) + { + var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitName == row1.Trim()); + if (unit == null) + { + result += "第" + (i + 2).ToString() + "行," + "单位名称" + "," + "[" + row1 + "]不存在!" + "|"; + } + else + { + unitId = unit.UnitId; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "单位名称" + "," + "此项为必填项!" + "|"; + } + + string row2 = pds.Rows[i][1].ToString(); + if (!string.IsNullOrEmpty(row2)) + { + try + { + Int32 year = Convert.ToInt32(row2.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "年份" + "," + "[" + row2 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "年份" + "," + "此项为必填项!" + "|"; + } + + string row3 = pds.Rows[i][2].ToString(); + if (!string.IsNullOrEmpty(row3)) + { + try + { + Int32 month = Convert.ToInt32(row3.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "半年度" + "," + "[" + row3 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "半年度" + "," + "此项为必填项!" + "|"; + } + + ////判断是否 已存在该半年数据 + var drillPlanHalfYearReport = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportByUnitIdAndYearAndHalfYear(unitId, Funs.GetNewIntOrZero(row2.Trim()), Funs.GetNewIntOrZero(row3.Trim())); + if (drillPlanHalfYearReport != null) + { + result += "第" + (i + 2).ToString() + "行," + "已存在该半年度半年报!" + "|"; + } + } + + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + ShowNotify(result, MessageBoxIcon.Warning); + //Session["errorInfos"] = result; + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx.designer.cs new file mode 100644 index 00000000..ba2caf51 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBar.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class DrillPlanHalfYearReportBar { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx new file mode 100644 index 00000000..fc6c0902 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx @@ -0,0 +1,15 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillPlanHalfYearReportBarIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.DrillPlanHalfYearReportBarIn" %> + + + + + + + 导入应急演练工作计划半年报表 + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx.cs new file mode 100644 index 00000000..d9372f20 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx.cs @@ -0,0 +1,155 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class DrillPlanHalfYearReportBarIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 应急演练工作计划半年报表集合 + /// + private List reports = new List(); + #endregion + + #region 加载 + protected void Page_Load(object sender, EventArgs e) + { + Session["reports"] = null; + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + #endregion + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 9); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + int ic, ir; + reports.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var units = from x in Funs.DB.Base_Unit select x; + for (int i = 0; i < ir; i++) + { + Model.View_Information_DrillPlanHalfYearReportItem report = new Model.View_Information_DrillPlanHalfYearReportItem(); + string row1 = pds.Rows[i][0].ToString().Trim(); + string row2 = pds.Rows[i][1].ToString().Trim(); + string row3 = pds.Rows[i][2].ToString().Trim(); + string row4 = pds.Rows[i][3].ToString().Trim(); + string row5 = pds.Rows[i][4].ToString().Trim(); + string row6 = pds.Rows[i][5].ToString().Trim(); + string row7 = pds.Rows[i][6].ToString().Trim(); + string row8 = pds.Rows[i][7].ToString().Trim(); + string row9 = pds.Rows[i][8].ToString().Trim(); + + if (!string.IsNullOrEmpty(row1)) + { + var unit = units.FirstOrDefault(x => x.UnitName == row1.Trim()); + if (unit != null) + { + report.UnitId = unit.UnitId; + } + } + + if (!string.IsNullOrEmpty(row2)) + { + report.YearId = Convert.ToInt32(row2); + } + if (!string.IsNullOrEmpty(row3)) + { + report.HalfYearId = Convert.ToInt32(row3); + } + report.Telephone = row4; + report.DrillPlanName = row5; + report.OrganizationUnit = row6; + report.DrillPlanDate = row7; + report.AccidentScene = row8; + report.ExerciseWay = row9; + + if (reports.Where(e => e.DrillPlanHalfYearReportItemId == report.DrillPlanHalfYearReportItemId).FirstOrDefault() == null) + { + report.DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.View_Information_DrillPlanHalfYearReportItem)); + reports.Add(report); + } + } + Session["reports"] = reports; + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx.designer.cs new file mode 100644 index 00000000..b8df3b5f --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportBarIn.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class DrillPlanHalfYearReportBarIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx new file mode 100644 index 00000000..e785531e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx @@ -0,0 +1,153 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillPlanHalfYearReportImport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.DrillPlanHalfYearReportImport" %> + + + + + + + 导入应急演练工作计划半年报表 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --%> + + + <%----%> + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.cs new file mode 100644 index 00000000..1c136b85 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.cs @@ -0,0 +1,391 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using BLL; +using System.IO; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class DrillPlanHalfYearReportImport : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 应急演练工作计划半年报表集合 + /// + private static List reports = new List(); + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (reports != null) + { + reports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (reports != null) + { + reports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrillPlanHalfYearReportBar.aspx?FileName={0}", this.hdFileName.Text, "审核 - "))); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("DrillPlanHalfYearReportBarIn.aspx?FileName={0}", this.hdFileName.Text, "导入 - "))); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + List report = new List(); + if (Session["reports"] != null) + { + report = Session["reports"] as List; + } + + int a = report.Count(); + for (int i = 0; i < a; i++) + { + string drillPlanHalfYearReportId = string.Empty; + //判断应急演练工作计划半年报是否存在 + + var isExist = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportByUnitIdDate(report[i].UnitId, Convert.ToInt32(report[i].YearId), Convert.ToInt32(report[i].HalfYearId)); + if (isExist != null) + { + drillPlanHalfYearReportId = isExist.DrillPlanHalfYearReportId; + } + else + { + drillPlanHalfYearReportId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReport)); + Model.Information_DrillPlanHalfYearReport newReport = new Model.Information_DrillPlanHalfYearReport + { + DrillPlanHalfYearReportId = drillPlanHalfYearReportId, + UnitId = report[i].UnitId, + YearId = report[i].YearId, + HalfYearId = report[i].HalfYearId, + Telephone = report[i].Telephone, + CompileDate = DateTime.Now, + CompileMan = this.CurrUser.PersonName, + HandleMan = this.CurrUser.PersonId, + UpState = BLL.Const.UpState_2, + HandleState = BLL.Const.HandleState_1 + }; + BLL.DrillPlanHalfYearReportService.AddDrillPlanHalfYearReport(newReport); + } + Model.Information_DrillPlanHalfYearReportItem newReportItem = new Model.Information_DrillPlanHalfYearReportItem + { + DrillPlanHalfYearReportItemId = report[i].DrillPlanHalfYearReportItemId, + DrillPlanHalfYearReportId = drillPlanHalfYearReportId, + DrillPlanName = report[i].DrillPlanName, + OrganizationUnit = report[i].OrganizationUnit, + DrillPlanDate = report[i].DrillPlanDate, + AccidentScene = report[i].AccidentScene, + ExerciseWay = report[i].ExerciseWay, + SortIndex = i + }; + BLL.DrillPlanHalfYearReportItemService.AddDrillPlanHalfYearReportItem(newReportItem); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭审核弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + //errorInfos.Clear(); + //if (!string.IsNullOrEmpty(this.hdCheckResult.Text.Trim())) + //{ + // string result = this.hdCheckResult.Text.Trim(); + // List errorInfoList = result.Split('|').ToList(); + // foreach (var item in errorInfoList) + // { + // string[] errors = item.Split(','); + // Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + // errorInfo.Row = Convert.ToInt32(errors[0]); + // errorInfo.Column = errors[1]; + // errorInfo.Reason = errors[2]; + // errorInfos.Add(errorInfo); + // } + // if (errorInfos.Count > 0) + // { + // this.Grid1.Visible = false; + // this.Form2.Visible = true; + // this.gvErrorInfo.DataSource = errorInfos; + // this.gvErrorInfo.DataBind(); + // } + //} + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + if (Session["reports"] != null) + { + reports = Session["reports"] as List; + } + if (reports.Count > 0) + { + this.Grid1.Visible = true; + //this.Form2.Visible = false; + this.Grid1.DataSource = reports; + this.Grid1.DataBind(); + } + } + + ///// + ///// 关闭保存导入数据窗口 + ///// + ///// + ///// + //protected void Window3_Close(object sender, WindowCloseEventArgs e) + //{ + // if (Session["reports"] != null) + // { + // reports = Session["reports"] as List; + // } + // if (reports.Count > 0) + // { + // this.Grid1.Visible = true; + // this.Form2.Visible = false; + // this.Grid1.DataSource = reports; + // this.Grid1.DataBind(); + // } + //} + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.DrillPlanHalfYearReportTemplateUrl; + string filePath = Const.DrillPlanHalfYearReportTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + + #region 转换字符串 + /// + /// 转换单位 + /// + /// + /// + protected string ConvertUnit(object u) + { + string unitName = string.Empty; + if (u != null) + { + var unit = BLL.UnitService.GetUnitByUnitId(u.ToString()); + if (unit != null) + { + unitName = unit.UnitName; + } + } + return unitName; + } + + /// + /// 上/下半年 + /// + /// + /// + protected string ConvertHalfYear(object y) + { + string year = string.Empty; + if (y != null) + { + if (y.ToString() == "1") + { + year = "上半年"; + } + else + { + year = "下半年"; + } + } + return year; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.designer.cs new file mode 100644 index 00000000..10f0ffad --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/DrillPlanHalfYearReportImport.aspx.designer.cs @@ -0,0 +1,168 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class DrillPlanHalfYearReportImport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// lblBottom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblBottom; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx new file mode 100644 index 00000000..66fbc12d --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MillionsMonthlyReportBar.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.MillionsMonthlyReportBar" %> + + + + + + + 审核百万工时安全统计月报表 + + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx.cs new file mode 100644 index 00000000..87dc518e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx.cs @@ -0,0 +1,580 @@ +using BLL; +using System; +using System.Data; +using System.Data.OleDb; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class MillionsMonthlyReportBar : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + #endregion + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + if (!string.IsNullOrEmpty(fileName)) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 38); + } + catch (Exception ex) + { + throw ex; + } + } + else + { + ShowNotify("请选择要导入的文件", MessageBoxIcon.Warning); + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var units = from x in Funs.DB.Base_Unit select x; + for (int i = 0; i < ir; i++) + { + string row1 = pds.Rows[i][0].ToString(); + string unitId = string.Empty; + if (!string.IsNullOrEmpty(row1)) + { + var unit = units.FirstOrDefault(x => x.UnitName == row1.Trim()); + if (unit == null) + { + result += "第" + (i + 2).ToString() + "行," + "单位名称" + "," + "[" + row1 + "]不存在!" + "|"; + } + else + { + unitId = unit.UnitId; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "单位名称" + "," + "此项为必填项!" + "|"; + } + + string row2 = pds.Rows[i][1].ToString(); + if (!string.IsNullOrEmpty(row2)) + { + try + { + Int32 year = Convert.ToInt32(row2.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "年份" + "," + "[" + row2 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "年份" + "," + "此项为必填项!" + "|"; + } + + string row3 = pds.Rows[i][2].ToString(); + if (!string.IsNullOrEmpty(row3)) + { + try + { + Int32 month = Convert.ToInt32(row3.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "月份" + "," + "[" + row3 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "月份" + "," + "此项为必填项!" + "|"; + } + + ////判断是否 已存在该月份数据 + var millionsMonthlyReport = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(unitId, Funs.GetNewIntOrZero(row2.Trim()), Funs.GetNewIntOrZero(row3.Trim())); + if (millionsMonthlyReport != null) + { + result += "第" + (i + 2).ToString() + "行," + "已存在该月份月报!" + "|"; + } + + string row4 = pds.Rows[i][3].ToString(); + if (string.IsNullOrEmpty(row4)) + { + result += "第" + (i + 2).ToString() + "行," + "负责人" + "," + "此项为必填项!" + "|"; + } + string row5 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(row5)) + { + try + { + Decimal recordableIncidentRate = Convert.ToDecimal(row5); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "百万工时总可记录事故率" + "," + "[" + row5 + "]错误!" + "|"; + } + } + string row6 = pds.Rows[i][5].ToString().Trim(); + if (!string.IsNullOrEmpty(row6)) + { + try + { + Decimal lostTimeRate = Convert.ToDecimal(row6); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "百万工时损失工时率" + "," + "[" + row6 + "]错误!" + "|"; + } + } + string row7 = pds.Rows[i][6].ToString().Trim(); + if (!string.IsNullOrEmpty(row7)) + { + try + { + Decimal lostTimeInjuryRate = Convert.ToDecimal(row7); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "百万工时损失工时伤害事故率" + "," + "[" + row7 + "]错误!" + "|"; + } + } + string row8 = pds.Rows[i][7].ToString().Trim(); + if (!string.IsNullOrEmpty(row8)) + { + try + { + Decimal deathAccidentFrequency = Convert.ToDecimal(row8); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "百万工时死亡事故频率" + "," + "[" + row8 + "]错误!" + "|"; + } + } + string row9 = pds.Rows[i][8].ToString().Trim(); + if (!string.IsNullOrEmpty(row9)) + { + try + { + Decimal accidentMortality = Convert.ToDecimal(row9); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "百万工时事故死亡率" + "," + "[" + row9 + "]错误!" + "|"; + } + } + //string row10 = pds.Rows[i][9].ToString().Trim(); + //string row11 = pds.Rows[i][10].ToString().Trim(); + string row12 = pds.Rows[i][11].ToString().Trim(); + if (!string.IsNullOrEmpty(row12)) + { + try + { + Int32 postPersonNum = Convert.ToInt32(row12); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "在岗员工数" + "," + "[" + row12 + "]错误!" + "|"; + } + } + string row13 = pds.Rows[i][12].ToString().Trim(); + if (!string.IsNullOrEmpty(row13)) + { + try + { + Int32 snapPersonNum = Convert.ToInt32(row13); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "临时员工数" + "," + "[" + row13 + "]错误!" + "|"; + } + } + string row14 = pds.Rows[i][13].ToString().Trim(); + if (!string.IsNullOrEmpty(row14)) + { + try + { + Int32 contractorNum = Convert.ToInt32(row14); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "承包商数量" + "," + "[" + row14 + "]错误!" + "|"; + } + } + string row15 = pds.Rows[i][14].ToString().Trim(); + if (!string.IsNullOrEmpty(row15)) + { + try + { + Int32 sumPersonNum = Convert.ToInt32(row15); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "员工总数合计" + "," + "[" + row15 + "]错误!" + "|"; + } + } + string row16 = pds.Rows[i][15].ToString().Trim(); + if (!string.IsNullOrEmpty(row16)) + { + try + { + Decimal totalWorkNum = Convert.ToDecimal(row16); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "总工时数(万)" + "," + "[" + row16 + "]错误!" + "|"; + } + } + string row17 = pds.Rows[i][16].ToString().Trim(); + if (!string.IsNullOrEmpty(row17)) + { + try + { + Int32 seriousInjuriesNum = Convert.ToInt32(row17); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重伤事故起数" + "," + "[" + row17 + "]错误!" + "|"; + } + } + string row18 = pds.Rows[i][17].ToString().Trim(); + if (!string.IsNullOrEmpty(row18)) + { + try + { + Int32 seriousInjuriesPersonNum = Convert.ToInt32(row18); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重伤事故人数" + "," + "[" + row18 + "]错误!" + "|"; + } + } + string row19 = pds.Rows[i][18].ToString().Trim(); + if (!string.IsNullOrEmpty(row19)) + { + try + { + Int32 seriousInjuriesLossHour = Convert.ToInt32(row19); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重伤事故损失工时" + "," + "[" + row19 + "]错误!" + "|"; + } + } + string row20 = pds.Rows[i][19].ToString().Trim(); + if (!string.IsNullOrEmpty(row20)) + { + try + { + Int32 minorAccidentNum = Convert.ToInt32(row20); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "轻伤事故起数" + "," + "[" + row20 + "]错误!" + "|"; + } + } + string row21 = pds.Rows[i][20].ToString().Trim(); + if (!string.IsNullOrEmpty(row21)) + { + try + { + Int32 minorAccidentPersonNum = Convert.ToInt32(row21); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "轻伤事故人数" + "," + "[" + row21 + "]错误!" + "|"; + } + } + string row22 = pds.Rows[i][21].ToString().Trim(); + if (!string.IsNullOrEmpty(row22)) + { + try + { + Int32 minorAccidentLossHour = Convert.ToInt32(row22); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "轻伤事故损失工时" + "," + "[" + row22 + "]错误!" + "|"; + } + } + string row23 = pds.Rows[i][22].ToString().Trim(); + if (!string.IsNullOrEmpty(row23)) + { + try + { + Int32 otherAccidentNum = Convert.ToInt32(row23); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "其它事故起数" + "," + "[" + row23 + "]错误!" + "|"; + } + } + string row24 = pds.Rows[i][23].ToString().Trim(); + if (!string.IsNullOrEmpty(row24)) + { + try + { + Int32 otherAccidentPersonNum = Convert.ToInt32(row24); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "其它事故人数" + "," + "[" + row24 + "]错误!" + "|"; + } + } + string row25 = pds.Rows[i][24].ToString().Trim(); + if (!string.IsNullOrEmpty(row25)) + { + try + { + Int32 otherAccidentLossHour = Convert.ToInt32(row25); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "其它事故损失工时" + "," + "[" + row25 + "]错误!" + "|"; + } + } + string row26 = pds.Rows[i][25].ToString().Trim(); + if (!string.IsNullOrEmpty(row26)) + { + try + { + Int32 restrictedWorkPersonNum = Convert.ToInt32(row26); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "工作受限人数" + "," + "[" + row26 + "]错误!" + "|"; + } + } + string row27 = pds.Rows[i][26].ToString().Trim(); + if (!string.IsNullOrEmpty(row27)) + { + try + { + Int32 restrictedWorkLossHour = Convert.ToInt32(row27); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "工作受限损失工时" + "," + "[" + row27 + "]错误!" + "|"; + } + } + string row28 = pds.Rows[i][27].ToString().Trim(); + if (!string.IsNullOrEmpty(row28)) + { + try + { + Int32 medicalTreatmentPersonNum = Convert.ToInt32(row28); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "医疗处置人数" + "," + "[" + row28 + "]错误!" + "|"; + } + } + string row29 = pds.Rows[i][28].ToString().Trim(); + if (!string.IsNullOrEmpty(row29)) + { + try + { + Int32 medicalTreatmentLossHour = Convert.ToInt32(row29); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "医疗处置损失工时" + "," + "[" + row29 + "]错误!" + "|"; + } + } + string row30 = pds.Rows[i][29].ToString().Trim(); + if (!string.IsNullOrEmpty(row30)) + { + try + { + Int32 fireNum = Convert.ToInt32(row30); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "火灾起数" + "," + "[" + row30 + "]错误!" + "|"; + } + } + string row31 = pds.Rows[i][30].ToString().Trim(); + if (!string.IsNullOrEmpty(row31)) + { + try + { + Int32 explosionNum = Convert.ToInt32(row31); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "爆炸起数" + "," + "[" + row31 + "]错误!" + "|"; + } + } + string row32 = pds.Rows[i][31].ToString().Trim(); + if (!string.IsNullOrEmpty(row32)) + { + try + { + Int32 trafficNum = Convert.ToInt32(row32); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "交通起数" + "," + "[" + row32 + "]错误!" + "|"; + } + } + string row33 = pds.Rows[i][32].ToString().Trim(); + if (!string.IsNullOrEmpty(row33)) + { + try + { + Int32 equipmentNum = Convert.ToInt32(row33); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "机械设备起数" + "," + "[" + row33 + "]错误!" + "|"; + } + } + string row34 = pds.Rows[i][33].ToString().Trim(); + if (!string.IsNullOrEmpty(row34)) + { + try + { + Int32 qualityNum = Convert.ToInt32(row34); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "质量起数" + "," + "[" + row34 + "]错误!" + "|"; + } + } + string row35 = pds.Rows[i][34].ToString().Trim(); + if (!string.IsNullOrEmpty(row35)) + { + try + { + Int32 otherNum = Convert.ToInt32(row35); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "其它起数" + "," + "[" + row35 + "]错误!" + "|"; + } + } + string row36 = pds.Rows[i][35].ToString().Trim(); + if (!string.IsNullOrEmpty(row36)) + { + try + { + Int32 firstAidDressingsNum = Convert.ToInt32(row36); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "急救包扎起数" + "," + "[" + row36 + "]错误!" + "|"; + } + } + string row37 = pds.Rows[i][36].ToString().Trim(); + if (!string.IsNullOrEmpty(row37)) + { + try + { + Int32 attemptedEventNum = Convert.ToInt32(row37); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "未遂事件起数" + "," + "[" + row37 + "]错误!" + "|"; + } + } + string row38 = pds.Rows[i][37].ToString().Trim(); + if (!string.IsNullOrEmpty(row38)) + { + try + { + Int32 lossDayNum = Convert.ToInt32(row38); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "损失工日" + "," + "[" + row38 + "]错误!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + ShowNotify(result, MessageBoxIcon.Warning); + //Session["errorInfos"] = result; + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx.designer.cs new file mode 100644 index 00000000..82f9690b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBar.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class MillionsMonthlyReportBar { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx new file mode 100644 index 00000000..e17d4b47 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx @@ -0,0 +1,15 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MillionsMonthlyReportBarIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.MillionsMonthlyReportBarIn" %> + + + + + + + 导入百万工时安全统计月报表 + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx.cs new file mode 100644 index 00000000..fcb137a1 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx.cs @@ -0,0 +1,312 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class MillionsMonthlyReportBarIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 百万工时安全统计月报表集合 + /// + private List reports = new List(); + #endregion + + #region 加载 + protected void Page_Load(object sender, EventArgs e) + { + Session["reports"] = null; + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + #endregion + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + if (!string.IsNullOrEmpty(fileName)) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 38); + } + catch (Exception ex) + { + throw ex; + } + } + else + { + ShowNotify("请选择要导入的文件", MessageBoxIcon.Warning); + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + int ic, ir; + reports.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var units = from x in Funs.DB.Base_Unit select x; + + for (int i = 0; i < ir; i++) + { + Model.View_DataIn_MillionsMonthlyReport report = new Model.View_DataIn_MillionsMonthlyReport(); + string row1 = pds.Rows[i][0].ToString().Trim(); + string row2 = pds.Rows[i][1].ToString().Trim(); + string row3 = pds.Rows[i][2].ToString().Trim(); + string row4 = pds.Rows[i][3].ToString().Trim(); + string row5 = pds.Rows[i][4].ToString().Trim(); + string row6 = pds.Rows[i][5].ToString().Trim(); + string row7 = pds.Rows[i][6].ToString().Trim(); + string row8 = pds.Rows[i][7].ToString().Trim(); + string row9 = pds.Rows[i][8].ToString().Trim(); + string row10 = pds.Rows[i][9].ToString().Trim(); + string row11 = pds.Rows[i][10].ToString().Trim(); + string row12 = pds.Rows[i][11].ToString().Trim(); + string row13 = pds.Rows[i][12].ToString().Trim(); + string row14 = pds.Rows[i][13].ToString().Trim(); + string row15 = pds.Rows[i][14].ToString().Trim(); + string row16 = pds.Rows[i][15].ToString().Trim(); + string row17 = pds.Rows[i][16].ToString().Trim(); + string row18 = pds.Rows[i][17].ToString().Trim(); + string row19 = pds.Rows[i][18].ToString().Trim(); + string row20 = pds.Rows[i][19].ToString().Trim(); + string row21 = pds.Rows[i][20].ToString().Trim(); + string row22 = pds.Rows[i][21].ToString().Trim(); + string row23 = pds.Rows[i][22].ToString().Trim(); + string row24 = pds.Rows[i][23].ToString().Trim(); + string row25 = pds.Rows[i][24].ToString().Trim(); + string row26 = pds.Rows[i][25].ToString().Trim(); + string row27 = pds.Rows[i][26].ToString().Trim(); + string row28 = pds.Rows[i][27].ToString().Trim(); + string row29 = pds.Rows[i][28].ToString().Trim(); + string row30 = pds.Rows[i][29].ToString().Trim(); + string row31 = pds.Rows[i][30].ToString().Trim(); + string row32 = pds.Rows[i][31].ToString().Trim(); + string row33 = pds.Rows[i][32].ToString().Trim(); + string row34 = pds.Rows[i][33].ToString().Trim(); + string row35 = pds.Rows[i][34].ToString().Trim(); + string row36 = pds.Rows[i][35].ToString().Trim(); + string row37 = pds.Rows[i][36].ToString().Trim(); + string row38 = pds.Rows[i][37].ToString().Trim(); + + if (!string.IsNullOrEmpty(row1)) + { + report.UnitId = units.Where(x => x.UnitName == row1.Trim()).FirstOrDefault().UnitId; + } + if (!string.IsNullOrEmpty(row2)) + { + report.Year = Convert.ToInt32(row2); + } + if (!string.IsNullOrEmpty(row3)) + { + report.Month = Convert.ToInt32(row3); + } + report.DutyPerson = row4; + if (!string.IsNullOrEmpty(row5)) + { + report.RecordableIncidentRate = Convert.ToDecimal(row5); + } + if (!string.IsNullOrEmpty(row6)) + { + report.LostTimeRate = Convert.ToDecimal(row6); + } + if (!string.IsNullOrEmpty(row7)) + { + report.LostTimeInjuryRate = Convert.ToDecimal(row7); + } + if (!string.IsNullOrEmpty(row8)) + { + report.DeathAccidentFrequency = Convert.ToDecimal(row8); + } + if (!string.IsNullOrEmpty(row9)) + { + report.AccidentMortality = Convert.ToDecimal(row9); + } + report.Affiliation = row10; + report.Name = row11; + if (!string.IsNullOrEmpty(row12)) + { + report.PostPersonNum = Convert.ToInt32(row12); + } + if (!string.IsNullOrEmpty(row13)) + { + report.SnapPersonNum = Convert.ToInt32(row13); + } + if (!string.IsNullOrEmpty(row14)) + { + report.ContractorNum = Convert.ToInt32(row14); + } + if (!string.IsNullOrEmpty(row15)) + { + report.SumPersonNum = Convert.ToInt32(row15); + } + if (!string.IsNullOrEmpty(row16)) + { + report.TotalWorkNum = Convert.ToDecimal(row16); + } + if (!string.IsNullOrEmpty(row17)) + { + report.SeriousInjuriesNum = Convert.ToInt32(row17); + } + if (!string.IsNullOrEmpty(row18)) + { + report.SeriousInjuriesPersonNum = Convert.ToInt32(row18); + } + if (!string.IsNullOrEmpty(row19)) + { + report.SeriousInjuriesLossHour = Convert.ToInt32(row19); + } + if (!string.IsNullOrEmpty(row20)) + { + report.MinorAccidentNum = Convert.ToInt32(row20); + } + if (!string.IsNullOrEmpty(row21)) + { + report.MinorAccidentPersonNum = Convert.ToInt32(row21); + } + if (!string.IsNullOrEmpty(row22)) + { + report.MinorAccidentLossHour = Convert.ToInt32(row22); + } + if (!string.IsNullOrEmpty(row23)) + { + report.OtherAccidentNum = Convert.ToInt32(row23); + } + if (!string.IsNullOrEmpty(row24)) + { + report.OtherAccidentPersonNum = Convert.ToInt32(row24); + } + if (!string.IsNullOrEmpty(row25)) + { + report.OtherAccidentLossHour = Convert.ToInt32(row25); + } + if (!string.IsNullOrEmpty(row26)) + { + report.RestrictedWorkPersonNum = Convert.ToInt32(row26); + } + if (!string.IsNullOrEmpty(row27)) + { + report.RestrictedWorkLossHour = Convert.ToInt32(row27); + } + if (!string.IsNullOrEmpty(row28)) + { + report.MedicalTreatmentPersonNum = Convert.ToInt32(row28); + } + if (!string.IsNullOrEmpty(row29)) + { + report.MedicalTreatmentLossHour = Convert.ToInt32(row29); + } + if (!string.IsNullOrEmpty(row30)) + { + report.FireNum = Convert.ToInt32(row30); + } + if (!string.IsNullOrEmpty(row31)) + { + report.ExplosionNum = Convert.ToInt32(row31); + } + if (!string.IsNullOrEmpty(row32)) + { + report.TrafficNum = Convert.ToInt32(row32); + } + if (!string.IsNullOrEmpty(row33)) + { + report.EquipmentNum = Convert.ToInt32(row33); + } + if (!string.IsNullOrEmpty(row34)) + { + report.QualityNum = Convert.ToInt32(row34); + } + if (!string.IsNullOrEmpty(row35)) + { + report.OtherNum = Convert.ToInt32(row35); + } + if (!string.IsNullOrEmpty(row36)) + { + report.FirstAidDressingsNum = Convert.ToInt32(row36); + } + if (!string.IsNullOrEmpty(row37)) + { + report.AttemptedEventNum = Convert.ToInt32(row37); + } + if (!string.IsNullOrEmpty(row38)) + { + report.LossDayNum = Convert.ToInt32(row38); + } + + if (reports.Where(e => e.MillionsMonthlyReportItemId == report.MillionsMonthlyReportItemId).FirstOrDefault() == null) + { + report.MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.View_DataIn_MillionsMonthlyReport)); + reports.Add(report); + } + } + Session["reports"] = reports; + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx.designer.cs new file mode 100644 index 00000000..d718b02e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportBarIn.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class MillionsMonthlyReportBarIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx new file mode 100644 index 00000000..6988a5b0 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx @@ -0,0 +1,235 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MillionsMonthlyReportImport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.MillionsMonthlyReportImport" %> + + + + + + + 导入百万工时安全统计月报表 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + --%> + + + <%-- --%> + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx.cs new file mode 100644 index 00000000..88525dbc --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx.cs @@ -0,0 +1,490 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class MillionsMonthlyReportImport : PageBase + { + #region 定义变量 + public string MillionsMonthlyReportId + { + get + { + return (string)ViewState["MillionsMonthlyReportId"]; + } + set + { + ViewState["MillionsMonthlyReportId"] = value; + } + } + + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 百万工时安全统计月报表集合 + /// + private static List reports = new List(); + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (reports != null) + { + reports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (reports != null) + { + reports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MillionsMonthlyReportBar.aspx?FileName={0}", this.hdFileName.Text, "审核 - "))); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("MillionsMonthlyReportBarIn.aspx?FileName={0}", this.hdFileName.Text, "导入 - "))); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + int PostPersonNumSum = 0, SnapPersonNumSum = 0, ContractorNumSum = 0, SumPersonNumSum = 0, SeriousInjuriesNumSum = 0, SeriousInjuriesPersonNumSum = 0, SeriousInjuriesLossHourSum = 0, MinorAccidentNumSum = 0, MinorAccidentPersonNumSum = 0, MinorAccidentLossHourSum = 0, OtherAccidentNumSum = 0, OtherAccidentPersonNumSum = 0, OtherAccidentLossHourSum = 0, RestrictedWorkPersonNumSum = 0, RestrictedWorkLossHourSum = 0, MedicalTreatmentPersonNumSum = 0, MedicalTreatmentLossHourSum = 0, FireNumSum = 0, ExplosionNumSum = 0, TrafficNumSum = 0, EquipmentNumSum = 0, QualityNumSum = 0, OtherNumSum = 0, FirstAidDressingsNumSum = 0, AttemptedEventNumSum = 0, LossDayNumSum = 0; + decimal TotalWorkNumSum = 0; + if (errorInfos.Count <= 0) + { + List report = new List(); + if (Session["reports"] != null) + { + report = Session["reports"] as List; + } + + int a = report.Count(); + for (int i = 0; i < a; i++) + { + MillionsMonthlyReportId = string.Empty; + //判断百万工时安全统计月报是否存在 + var isExist = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(report[i].UnitId, Convert.ToInt32(report[i].Year), Convert.ToInt32(report[i].Month)); + if (isExist != null) + { + MillionsMonthlyReportId = isExist.MillionsMonthlyReportId; + } + else + { + MillionsMonthlyReportId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReport)); + Model.Information_MillionsMonthlyReport newReport = new Model.Information_MillionsMonthlyReport + { + MillionsMonthlyReportId = MillionsMonthlyReportId, + UnitId = report[i].UnitId, + Year = report[i].Year, + Month = report[i].Month, + FillingMan = this.CurrUser.PersonName, + FillingDate = DateTime.Now, + DutyPerson = report[i].DutyPerson, + RecordableIncidentRate = report[i].RecordableIncidentRate, + LostTimeRate = report[i].LostTimeRate, + LostTimeInjuryRate = report[i].LostTimeInjuryRate, + DeathAccidentFrequency = report[i].DeathAccidentFrequency, + AccidentMortality = report[i].AccidentMortality, + UpState = BLL.Const.UpState_2, + HandleState = BLL.Const.HandleState_1, + HandleMan = this.CurrUser.PersonId + }; + BLL.MillionsMonthlyReportService.AddMillionsMonthlyReport(newReport); + } + Model.Information_MillionsMonthlyReportItem newReportItem = new Model.Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = report[i].MillionsMonthlyReportItemId, + MillionsMonthlyReportId = MillionsMonthlyReportId, + Affiliation = report[i].Affiliation, + Name = report[i].Name, + PostPersonNum = report[i].PostPersonNum, + SnapPersonNum = report[i].SnapPersonNum, + ContractorNum = report[i].ContractorNum, + SumPersonNum = report[i].SumPersonNum, + TotalWorkNum = report[i].TotalWorkNum, + SeriousInjuriesNum = report[i].SeriousInjuriesNum, + SeriousInjuriesPersonNum = report[i].SeriousInjuriesPersonNum, + SeriousInjuriesLossHour = report[i].SeriousInjuriesLossHour, + MinorAccidentNum = report[i].MinorAccidentNum, + MinorAccidentPersonNum = report[i].MinorAccidentPersonNum, + MinorAccidentLossHour = report[i].MinorAccidentLossHour, + OtherAccidentNum = report[i].OtherAccidentNum, + OtherAccidentPersonNum = report[i].OtherAccidentPersonNum, + OtherAccidentLossHour = report[i].OtherAccidentLossHour, + RestrictedWorkPersonNum = report[i].RestrictedWorkPersonNum, + RestrictedWorkLossHour = report[i].RestrictedWorkLossHour, + MedicalTreatmentPersonNum = report[i].MedicalTreatmentPersonNum, + MedicalTreatmentLossHour = report[i].MedicalTreatmentLossHour, + FireNum = report[i].FireNum, + ExplosionNum = report[i].ExplosionNum, + TrafficNum = report[i].TrafficNum, + EquipmentNum = report[i].EquipmentNum, + QualityNum = report[i].QualityNum, + OtherNum = report[i].OtherNum, + FirstAidDressingsNum = report[i].FirstAidDressingsNum, + AttemptedEventNum = report[i].AttemptedEventNum, + LossDayNum = report[i].LossDayNum + }; + var sortIndexMax = ((from x in Funs.DB.Information_MillionsMonthlyReportItem where x.MillionsMonthlyReportId == MillionsMonthlyReportId select x.SortIndex).Max()); + if (sortIndexMax != null) + { + newReportItem.SortIndex = sortIndexMax + 10; + } + else + { + newReportItem.SortIndex = i + 10; + } + + PostPersonNumSum += Convert.ToInt32(newReportItem.PostPersonNum); + SnapPersonNumSum += Convert.ToInt32(newReportItem.SnapPersonNum); + ContractorNumSum += Convert.ToInt32(newReportItem.ContractorNum); + SumPersonNumSum += Convert.ToInt32(newReportItem.SumPersonNum); + TotalWorkNumSum += Convert.ToDecimal(newReportItem.TotalWorkNum); + SeriousInjuriesNumSum += Convert.ToInt32(newReportItem.SeriousInjuriesNum); + SeriousInjuriesPersonNumSum += Convert.ToInt32(newReportItem.SeriousInjuriesPersonNum); + SeriousInjuriesLossHourSum += Convert.ToInt32(newReportItem.SeriousInjuriesLossHour); + MinorAccidentNumSum += Convert.ToInt32(newReportItem.MinorAccidentNum); + MinorAccidentPersonNumSum += Convert.ToInt32(newReportItem.MinorAccidentPersonNum); + MinorAccidentLossHourSum += Convert.ToInt32(newReportItem.MinorAccidentLossHour); + OtherAccidentNumSum += Convert.ToInt32(newReportItem.OtherAccidentNum); + OtherAccidentPersonNumSum += Convert.ToInt32(newReportItem.OtherAccidentPersonNum); + OtherAccidentLossHourSum += Convert.ToInt32(newReportItem.OtherAccidentLossHour); + RestrictedWorkPersonNumSum += Convert.ToInt32(newReportItem.RestrictedWorkPersonNum); + RestrictedWorkLossHourSum += Convert.ToInt32(newReportItem.RestrictedWorkLossHour); + MedicalTreatmentPersonNumSum += Convert.ToInt32(newReportItem.MedicalTreatmentPersonNum); + MedicalTreatmentLossHourSum += Convert.ToInt32(newReportItem.MedicalTreatmentLossHour); + FireNumSum += Convert.ToInt32(newReportItem.FireNum); + ExplosionNumSum += Convert.ToInt32(newReportItem.ExplosionNum); + TrafficNumSum += Convert.ToInt32(newReportItem.TrafficNum); + EquipmentNumSum += Convert.ToInt32(newReportItem.EquipmentNum); + QualityNumSum += Convert.ToInt32(newReportItem.QualityNum); + OtherNumSum += Convert.ToInt32(newReportItem.OtherNum); + FirstAidDressingsNumSum += Convert.ToInt32(newReportItem.FirstAidDressingsNum); + AttemptedEventNumSum += Convert.ToInt32(newReportItem.AttemptedEventNum); + LossDayNumSum += Convert.ToInt32(newReportItem.LossDayNum); + + BLL.MillionsMonthlyReportItemService.AddMillionsMonthlyReportItem(newReportItem); + } + + + //增加本月合计数 + Model.Information_MillionsMonthlyReportItem totalItem = new Model.Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)), + MillionsMonthlyReportId = MillionsMonthlyReportId + }; + var sort = ((from x in Funs.DB.Information_MillionsMonthlyReportItem where x.MillionsMonthlyReportId == MillionsMonthlyReportId select x.SortIndex).Max()); + if (sort != null) + { + totalItem.SortIndex = sort + 10; + } + totalItem.Affiliation = "本月合计"; + totalItem.Name = "本月合计"; + totalItem.PostPersonNum = PostPersonNumSum; + totalItem.SnapPersonNum = SnapPersonNumSum; + totalItem.ContractorNum = ContractorNumSum; + totalItem.SumPersonNum = SumPersonNumSum; + totalItem.TotalWorkNum = TotalWorkNumSum; + totalItem.SeriousInjuriesNum = SeriousInjuriesNumSum; + totalItem.SeriousInjuriesPersonNum = SeriousInjuriesPersonNumSum; + totalItem.SeriousInjuriesLossHour = SeriousInjuriesLossHourSum; + totalItem.MinorAccidentNum = MinorAccidentNumSum; + totalItem.MinorAccidentPersonNum = MinorAccidentPersonNumSum; + totalItem.MinorAccidentLossHour = MinorAccidentLossHourSum; + totalItem.OtherAccidentNum = OtherAccidentNumSum; + totalItem.OtherAccidentPersonNum = OtherAccidentPersonNumSum; + totalItem.OtherAccidentLossHour = OtherAccidentLossHourSum; + totalItem.RestrictedWorkPersonNum = RestrictedWorkPersonNumSum; + totalItem.RestrictedWorkLossHour = RestrictedWorkLossHourSum; + totalItem.MedicalTreatmentPersonNum = MedicalTreatmentPersonNumSum; + totalItem.MedicalTreatmentLossHour = MedicalTreatmentLossHourSum; + totalItem.FireNum = FireNumSum; + totalItem.ExplosionNum = ExplosionNumSum; + totalItem.TrafficNum = TrafficNumSum; + totalItem.EquipmentNum = EquipmentNumSum; + totalItem.QualityNum = QualityNumSum; + totalItem.OtherNum = OtherNumSum; + totalItem.FirstAidDressingsNum = FirstAidDressingsNumSum; + totalItem.AttemptedEventNum = AttemptedEventNumSum; + totalItem.LossDayNum = LossDayNumSum; + BLL.MillionsMonthlyReportItemService.AddMillionsMonthlyReportItem(totalItem); + + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭审核弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + //errorInfos.Clear(); + //if (!string.IsNullOrEmpty(this.hdCheckResult.Text.Trim())) + //{ + // string result = this.hdCheckResult.Text.Trim(); + // List errorInfoList = result.Split('|').ToList(); + // foreach (var item in errorInfoList) + // { + // string[] errors = item.Split(','); + // Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + // errorInfo.Row = Convert.ToInt32(errors[0]); + // errorInfo.Column = errors[1]; + // errorInfo.Reason = errors[2]; + // errorInfos.Add(errorInfo); + // } + // if (errorInfos.Count > 0) + // { + // this.Grid1.Visible = false; + // this.Form2.Visible = true; + // this.gvErrorInfo.DataSource = errorInfos; + // this.gvErrorInfo.DataBind(); + // } + //} + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + if (Session["reports"] != null) + { + reports = Session["reports"] as List; + } + if (reports.Count > 0) + { + this.Grid1.Visible = true; + //this.Form2.Visible = false; + this.Grid1.DataSource = reports; + this.Grid1.DataBind(); + } + } + + ///// + ///// 关闭保存导入数据窗口 + ///// + ///// + ///// + //protected void Window3_Close(object sender, WindowCloseEventArgs e) + //{ + // if (Session["reports"] != null) + // { + // reports = Session["reports"] as List; + // } + // if (reports.Count > 0) + // { + // this.Grid1.Visible = true; + // this.Form2.Visible = false; + // this.Grid1.DataSource = reports; + // this.Grid1.DataBind(); + // } + //} + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.MillionsMonthlyReportTemplateUrl; + string filePath = Const.MillionsMonthlyReportTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + + #region 转换字符串 + /// + /// 转换单位 + /// + /// + /// + protected string ConvertUnit(object u) + { + string unitName = string.Empty; + if (u != null) + { + var unit = BLL.UnitService.GetUnitByUnitId(u.ToString()); + if (unit != null) + { + unitName = unit.UnitName; + } + } + return unitName; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx.designer.cs new file mode 100644 index 00000000..65d16e81 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/MillionsMonthlyReportImport.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class MillionsMonthlyReportImport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// lblBottom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblBottom; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx new file mode 100644 index 00000000..10eba2f1 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyQuarterlyReportBar.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.SafetyQuarterlyReportBar" %> + + + + + + + 审核安全生产数据季报表 + + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx.cs new file mode 100644 index 00000000..ad7fca38 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx.cs @@ -0,0 +1,634 @@ +using BLL; +using System; +using System.Data; +using System.Data.OleDb; +using System.Linq; + + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class SafetyQuarterlyReportBar : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + #endregion + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 74); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string row1 = pds.Rows[i][0].ToString(); + string unitId = string.Empty; + if (!string.IsNullOrEmpty(row1)) + { + var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitName == row1.Trim()); + if (unit == null) + { + result += "第" + (i + 2).ToString() + "行," + "单位名称" + "," + "[" + row1 + "]不存在!" + "|"; + } + else + { + unitId = unit.UnitId; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "单位名称" + "," + "此项为必填项!" + "|"; + } + + string row2 = pds.Rows[i][1].ToString(); + if (!string.IsNullOrEmpty(row2)) + { + try + { + Int32 yearId = Convert.ToInt32(row2.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "年度" + "," + "[" + row2 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "年度" + "," + "此项为必填项!" + "|"; + } + + string row3 = pds.Rows[i][2].ToString(); + if (!string.IsNullOrEmpty(row3)) + { + try + { + Int32 quarters = Convert.ToInt32(row3.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "季度" + "," + "[" + row3 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "季度" + "," + "此项为必填项!" + "|"; + } + + ////判断是否 已存在该季度数据 + var safetyQuarterlyReport = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportByUnitIdAndYearAndQuarters(unitId, Funs.GetNewIntOrZero(row2.Trim()), Funs.GetNewIntOrZero(row3.Trim())); + if (safetyQuarterlyReport != null) + { + result += "第" + (i + 2).ToString() + "行," + "已存在该季度季报!" + "|"; + } + + string row4 = pds.Rows[i][3].ToString(); + if (!string.IsNullOrEmpty(row4)) + { + try + { + Int32 totalInWorkHours = Convert.ToInt32(row4.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "总投入工时数" + "," + "[" + row4 + "]错误!" + "|"; + } + } + //string row5 = pds.Rows[i][4].ToString(); + string row6 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row6)) + { + try + { + Int32 totalOutWorkHours = Convert.ToInt32(row6.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "总损失工时数" + "," + "[" + row6 + "]错误!" + "|"; + } + } + //string row7 = pds.Rows[i][6].ToString(); + string row8 = pds.Rows[i][7].ToString(); + if (!string.IsNullOrEmpty(row8)) + { + try + { + Decimal workHoursLossRate = Convert.ToDecimal(row8.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "百万工时损失率" + "," + "[" + row8 + "]错误!" + "|"; + } + } + //string row9 = pds.Rows[i][8].ToString().Trim(); + string row10 = pds.Rows[i][9].ToString().Trim(); + if (!string.IsNullOrEmpty(row10)) + { + try + { + Decimal workHoursAccuracy = Convert.ToDecimal(row10.Trim()); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "工时统计准确率" + "," + "[" + row10 + "]错误!" + "|"; + } + } + //string row11 = pds.Rows[i][10].ToString().Trim(); + string row12 = pds.Rows[i][11].ToString().Trim(); + if (!string.IsNullOrEmpty(row12)) + { + try + { + Decimal mainBusinessIncome = Convert.ToDecimal(row12); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "主营业务收入/亿元" + "," + "[" + row12 + "]错误!" + "|"; + } + } + //string row13 = pds.Rows[i][12].ToString().Trim(); + string row14 = pds.Rows[i][13].ToString().Trim(); + if (!string.IsNullOrEmpty(row14)) + { + try + { + Decimal constructionRevenue = Convert.ToDecimal(row14); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "施工收入/亿元" + "," + "[" + row14 + "]错误!" + "|"; + } + } + //string row15 = pds.Rows[i][14].ToString().Trim(); + string row16 = pds.Rows[i][15].ToString().Trim(); + if (!string.IsNullOrEmpty(row16)) + { + try + { + Decimal unitTimeIncome = Convert.ToDecimal(row16); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "单位工时收入/元" + "," + "[" + row16 + "]错误!" + "|"; + } + } + //string row17 = pds.Rows[i][16].ToString().Trim(); + string row18 = pds.Rows[i][17].ToString().Trim(); + if (!string.IsNullOrEmpty(row18)) + { + try + { + Decimal billionsOutputMortality = Convert.ToDecimal(row18); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "百亿产值死亡率" + "," + "[" + row18 + "]错误!" + "|"; + } + } + //string row19 = pds.Rows[i][18].ToString().Trim(); + string row20 = pds.Rows[i][19].ToString().Trim(); + if (!string.IsNullOrEmpty(row20)) + { + try + { + Int32 majorFireAccident = Convert.ToInt32(row20); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重大火灾事故报告数" + "," + "[" + row20 + "]错误!" + "|"; + } + } + //string row21 = pds.Rows[i][20].ToString().Trim(); + string row22 = pds.Rows[i][21].ToString().Trim(); + if (!string.IsNullOrEmpty(row22)) + { + try + { + Int32 majorEquipAccident = Convert.ToInt32(row22); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重大机械设备事故报告数" + "," + "[" + row22 + "]错误!" + "|"; + } + } + //string row23 = pds.Rows[i][22].ToString().Trim(); + string row24 = pds.Rows[i][23].ToString().Trim(); + if (!string.IsNullOrEmpty(row24)) + { + try + { + Decimal accidentFrequency = Convert.ToDecimal(row24); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "事故发生频率(占总收入之比)" + "," + "[" + row24 + "]错误!" + "|"; + } + } + //string row25 = pds.Rows[i][24].ToString().Trim(); + string row26 = pds.Rows[i][25].ToString().Trim(); + if (!string.IsNullOrEmpty(row26)) + { + try + { + Int32 seriousInjuryAccident = Convert.ToInt32(row26); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重伤以上事故报告数" + "," + "[" + row26 + "]错误!" + "|"; + } + } + //string row27 = pds.Rows[i][26].ToString().Trim(); + string row28 = pds.Rows[i][27].ToString().Trim(); + if (!string.IsNullOrEmpty(row28)) + { + try + { + Int32 fireAccident = Convert.ToInt32(row28); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "火灾事故统计报告数" + "," + "[" + row28 + "]错误!" + "|"; + } + } + //string row29 = pds.Rows[i][28].ToString().Trim(); + string row30 = pds.Rows[i][29].ToString().Trim(); + if (!string.IsNullOrEmpty(row30)) + { + try + { + Int32 equipmentAccident = Convert.ToInt32(row30); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "装备事故统计报告数" + "," + "[" + row30 + "]错误!" + "|"; + } + } + //string row31 = pds.Rows[i][30].ToString().Trim(); + string row32 = pds.Rows[i][31].ToString().Trim(); + if (!string.IsNullOrEmpty(row32)) + { + try + { + Int32 poisoningAndInjuries = Convert.ToInt32(row32); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "中毒及职业伤害报告数" + "," + "[" + row32 + "]错误!" + "|"; + } + } + //string row33 = pds.Rows[i][32].ToString().Trim(); + string row34 = pds.Rows[i][33].ToString().Trim(); + if (!string.IsNullOrEmpty(row34)) + { + try + { + Int32 productionSafetyInTotal = Convert.ToInt32(row34); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "安全生产投入总额/元" + "," + "[" + row34 + "]错误!" + "|"; + } + } + //string row35 = pds.Rows[i][34].ToString().Trim(); + string row36 = pds.Rows[i][35].ToString().Trim(); + if (!string.IsNullOrEmpty(row36)) + { + try + { + Decimal protectionInput = Convert.ToDecimal(row36); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "安全防护投入/元" + "," + "[" + row36 + "]错误!" + "|"; + } + } + //string row37 = pds.Rows[i][36].ToString().Trim(); + string row38 = pds.Rows[i][37].ToString().Trim(); + if (!string.IsNullOrEmpty(row38)) + { + try + { + Decimal laboAndHealthIn = Convert.ToDecimal(row38); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "劳动保护及职业健康投入/元" + "," + "[" + row38 + "]错误!" + "|"; + } + } + //string row39 = pds.Rows[i][38].ToString().Trim(); + string row40 = pds.Rows[i][39].ToString().Trim(); + if (!string.IsNullOrEmpty(row40)) + { + try + { + Decimal technologyProgressIn = Convert.ToDecimal(row40); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "安全技术进步投入/元" + "," + "[" + row40 + "]错误!" + "|"; + } + } + //string row41 = pds.Rows[i][40].ToString().Trim(); + string row42 = pds.Rows[i][41].ToString().Trim(); + if (!string.IsNullOrEmpty(row42)) + { + try + { + Decimal educationTrainIn = Convert.ToDecimal(row42); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "安全教育培训投入/元" + "," + "[" + row42 + "]错误!" + "|"; + } + } + //string row43 = pds.Rows[i][42].ToString().Trim(); + string row44 = pds.Rows[i][43].ToString().Trim(); + if (!string.IsNullOrEmpty(row44)) + { + try + { + Decimal projectCostRate = Convert.ToDecimal(row44); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "工程造价占比(%)" + "," + "[" + row44 + "]错误!" + "|"; + } + } + //string row45 = pds.Rows[i][44].ToString().Trim(); + string row46 = pds.Rows[i][45].ToString().Trim(); + if (!string.IsNullOrEmpty(row46)) + { + try + { + Decimal productionInput = Convert.ToDecimal(row46); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "百万工时安全生产投入额/万元" + "," + "[" + row46 + "]错误!" + "|"; + } + } + //string row47 = pds.Rows[i][46].ToString().Trim(); + string row48 = pds.Rows[i][47].ToString().Trim(); + if (!string.IsNullOrEmpty(row48)) + { + try + { + Decimal revenue = Convert.ToDecimal(row48); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "安全生产投入占施工收入之比" + "," + "[" + row48 + "]错误!" + "|"; + } + } + //string row49 = pds.Rows[i][48].ToString().Trim(); + string row50 = pds.Rows[i][49].ToString().Trim(); + if (!string.IsNullOrEmpty(row50)) + { + try + { + Int32 fullTimeMan = Convert.ToInt32(row50); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "安全专职人员总数" + "," + "[" + row50 + "]错误!" + "|"; + } + } + //string row51 = pds.Rows[i][50].ToString().Trim(); + string row52 = pds.Rows[i][51].ToString().Trim(); + if (!string.IsNullOrEmpty(row52)) + { + try + { + Int32 pMMan = Convert.ToInt32(row52); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "项目经理人员总数" + "," + "[" + row52 + "]错误!" + "|"; + } + } + //string row53 = pds.Rows[i][52].ToString().Trim(); + string row54 = pds.Rows[i][53].ToString().Trim(); + if (!string.IsNullOrEmpty(row54)) + { + try + { + Int32 corporateDirectorEdu = Convert.ToInt32(row54); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "企业负责人安全生产继续教育数" + "," + "[" + row54 + "]错误!" + "|"; + } + } + //string row55 = pds.Rows[i][54].ToString().Trim(); + string row56 = pds.Rows[i][55].ToString().Trim(); + if (!string.IsNullOrEmpty(row56)) + { + try + { + Int32 projectLeaderEdu = Convert.ToInt32(row56); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "项目负责人安全生产继续教育数" + "," + "[" + row56 + "]错误!" + "|"; + } + } + //string row57 = pds.Rows[i][56].ToString().Trim(); + string row58 = pds.Rows[i][57].ToString().Trim(); + if (!string.IsNullOrEmpty(row58)) + { + try + { + Int32 fullTimeEdu = Convert.ToInt32(row58); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "安全专职人员安全生产继续教育数" + "," + "[" + row58 + "]错误!" + "|"; + } + } + //string row59 = pds.Rows[i][58].ToString().Trim(); + string row60 = pds.Rows[i][59].ToString().Trim(); + if (!string.IsNullOrEmpty(row60)) + { + try + { + Decimal threeKidsEduRate = Convert.ToDecimal(row60); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "安全生产三类人员继续教育覆盖率" + "," + "[" + row60 + "]错误!" + "|"; + } + } + //string row61 = pds.Rows[i][60].ToString().Trim(); + string row62 = pds.Rows[i][61].ToString().Trim(); + if (!string.IsNullOrEmpty(row62)) + { + try + { + Decimal uplinReportRate = Convert.ToDecimal(row62); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "上行报告履行率" + "," + "[" + row62 + "]错误!" + "|"; + } + } + //string row63 = pds.Rows[i][62].ToString().Trim(); + string row64 = pds.Rows[i][63].ToString().Trim(); + if (!string.IsNullOrEmpty(row64)) + { + try + { + Int32 keyEquipmentTotal = Convert.ToInt32(row64); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重点装备总数" + "," + "[" + row64 + "]错误!" + "|"; + } + } + //string row65 = pds.Rows[i][64].ToString().Trim(); + string row66 = pds.Rows[i][65].ToString().Trim(); + if (!string.IsNullOrEmpty(row66)) + { + try + { + Int32 keyEquipmentReportCount = Convert.ToInt32(row66); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "重点装备安全控制检查报告数" + "," + "[" + row66 + "]错误!" + "|"; + } + } + //string row67 = pds.Rows[i][66].ToString().Trim(); + string row68 = pds.Rows[i][67].ToString().Trim(); + if (!string.IsNullOrEmpty(row68)) + { + try + { + Int32 chemicalAreaProjectCount = Convert.ToInt32(row68); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "化工界区施工作业项目数" + "," + "[" + row68 + "]错误!" + "|"; + } + } + //string row69 = pds.Rows[i][68].ToString().Trim(); + string row70 = pds.Rows[i][69].ToString().Trim(); + if (!string.IsNullOrEmpty(row70)) + { + try + { + Int32 harmfulMediumCoverCount = Convert.ToInt32(row70); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "化工界区施工作业有害介质检测复测覆盖数" + "," + "[" + row70 + "]错误!" + "|"; + } + } + //string row71 = pds.Rows[i][70].ToString().Trim(); + string row72 = pds.Rows[i][71].ToString().Trim(); + if (!string.IsNullOrEmpty(row72)) + { + try + { + Decimal harmfulMediumCoverRate = Convert.ToDecimal(row72); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "施工作业安全技术交底覆盖率(%)" + "," + "[" + row72 + "]错误!" + "|"; + } + } + //string row73 = pds.Rows[i][72].ToString().Trim(); + //string row74 = pds.Rows[i][73].ToString().Trim(); + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + ShowNotify(result, MessageBoxIcon.Warning); + //Session["errorInfos"] = result; + } + else + { + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx.designer.cs new file mode 100644 index 00000000..98489476 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBar.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class SafetyQuarterlyReportBar { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx new file mode 100644 index 00000000..b9092956 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx @@ -0,0 +1,16 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyQuarterlyReportBarIn.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.SafetyQuarterlyReportBarIn" %> + + + + + + + 导入安全生产数据季报表 + + + +
+ + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx.cs new file mode 100644 index 00000000..392cbf36 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx.cs @@ -0,0 +1,395 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class SafetyQuarterlyReportBarIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 安全生产数据季报表集合 + /// + private List safetyQuarterlyReports = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + Session["safetyQuarterlyReports"] = null; + string rootPath = Server.MapPath("~/"); + string fileName = rootPath + initPath + Request.Params["FileName"]; + ImportXlsToData(fileName); + } + #endregion + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 74); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + int ic, ir; + safetyQuarterlyReports.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + ShowNotify("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + if (pds != null && ir > 0) + { + var units = from x in Funs.DB.Base_Unit select x; + + for (int i = 0; i < ir; i++) + { + Model.Information_SafetyQuarterlyReport safetyQuarterlyReport = new Model.Information_SafetyQuarterlyReport(); + string row1 = pds.Rows[i][0].ToString().Trim(); + string row2 = pds.Rows[i][1].ToString().Trim(); + string row3 = pds.Rows[i][2].ToString().Trim(); + string row4 = pds.Rows[i][3].ToString().Trim(); + string row5 = pds.Rows[i][4].ToString().Trim(); + string row6 = pds.Rows[i][5].ToString().Trim(); + string row7 = pds.Rows[i][6].ToString().Trim(); + string row8 = pds.Rows[i][7].ToString().Trim(); + string row9 = pds.Rows[i][8].ToString().Trim(); + string row10 = pds.Rows[i][9].ToString().Trim(); + string row11 = pds.Rows[i][10].ToString().Trim(); + string row12 = pds.Rows[i][11].ToString().Trim(); + string row13 = pds.Rows[i][12].ToString().Trim(); + string row14 = pds.Rows[i][13].ToString().Trim(); + string row15 = pds.Rows[i][14].ToString().Trim(); + string row16 = pds.Rows[i][15].ToString().Trim(); + string row17 = pds.Rows[i][16].ToString().Trim(); + string row18 = pds.Rows[i][17].ToString().Trim(); + string row19 = pds.Rows[i][18].ToString().Trim(); + string row20 = pds.Rows[i][19].ToString().Trim(); + string row21 = pds.Rows[i][20].ToString().Trim(); + string row22 = pds.Rows[i][21].ToString().Trim(); + string row23 = pds.Rows[i][22].ToString().Trim(); + string row24 = pds.Rows[i][23].ToString().Trim(); + string row25 = pds.Rows[i][24].ToString().Trim(); + string row26 = pds.Rows[i][25].ToString().Trim(); + string row27 = pds.Rows[i][26].ToString().Trim(); + string row28 = pds.Rows[i][27].ToString().Trim(); + string row29 = pds.Rows[i][28].ToString().Trim(); + string row30 = pds.Rows[i][29].ToString().Trim(); + string row31 = pds.Rows[i][30].ToString().Trim(); + string row32 = pds.Rows[i][31].ToString().Trim(); + string row33 = pds.Rows[i][32].ToString().Trim(); + string row34 = pds.Rows[i][33].ToString().Trim(); + string row35 = pds.Rows[i][34].ToString().Trim(); + string row36 = pds.Rows[i][35].ToString().Trim(); + string row37 = pds.Rows[i][36].ToString().Trim(); + string row38 = pds.Rows[i][37].ToString().Trim(); + string row39 = pds.Rows[i][38].ToString().Trim(); + string row40 = pds.Rows[i][39].ToString().Trim(); + string row41 = pds.Rows[i][40].ToString().Trim(); + string row42 = pds.Rows[i][41].ToString().Trim(); + string row43 = pds.Rows[i][42].ToString().Trim(); + string row44 = pds.Rows[i][43].ToString().Trim(); + string row45 = pds.Rows[i][44].ToString().Trim(); + string row46 = pds.Rows[i][45].ToString().Trim(); + string row47 = pds.Rows[i][46].ToString().Trim(); + string row48 = pds.Rows[i][47].ToString().Trim(); + string row49 = pds.Rows[i][48].ToString().Trim(); + string row50 = pds.Rows[i][49].ToString().Trim(); + string row51 = pds.Rows[i][50].ToString().Trim(); + string row52 = pds.Rows[i][51].ToString().Trim(); + string row53 = pds.Rows[i][52].ToString().Trim(); + string row54 = pds.Rows[i][53].ToString().Trim(); + string row55 = pds.Rows[i][54].ToString().Trim(); + string row56 = pds.Rows[i][55].ToString().Trim(); + string row57 = pds.Rows[i][56].ToString().Trim(); + string row58 = pds.Rows[i][57].ToString().Trim(); + string row59 = pds.Rows[i][58].ToString().Trim(); + string row60 = pds.Rows[i][59].ToString().Trim(); + string row61 = pds.Rows[i][60].ToString().Trim(); + string row62 = pds.Rows[i][61].ToString().Trim(); + string row63 = pds.Rows[i][62].ToString().Trim(); + string row64 = pds.Rows[i][63].ToString().Trim(); + string row65 = pds.Rows[i][64].ToString().Trim(); + string row66 = pds.Rows[i][65].ToString().Trim(); + string row67 = pds.Rows[i][66].ToString().Trim(); + string row68 = pds.Rows[i][67].ToString().Trim(); + string row69 = pds.Rows[i][68].ToString().Trim(); + string row70 = pds.Rows[i][69].ToString().Trim(); + string row71 = pds.Rows[i][70].ToString().Trim(); + string row72 = pds.Rows[i][71].ToString().Trim(); + string row73 = pds.Rows[i][72].ToString().Trim(); + string row74 = pds.Rows[i][73].ToString().Trim(); + + if (!string.IsNullOrEmpty(row1)) + { + safetyQuarterlyReport.UnitId = units.Where(x => x.UnitName == row1.Trim()).FirstOrDefault().UnitId; + } + if (!string.IsNullOrEmpty(row2)) + { + safetyQuarterlyReport.YearId = Convert.ToInt32(row2); + } + if (!string.IsNullOrEmpty(row3)) + { + safetyQuarterlyReport.Quarters = Convert.ToInt32(row3); + } + if (!string.IsNullOrEmpty(row4)) + { + safetyQuarterlyReport.TotalInWorkHours = Convert.ToInt32(row4); + } + safetyQuarterlyReport.TotalInWorkHoursRemark = row5; + if (!string.IsNullOrEmpty(row6)) + { + safetyQuarterlyReport.TotalOutWorkHours = Convert.ToInt32(row6); + } + safetyQuarterlyReport.TotalOutWorkHoursRemark = row7; + if (!string.IsNullOrEmpty(row8)) + { + safetyQuarterlyReport.WorkHoursLossRate = Convert.ToDecimal(row8); + } + safetyQuarterlyReport.WorkHoursLossRateRemark = row9; + if (!string.IsNullOrEmpty(row10)) + { + safetyQuarterlyReport.WorkHoursAccuracy = Convert.ToDecimal(row10); + } + safetyQuarterlyReport.WorkHoursAccuracyRemark = row11; + if (!string.IsNullOrEmpty(row12)) + { + safetyQuarterlyReport.MainBusinessIncome = Convert.ToDecimal(row12); + } + safetyQuarterlyReport.MainBusinessIncomeRemark = row13; + if (!string.IsNullOrEmpty(row14)) + { + safetyQuarterlyReport.ConstructionRevenue = Convert.ToDecimal(row14); + } + safetyQuarterlyReport.ConstructionRevenueRemark = row15; + if (!string.IsNullOrEmpty(row16)) + { + safetyQuarterlyReport.UnitTimeIncome = Convert.ToDecimal(row16); + } + safetyQuarterlyReport.UnitTimeIncomeRemark = row17; + if (!string.IsNullOrEmpty(row18)) + { + safetyQuarterlyReport.BillionsOutputMortality = Convert.ToDecimal(row18); + } + safetyQuarterlyReport.BillionsOutputMortalityRemark = row19; + if (!string.IsNullOrEmpty(row20)) + { + safetyQuarterlyReport.MajorFireAccident = Convert.ToInt32(row20); + } + safetyQuarterlyReport.MajorFireAccidentRemark = row21; + if (!string.IsNullOrEmpty(row22)) + { + safetyQuarterlyReport.MajorEquipAccident = Convert.ToInt32(row22); + } + safetyQuarterlyReport.MajorEquipAccidentRemark = row23; + if (!string.IsNullOrEmpty(row24)) + { + safetyQuarterlyReport.AccidentFrequency = Convert.ToDecimal(row24); + } + safetyQuarterlyReport.AccidentFrequencyRemark = row25; + if (!string.IsNullOrEmpty(row26)) + { + safetyQuarterlyReport.SeriousInjuryAccident = Convert.ToInt32(row26); + } + safetyQuarterlyReport.SeriousInjuryAccidentRemark = row27; + if (!string.IsNullOrEmpty(row28)) + { + safetyQuarterlyReport.FireAccident = Convert.ToInt32(row28); + } + safetyQuarterlyReport.FireAccidentRemark = row29; + if (!string.IsNullOrEmpty(row30)) + { + safetyQuarterlyReport.EquipmentAccident = Convert.ToInt32(row30); + } + safetyQuarterlyReport.EquipmentAccidentRemark = row31; + if (!string.IsNullOrEmpty(row32)) + { + safetyQuarterlyReport.PoisoningAndInjuries = Convert.ToInt32(row32); + } + safetyQuarterlyReport.PoisoningAndInjuriesRemark = row33; + if (!string.IsNullOrEmpty(row34)) + { + safetyQuarterlyReport.ProductionSafetyInTotal = Convert.ToInt32(row34); + } + safetyQuarterlyReport.ProductionSafetyInTotalRemark = row35; + if (!string.IsNullOrEmpty(row36)) + { + safetyQuarterlyReport.ProtectionInput = Convert.ToDecimal(row36); + } + safetyQuarterlyReport.ProtectionInputRemark = row37; + if (!string.IsNullOrEmpty(row38)) + { + safetyQuarterlyReport.LaboAndHealthIn = Convert.ToDecimal(row38); + } + safetyQuarterlyReport.LaborAndHealthInRemark = row39; + if (!string.IsNullOrEmpty(row40)) + { + safetyQuarterlyReport.TechnologyProgressIn = Convert.ToDecimal(row40); + } + safetyQuarterlyReport.TechnologyProgressInRemark = row41; + if (!string.IsNullOrEmpty(row42)) + { + safetyQuarterlyReport.EducationTrainIn = Convert.ToDecimal(row42); + } + safetyQuarterlyReport.EducationTrainInRemark = row43; + if (!string.IsNullOrEmpty(row44)) + { + safetyQuarterlyReport.ProjectCostRate = Convert.ToDecimal(row44); + } + safetyQuarterlyReport.ProjectCostRateRemark = row45; + if (!string.IsNullOrEmpty(row46)) + { + safetyQuarterlyReport.ProductionInput = Convert.ToDecimal(row46); + } + safetyQuarterlyReport.ProductionInputRemark = row47; + if (!string.IsNullOrEmpty(row48)) + { + safetyQuarterlyReport.Revenue = Convert.ToDecimal(row48); + } + safetyQuarterlyReport.RevenueRemark = row49; + if (!string.IsNullOrEmpty(row50)) + { + safetyQuarterlyReport.FullTimeMan = Convert.ToInt32(row50); + } + safetyQuarterlyReport.FullTimeManRemark = row51; + if (!string.IsNullOrEmpty(row52)) + { + safetyQuarterlyReport.PMMan = Convert.ToInt32(row52); + } + safetyQuarterlyReport.PMManRemark = row53; + if (!string.IsNullOrEmpty(row54)) + { + safetyQuarterlyReport.CorporateDirectorEdu = Convert.ToInt32(row54); + } + safetyQuarterlyReport.CorporateDirectorEduRemark = row55; + if (!string.IsNullOrEmpty(row56)) + { + safetyQuarterlyReport.ProjectLeaderEdu = Convert.ToInt32(row56); + } + safetyQuarterlyReport.ProjectLeaderEduRemark = row57; + if (!string.IsNullOrEmpty(row58)) + { + safetyQuarterlyReport.FullTimeEdu = Convert.ToInt32(row58); + } + safetyQuarterlyReport.FullTimeEduRemark = row59; + if (!string.IsNullOrEmpty(row60)) + { + safetyQuarterlyReport.ThreeKidsEduRate = Convert.ToDecimal(row60); + } + safetyQuarterlyReport.ThreeKidsEduRateRemark = row61; + if (!string.IsNullOrEmpty(row62)) + { + safetyQuarterlyReport.UplinReportRate = Convert.ToDecimal(row62); + } + safetyQuarterlyReport.UplinReportRateRemark = row63; + if (!string.IsNullOrEmpty(row64)) + { + safetyQuarterlyReport.KeyEquipmentTotal = Convert.ToInt32(row64); + } + safetyQuarterlyReport.KeyEquipmentTotalRemark = row65; + if (!string.IsNullOrEmpty(row66)) + { + safetyQuarterlyReport.KeyEquipmentReportCount = Convert.ToInt32(row66); + } + safetyQuarterlyReport.KeyEquipmentReportCountRemark = row67; + if (!string.IsNullOrEmpty(row68)) + { + safetyQuarterlyReport.ChemicalAreaProjectCount = Convert.ToInt32(row68); + } + safetyQuarterlyReport.ChemicalAreaProjectCountRemark = row69; + if (!string.IsNullOrEmpty(row70)) + { + safetyQuarterlyReport.HarmfulMediumCoverCount = Convert.ToInt32(row70); + } + safetyQuarterlyReport.HarmfulMediumCoverCountRemark = row71; + if (!string.IsNullOrEmpty(row72)) + { + safetyQuarterlyReport.HarmfulMediumCoverRate = Convert.ToDecimal(row72); + } + safetyQuarterlyReport.HarmfulMediumCoverRateRemark = row73; + safetyQuarterlyReport.Remarks = row74; + + if (safetyQuarterlyReports.Where(e => e.SafetyQuarterlyReportId == safetyQuarterlyReport.SafetyQuarterlyReportId).FirstOrDefault() == null) + { + safetyQuarterlyReport.SafetyQuarterlyReportId = SQLHelper.GetNewID(typeof(Model.Information_SafetyQuarterlyReport)); + safetyQuarterlyReport.CompileMan = this.CurrUser.PersonName; + safetyQuarterlyReport.UpState = BLL.Const.UpState_2; + safetyQuarterlyReport.HandleMan = this.CurrUser.PersonId; + safetyQuarterlyReport.HandleState = BLL.Const.HandleState_1; + safetyQuarterlyReports.Add(safetyQuarterlyReport); //增加安全生产数据季报表 + } + } + Session["safetyQuarterlyReports"] = safetyQuarterlyReports; + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx.designer.cs new file mode 100644 index 00000000..1caaf9d8 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportBarIn.aspx.designer.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class SafetyQuarterlyReportBarIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx new file mode 100644 index 00000000..3d852423 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx @@ -0,0 +1,301 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyQuarterlyReportImport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.DataIn.SafetyQuarterlyReportImport" %> + + + + + + + 导入 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx.cs new file mode 100644 index 00000000..d23c03a5 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx.cs @@ -0,0 +1,410 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.ZHGL.DataIn +{ + public partial class SafetyQuarterlyReportImport : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 安全生产数据季报表集合 + /// + private static List safetyQuarterlyReports = new List(); + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (safetyQuarterlyReports != null) + { + safetyQuarterlyReports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + } + } + #endregion + + #region 审核 + /// + /// 审核按钮 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (safetyQuarterlyReports != null) + { + safetyQuarterlyReports.Clear(); + } + if (errorInfos != null) + { + errorInfos.Clear(); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyQuarterlyReportBar.aspx?FileName={0}", this.hdFileName.Text, "审核 - "))); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("SafetyQuarterlyReportBarIn.aspx?FileName={0}", this.hdFileName.Text, "导入 - "))); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 保存 + /// + /// 保存导入数据 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (errorInfos.Count <= 0) + { + if (Session["safetyQuarterlyReports"] != null) + { + safetyQuarterlyReports = Session["safetyQuarterlyReports"] as List; + } + int b = safetyQuarterlyReports.Count(); + int c = b; + for (int i = 0; i < c; i++) + { + Model.Information_SafetyQuarterlyReport report = new Model.Information_SafetyQuarterlyReport + { + UnitId = safetyQuarterlyReports[i].UnitId, + YearId = safetyQuarterlyReports[i].YearId, + Quarters = safetyQuarterlyReports[i].Quarters, + TotalInWorkHours = safetyQuarterlyReports[i].TotalInWorkHours, + TotalInWorkHoursRemark = safetyQuarterlyReports[i].TotalInWorkHoursRemark, + TotalOutWorkHours = safetyQuarterlyReports[i].TotalOutWorkHours, + TotalOutWorkHoursRemark = safetyQuarterlyReports[i].TotalOutWorkHoursRemark, + WorkHoursLossRate = safetyQuarterlyReports[i].WorkHoursLossRate, + WorkHoursLossRateRemark = safetyQuarterlyReports[i].WorkHoursLossRateRemark, + WorkHoursAccuracy = safetyQuarterlyReports[i].WorkHoursAccuracy, + WorkHoursAccuracyRemark = safetyQuarterlyReports[i].WorkHoursAccuracyRemark, + MainBusinessIncome = safetyQuarterlyReports[i].MainBusinessIncome, + MainBusinessIncomeRemark = safetyQuarterlyReports[i].MainBusinessIncomeRemark, + ConstructionRevenue = safetyQuarterlyReports[i].ConstructionRevenue, + ConstructionRevenueRemark = safetyQuarterlyReports[i].ConstructionRevenueRemark, + UnitTimeIncome = safetyQuarterlyReports[i].UnitTimeIncome, + UnitTimeIncomeRemark = safetyQuarterlyReports[i].UnitTimeIncomeRemark, + BillionsOutputMortality = safetyQuarterlyReports[i].BillionsOutputMortality, + BillionsOutputMortalityRemark = safetyQuarterlyReports[i].BillionsOutputMortalityRemark, + MajorFireAccident = safetyQuarterlyReports[i].MajorFireAccident, + MajorFireAccidentRemark = safetyQuarterlyReports[i].MajorFireAccidentRemark, + MajorEquipAccident = safetyQuarterlyReports[i].MajorEquipAccident, + MajorEquipAccidentRemark = safetyQuarterlyReports[i].MajorEquipAccidentRemark, + AccidentFrequency = safetyQuarterlyReports[i].AccidentFrequency, + AccidentFrequencyRemark = safetyQuarterlyReports[i].AccidentFrequencyRemark, + SeriousInjuryAccident = safetyQuarterlyReports[i].SeriousInjuryAccident, + SeriousInjuryAccidentRemark = safetyQuarterlyReports[i].SeriousInjuryAccidentRemark, + FireAccident = safetyQuarterlyReports[i].FireAccident, + FireAccidentRemark = safetyQuarterlyReports[i].FireAccidentRemark, + EquipmentAccident = safetyQuarterlyReports[i].EquipmentAccident, + EquipmentAccidentRemark = safetyQuarterlyReports[i].EquipmentAccidentRemark, + PoisoningAndInjuries = safetyQuarterlyReports[i].PoisoningAndInjuries, + PoisoningAndInjuriesRemark = safetyQuarterlyReports[i].PoisoningAndInjuriesRemark, + ProductionSafetyInTotal = safetyQuarterlyReports[i].ProductionSafetyInTotal, + ProductionSafetyInTotalRemark = safetyQuarterlyReports[i].ProductionSafetyInTotalRemark, + ProtectionInput = safetyQuarterlyReports[i].ProtectionInput, + ProtectionInputRemark = safetyQuarterlyReports[i].ProtectionInputRemark, + LaboAndHealthIn = safetyQuarterlyReports[i].LaboAndHealthIn, + LaborAndHealthInRemark = safetyQuarterlyReports[i].LaborAndHealthInRemark, + TechnologyProgressIn = safetyQuarterlyReports[i].TechnologyProgressIn, + TechnologyProgressInRemark = safetyQuarterlyReports[i].TechnologyProgressInRemark, + EducationTrainIn = safetyQuarterlyReports[i].EducationTrainIn, + EducationTrainInRemark = safetyQuarterlyReports[i].EducationTrainInRemark, + ProjectCostRate = safetyQuarterlyReports[i].ProjectCostRate, + ProjectCostRateRemark = safetyQuarterlyReports[i].ProjectCostRateRemark, + ProductionInput = safetyQuarterlyReports[i].ProductionInput, + ProductionInputRemark = safetyQuarterlyReports[i].ProductionInputRemark, + Revenue = safetyQuarterlyReports[i].Revenue, + RevenueRemark = safetyQuarterlyReports[i].RevenueRemark, + FullTimeMan = safetyQuarterlyReports[i].FullTimeMan, + FullTimeManRemark = safetyQuarterlyReports[i].FullTimeManRemark, + PMMan = safetyQuarterlyReports[i].PMMan, + PMManRemark = safetyQuarterlyReports[i].PMManRemark, + CorporateDirectorEdu = safetyQuarterlyReports[i].CorporateDirectorEdu, + CorporateDirectorEduRemark = safetyQuarterlyReports[i].CorporateDirectorEduRemark, + ProjectLeaderEdu = safetyQuarterlyReports[i].ProjectLeaderEdu, + ProjectLeaderEduRemark = safetyQuarterlyReports[i].ProjectLeaderEduRemark, + FullTimeEdu = safetyQuarterlyReports[i].FullTimeEdu, + FullTimeEduRemark = safetyQuarterlyReports[i].FullTimeEduRemark, + ThreeKidsEduRate = safetyQuarterlyReports[i].ThreeKidsEduRate, + ThreeKidsEduRateRemark = safetyQuarterlyReports[i].ThreeKidsEduRateRemark, + UplinReportRate = safetyQuarterlyReports[i].UplinReportRate, + UplinReportRateRemark = safetyQuarterlyReports[i].UplinReportRateRemark, + Remarks = safetyQuarterlyReports[i].Remarks, + KeyEquipmentTotal = safetyQuarterlyReports[i].KeyEquipmentTotal, + KeyEquipmentTotalRemark = safetyQuarterlyReports[i].KeyEquipmentTotalRemark, + KeyEquipmentReportCount = safetyQuarterlyReports[i].KeyEquipmentReportCount, + KeyEquipmentReportCountRemark = safetyQuarterlyReports[i].KeyEquipmentReportCountRemark, + ChemicalAreaProjectCount = safetyQuarterlyReports[i].ChemicalAreaProjectCount, + ChemicalAreaProjectCountRemark = safetyQuarterlyReports[i].ChemicalAreaProjectCountRemark, + HarmfulMediumCoverCount = safetyQuarterlyReports[i].HarmfulMediumCoverCount, + HarmfulMediumCoverCountRemark = safetyQuarterlyReports[i].HarmfulMediumCoverCountRemark, + HarmfulMediumCoverRate = safetyQuarterlyReports[i].HarmfulMediumCoverRate, + HarmfulMediumCoverRateRemark = safetyQuarterlyReports[i].HarmfulMediumCoverRateRemark, + CompileMan = this.CurrUser.PersonName, + UpState = BLL.Const.UpState_2, + HandleMan = this.CurrUser.PersonId, + HandleState = BLL.Const.HandleState_1 + }; + BLL.SafetyQuarterlyReportService.AddSafetyQuarterlyReport(safetyQuarterlyReports[i]); + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + ShowNotify("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭审核弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + //errorInfos.Clear(); + //if (!string.IsNullOrEmpty(this.hdCheckResult.Text.Trim())) + //{ + // string result = this.hdCheckResult.Text.Trim(); + // List errorInfoList = result.Split('|').ToList(); + // foreach (var item in errorInfoList) + // { + // string[] errors = item.Split(','); + // Model.ErrorInfo errorInfo = new Model.ErrorInfo(); + // errorInfo.Row = Convert.ToInt32(errors[0]); + // errorInfo.Column = errors[1]; + // errorInfo.Reason = errors[2]; + // errorInfos.Add(errorInfo); + // } + // if (errorInfos.Count > 0) + // { + // this.Grid1.Visible = false; + // this.Form2.Visible = true; + // this.gvErrorInfo.DataSource = errorInfos; + // this.gvErrorInfo.DataBind(); + // } + //} + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + if (Session["safetyQuarterlyReports"] != null) + { + safetyQuarterlyReports = Session["safetyQuarterlyReports"] as List; + } + if (safetyQuarterlyReports.Count > 0) + { + this.Grid1.Visible = true; + //this.Form2.Visible = false; + this.Grid1.DataSource = safetyQuarterlyReports; + this.Grid1.DataBind(); + } + } + + ///// + ///// 关闭保存导入数据窗口 + ///// + ///// + ///// + //protected void Window3_Close(object sender, WindowCloseEventArgs e) + //{ + // if (Session["safetyQuarterlyReports"] != null) + // { + // safetyQuarterlyReports = Session["safetyQuarterlyReports"] as List; + // } + // if (safetyQuarterlyReports.Count > 0) + // { + // this.Grid1.Visible = true; + // this.Form2.Visible = false; + // this.Grid1.DataSource = safetyQuarterlyReports; + // this.Grid1.DataBind(); + // } + //} + #endregion + + #region 转换字符串 + /// + /// 转换单位 + /// + /// + /// + protected string ConvertUnit(object u) + { + string unitName = string.Empty; + if (u != null) + { + var unit = BLL.UnitService.GetUnitByUnitId(u.ToString()); + if (unit != null) + { + unitName = unit.UnitName; + } + } + return unitName; + } + #endregion + + #region 下载导入模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.SafetyQuarterlyReportTemplateUrl; + string filePath = Const.SafetyQuarterlyReportTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx.designer.cs new file mode 100644 index 00000000..e1f4d97a --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/DataIn/SafetyQuarterlyReportImport.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.DataIn { + + + public partial class SafetyQuarterlyReportImport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// lblBottom 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblBottom; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx new file mode 100644 index 00000000..7e7521c2 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx @@ -0,0 +1,360 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccidentCauseReport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.AccidentCauseReport" %> + + + + + + + 职工伤亡事故原因分析报表 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.cs new file mode 100644 index 00000000..1b3446c9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.cs @@ -0,0 +1,795 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using BLL; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class AccidentCauseReport : PageBase + { + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false); + BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false); + + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + + this.drpUnit.Readonly = true; + ////取上个报表时间 + DateTime showDate = System.DateTime.Now.AddMonths(-1); + drpMonth.SelectedValue = showDate.Month.ToString(); + drpYear.SelectedValue = showDate.Year.ToString(); + GetValue(); + } + } + + private void SetEmpty() + { + this.SimpleForm1.Title = string.Empty; + lb1.Text = "一、填报单位:"; + lb2.Text = "二、本月发生死亡事故0次,死亡0人,重伤事故0次,重伤0人,轻伤事故0次,轻伤0人。"; + lb3.Text = "三、本月平均工时总数0,人数0人。"; + lb4.Text = "四、本月事故损失工时总数0小时,上月事故损失工时总数0。"; + lb5.Text = "五、伤者在本月内的歇工总日数0天。"; + lb6.Text = "六、事故直接损失0,间接损失0,总损失0。"; + lb7.Text = "七、无损失工时总数0。"; + lbFillCompanyPersonCharge.Text = "填报单位负责人:"; + lbTabPeople.Text = "制表人:"; + lbAuditPerson.Text = "审核人:"; + lbFillingDate.Text = "填报日期:"; + this.lbHandleMan.Text = string.Empty; + this.Grid1.DataSource = null; + this.Grid1.DataBind(); + } + #endregion + + #region 获取记录值 + private void GetValue() + { + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + int monthId = Funs.GetNewIntOrZero(drpMonth.SelectedValue); + Model.View_Information_AccidentCauseReport report = Funs.DB.View_Information_AccidentCauseReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Month == monthId && e.Year == year); + if (report != null) + { + string month = report.MonthStr; + string lastMonth = string.Empty; + if (month == "一月") + { + lastMonth = "十二月"; + } + else + { + lastMonth = (from x in Funs.DB.Sys_Const where x.GroupId == BLL.ConstValue.Group_0009 && Convert.ToInt32(x.ConstValue) == (Convert.ToInt32(report.Month) - 1) select x.ConstText).FirstOrDefault(); + } + string state = string.Empty; + if (report.UpState == BLL.Const.UpState_3) + { + state = "(已上报)"; + } + else + { + if (report.HandleState == BLL.Const.HandleState_1) + { + if (string.IsNullOrEmpty(report.TabPeople)) + { + report.TabPeople = this.CurrUser.PersonName; + } + state = "(待提交)"; + } + else if (report.HandleState == BLL.Const.HandleState_2) + { + if (string.IsNullOrEmpty(report.AuditPerson)) + { + report.AuditPerson = this.CurrUser.PersonName; + } + state = "(待审核)"; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + state = "(待审批)"; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + if (string.IsNullOrEmpty(report.FillCompanyPersonCharge)) + { + report.FillCompanyPersonCharge = this.CurrUser.PersonName; + } + state = "(待上报)"; + } + } + this.SimpleForm1.Title = "职工伤亡事故原因分析" + month + report.YearStr + "报表(" + report.AccidentCauseReportCode + ")" + state; + string unitName = string.Empty; + Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(report.UnitId); + if (unit != null) + { + unitName = unit.UnitName; + } + lb1.Text = "一、填报单位:" + unitName; + lb2.Text = "二、本月(" + month + ")发生死亡事故" + (report.DeathAccident ?? 0).ToString() + "次,死亡" + (report.DeathToll ?? 0).ToString() + "人,重伤事故" + (report.InjuredAccident ?? 0).ToString() + "次,重伤" + + (report.InjuredToll ?? 0).ToString() + "人,轻伤事故" + (report.MinorWoundAccident ?? 0).ToString() + "次,轻伤" + (report.MinorWoundToll ?? 0).ToString() + "人。"; + lb3.Text = "三、本月(" + month + ")平均工时总数" + (report.AverageTotalHours ?? 0).ToString() + ",人数" + (report.AverageManHours ?? 0).ToString() + "人。"; + lb4.Text = "四、本月事故损失工时总数" + (report.TotalLossMan ?? 0).ToString() + "小时,上月(" + lastMonth + ")事故损失工时总数" + (report.LastMonthLossHoursTotal ?? 0).ToString() + "。"; + lb5.Text = "五、伤者在本月(" + month + ")内的歇工总日数" + (report.KnockOffTotal ?? 0).ToString() + "天。"; + lb6.Text = "六、事故直接损失" + (report.DirectLoss ?? 0).ToString() + ",间接损失" + (report.IndirectLosses ?? 0).ToString() + ",总损失" + (report.TotalLoss ?? 0).ToString() + "。"; + lb7.Text = "七、无损失工时总数" + (report.TotalLossTime ?? 0).ToString() + "。"; + lbFillCompanyPersonCharge.Text = "填报单位负责人:" + report.FillCompanyPersonCharge; + lbTabPeople.Text = "制表人:" + report.TabPeople; + lbAuditPerson.Text = "审核人:" + report.AuditPerson; + if (report.FillingDate != null) + { + lbFillingDate.Text = "填报日期:" + string.Format("{0:yyyy-MM-dd}", report.FillingDate); + } + else + { + lbFillingDate.Text = "填报日期:"; + } + if (report.HandleState == BLL.Const.HandleState_1 || report.UpState == BLL.Const.UpState_3) + { + this.lbHandleMan.Hidden = true; + } + else + { + this.lbHandleMan.Hidden = false; + lbHandleMan.Text = "下一步办理人:" + report.UserName; + } + if (!string.IsNullOrEmpty(report.TabPeople)) + { + List items = BLL.AccidentCauseReportItemService.GetItems(report.AccidentCauseReportId); + Grid1.DataSource = items; + Grid1.DataBind(); + } + } + else + { + SetEmpty(); + } + this.GetButtonPower(); + } + #endregion + + #region 关闭窗口 + /// + /// 关闭窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭查看审批信息弹出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + + } + #endregion + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + } + #endregion + + #region 增加、修改、审核、审批、上报、删除 + /// + /// 新增 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("AccidentCauseReportSave.aspx?year={0}&&month={1}", this.drpYear.SelectedValue, this.drpMonth.SelectedValue, "编辑 - "))); + } + + /// + /// 修改 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("AccidentCauseReportSave.aspx?AccidentCauseReportId={0}", report.AccidentCauseReportId, "编辑 - "))); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + + /// + /// 审核 + /// + /// + /// + protected void btnAudit1_Click(object sender, EventArgs e) + { + Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("AccidentCauseReportSave.aspx?AccidentCauseReportId={0}", report.AccidentCauseReportId, "编辑 - "))); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + + /// + /// 审批 + /// + /// + /// + protected void btnAudit2_Click(object sender, EventArgs e) + { + Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("AccidentCauseReportSave.aspx?AccidentCauseReportId={0}", report.AccidentCauseReportId, "编辑 - "))); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + + /// + /// 上报 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("AccidentCauseReportSave.aspx?AccidentCauseReportId={0}", report.AccidentCauseReportId, "编辑 - "))); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + + /// + /// 删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), + report.AccidentCauseReportId, BLL.Const.AccidentCauseReportMenuId, BLL.Const.BtnDelete); + BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.AccidentCauseReportId); + BLL.AccidentCauseReportItemService.DeleteAccidentCauseReportItemByAccidentCauseReportId(report.AccidentCauseReportId); + BLL.AccidentCauseReportService.DeleteAccidentCauseReportByAccidentCauseReportId(report.AccidentCauseReportId); + + SetEmpty(); + this.btnNew.Hidden = false; + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 格式化字符串 + /// + /// 把时间转换为文字形式 + /// + /// + /// + protected string ConvertCompileDate(object CompileDate) + { + if (CompileDate != null) + { + return string.Format("{0:yyyy-MM-dd}", CompileDate); + } + return ""; + } + + /// + /// 把时间转换为文字形式 + /// + /// + /// + protected string ConvertDate(object AccidentCauseReportId) + { + if (AccidentCauseReportId != null) + { + Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByAccidentCauseReportId(AccidentCauseReportId.ToString()); + if (report != null) + { + return report.Year + "年" + report.Month + "月"; + } + } + return ""; + } + #endregion + + #region 是否允许删除话题类型 + /// + /// 是否允许删除话题类型 + /// + /// + /// + //private bool IsAllowDeleteContentType(string contentTypeId) + //{ + // return BLL.ContentService.IsExitContentType(contentTypeId); + //} + #endregion + + #region 单位下来选择事件 + /// + /// 单位下拉框联动事件 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + GetValue(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.AccidentCauseReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnIn)) + { + this.btnImport.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnPrint)) + { + this.btnPrint.Hidden = false; + } + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + int monthId = Funs.GetNewIntOrZero(drpMonth.SelectedValue); + Model.Information_AccidentCauseReport report = Funs.DB.Information_AccidentCauseReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Month == monthId && e.Year == year); + this.btnAudit1.Hidden = true; + this.btnAudit2.Hidden = true; + this.btnUpdata.Hidden = true; + if (report != null) + { + this.btnNew.Hidden = true; + if (report.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入 + { + if (report.HandleState == BLL.Const.HandleState_2) + { + this.btnAudit1.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + this.btnAudit2.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + } + if (report.UpState == BLL.Const.UpState_3) + { + this.btnUpdata.Hidden = true; + this.btnEdit.Hidden = true; + } + + if (report.HandleMan == this.CurrUser.PersonId || report.FillCompanyPersonCharge == this.CurrUser.PersonName || report.TabPeople == this.CurrUser.PersonName || report.AuditPerson == this.CurrUser.PersonName) + { + this.btnEdit.Hidden = false; + } + else + { + this.btnEdit.Hidden = true; + } + } + } + + //if (this.CurrUser.UserId == BLL.Const.sysglyId) + //{ + // this.btnDelete.Hidden = false; + //} + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../DataIn/AccidentCauseReportImport.aspx", "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + #endregion + + #region 打印 + /// + /// 打印报表 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_AccidentCauseReportId, report.AccidentCauseReportId, "", "打印 - "))); + } + } + #endregion + + #region 月份向前/向后 + /// + /// 前一个月 + /// + /// + /// + protected void BtnBulletLeft_Click(object sender, EventArgs e) + { + SetMonthChange("-"); + } + + /// + /// 后一个月 + /// + /// + /// + protected void BulletRight_Click(object sender, EventArgs e) + { + SetMonthChange("+"); + } + + /// + /// 月份加减变化 + /// + /// + private void SetMonthChange(string type) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + if (type == "+") + { + showDate = nowDate.Value.AddMonths(1); + } + else + { + showDate = nowDate.Value.AddMonths(-1); + } + + this.drpYear.SelectedValue = showDate.Year.ToString(); + drpMonth.SelectedValue = showDate.Month.ToString(); + ///值变化 + GetValue(); + } + } + #endregion + + #region 查看审批信息 + /// + /// 查看审批信息 + /// + /// + /// + protected void btnSee_Click(object sender, EventArgs e) + { + Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.AccidentCauseReportId, "查看 - "))); + } + else + { + ShowNotify("所选月份无记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("职工伤亡事故原因分析报" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + MultiHeaderTable mht = new MultiHeaderTable(); + mht.ResolveMultiHeaderTable(Grid1.Columns); + sb.Append(""); + sb.Append(""); + foreach (List rows in mht.MultiTable) + { + sb.Append(""); + foreach (object[] cell in rows) + { + int rowspan = Convert.ToInt32(cell[0]); + int colspan = Convert.ToInt32(cell[1]); + GridColumn column = cell[2] as GridColumn; + + sb.AppendFormat("{3}", + rowspan != 1 ? " rowspan=\"" + rowspan + "\"" : "", + colspan != 1 ? " colspan=\"" + colspan + "\"" : "", + colspan != 1 ? " style=\"text-align:center;\"" : "", + column.HeaderText); + } + sb.Append(""); + } + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in mht.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + //if (column.ColumnID == "tfNumber") + //{ + // html = (row.FindControl("lblNumber") as AspNet.Label).Text; + //} + sb.AppendFormat("", html); + } + sb.Append(""); + } + sb.Append("
{0}
"); + return sb.ToString(); + } + + #region 多表头处理 + /// + /// 多表头处理 + /// + public class MultiHeaderTable + { + // 包含 rowspan,colspan 的多表头,方便生成 HTML 的 table 标签 + public List> MultiTable = new List>(); + // 最终渲染的列数组 + public List Columns = new List(); + public void ResolveMultiHeaderTable(GridColumnCollection columns) + { + List row = new List(); + foreach (GridColumn column in columns) + { + object[] cell = new object[4]; + cell[0] = 1; // rowspan + cell[1] = 1; // colspan + cell[2] = column; + cell[3] = null; + row.Add(cell); + } + ResolveMultiTable(row, 0); + ResolveColumns(row); + } + + private void ResolveColumns(List row) + { + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + List subrow = new List(); + foreach (GridColumn column in groupField.Columns) + { + subrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + ResolveColumns(subrow); + } + else + { + Columns.Add(cell[2] as GridColumn); + } + } + } + + private void ResolveMultiTable(List row, int level) + { + List nextrow = new List(); + + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // 如果当前列包含子列,则更改当前列的 colspan,以及增加父列(向上递归)的colspan + cell[1] = Convert.ToInt32(groupField.Columns.Count); + PlusColspan(level - 1, cell[3] as GridColumn, groupField.Columns.Count - 1); + + foreach (GridColumn column in groupField.Columns) + { + nextrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + } + } + MultiTable.Add(row); + // 如果当前下一行,则增加上一行(向上递归)中没有子列的列的 rowspan + if (nextrow.Count > 0) + { + PlusRowspan(level); + ResolveMultiTable(nextrow, level + 1); + } + } + + private void PlusRowspan(int level) + { + if (level < 0) + { + return; + } + foreach (object[] cells in MultiTable[level]) + { + GroupField groupField = cells[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // ... + } + else + { + cells[0] = Convert.ToInt32(cells[0]) + 1; + } + } + PlusRowspan(level - 1); + } + + private void PlusColspan(int level, GridColumn parent, int plusCount) + { + if (level < 0) + { + return; + } + + foreach (object[] cells in MultiTable[level]) + { + GridColumn column = cells[2] as GridColumn; + if (column == parent) + { + cells[1] = Convert.ToInt32(cells[1]) + plusCount; + + PlusColspan(level - 1, cells[3] as GridColumn, plusCount); + } + } + } + } + #endregion + #endregion + + #region 查看未上报的项目 + /// + /// 查看未上报的项目 + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + string info = string.Empty; + DateTime date = Convert.ToDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue + "-01").AddDays(-1).AddMonths(1); + var projects = (from x in Funs.DB.Base_Project + where (x.ProjectState == BLL.Const.ProjectState_1 || x.ProjectState == null) + && x.StartDate <= date + select x).ToList(); + foreach (var item in projects) + { + var getAccidentCauseReport = Funs.DB.InformationProject_AccidentCauseReport.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.Year == date.Year && x.Month == date.Month); + if (getAccidentCauseReport == null) + { + info += item.ProjectCode + ":" + item.ProjectName + ",未填写报表;
"; + } + else + { + if (getAccidentCauseReport.States != BLL.Const.State_2) + { + info += item.ProjectCode + ":" + item.ProjectName + "报表未报;"; + var flows = (from x in Funs.DB.Sys_FlowOperate + join y in Funs.DB.Person_Persons on x.OperaterId equals y.PersonId + where x.DataId == getAccidentCauseReport.AccidentCauseReportId && x.IsClosed != false + select y).FirstOrDefault(); + if (flows != null) + { + info += "待" + flows.PersonName + "处理;"; + } + info += "
"; + } + } + } + + if (!string.IsNullOrEmpty(info)) + { + Alert.ShowInTop(info + "项目报表未上报。", MessageBoxIcon.Warning); + } + else + { + ShowNotify("项目报表已上报", MessageBoxIcon.Success); + } + + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.designer.cs new file mode 100644 index 00000000..5ea46a62 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReport.aspx.designer.cs @@ -0,0 +1,366 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class AccidentCauseReport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpMonth 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpMonth; + + /// + /// BtnBulletLeft 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletLeft; + + /// + /// BtnBulletRight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletRight; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnAudit1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit1; + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit2; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnView; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// lb1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb1; + + /// + /// lb2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb2; + + /// + /// lb3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb3; + + /// + /// lb4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb4; + + /// + /// lb5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb5; + + /// + /// lb6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb6; + + /// + /// lb7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lb7; + + /// + /// lbFillCompanyPersonCharge 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbFillCompanyPersonCharge; + + /// + /// lbTabPeople 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbTabPeople; + + /// + /// lbAuditPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbAuditPerson; + + /// + /// lbFillingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbFillingDate; + + /// + /// lbHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbHandleMan; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Window4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window4; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx new file mode 100644 index 00000000..5ffe97d9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx @@ -0,0 +1,520 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccidentCauseReportSave.aspx.cs" Async="true" Inherits="FineUIPro.Web.ZHGL.Information.AccidentCauseReportSave" %> + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.cs new file mode 100644 index 00000000..61ad983f --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.cs @@ -0,0 +1,1015 @@ +using BLL; +using Model; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class AccidentCauseReportSave : PageBase + { + #region 定义变量 + /// + /// 报表主键Id + /// + public string AccidentCauseReportId + { + get + { + return (string)ViewState["AccidentCauseReportId"]; + } + set + { + ViewState["AccidentCauseReportId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List items = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + items.Clear(); + this.drpMonth.DataTextField = "ConstText"; + drpMonth.DataValueField = "ConstValue"; + drpMonth.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0009); + drpMonth.DataBind(); + this.drpYear.DataTextField = "ConstText"; + drpYear.DataValueField = "ConstValue"; + drpYear.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + drpYear.DataBind(); + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + this.drpUnit.Readonly = true; + string year = Request.QueryString["year"]; + string months = Request.QueryString["month"]; + AccidentCauseReportId = Request.QueryString["AccidentCauseReportId"]; + if (!String.IsNullOrEmpty(AccidentCauseReportId)) + { + var q = BLL.AccidentCauseReportService.GetAccidentCauseReportByAccidentCauseReportId(AccidentCauseReportId); + if (q != null) + { + this.btnCopy.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + if (q.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + else + { + if (q.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + } + if (q.UpState == BLL.Const.UpState_3) + { + this.btnSave.Hidden = true; + this.btnUpdata.Hidden = true; + } + drpMonth.SelectedValue = q.Month.ToString(); + drpYear.SelectedValue = q.Year.ToString(); + lbMonth1.Text = "(" + drpMonth.SelectedText + ")"; + lbMonth2.Text = "(" + drpMonth.SelectedText + ")"; + lbMonth3.Text = "(" + drpMonth.SelectedText + ")"; + if (DateTime.Now.Month == 1) + { + lbLastMonth.Text = "(十二月)"; + } + else + { + int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue); + string lastMonth = (from x in Funs.DB.Sys_Const where x.GroupId == BLL.ConstValue.Group_0009 && Convert.ToInt32(x.ConstValue) == (month - 1) select x.ConstText).FirstOrDefault(); + lbLastMonth.Text = "(" + lastMonth + ")"; + } + drpUnit.SelectedValue = q.UnitId; + txtAccidentCauseReportCode.Text = q.AccidentCauseReportCode; + if (q.DeathAccident != null) + { + txtDeathAccident.Text = q.DeathAccident.ToString(); + } + if (q.DeathToll != null) + { + txtDeathToll.Text = q.DeathToll.ToString(); + } + if (q.InjuredAccident != null) + { + txtInjuredAccident.Text = q.InjuredAccident.ToString(); + } + if (q.InjuredToll != null) + { + txtInjuredToll.Text = q.InjuredToll.ToString(); + } + if (q.MinorWoundAccident != null) + { + txtMinorWoundAccident.Text = q.MinorWoundAccident.ToString(); + } + if (q.MinorWoundToll != null) + { + txtMinorWoundToll.Text = q.MinorWoundToll.ToString(); + } + if (q.AverageTotalHours != null) + { + txtAverageTotalHours.Text = q.AverageTotalHours.ToString(); + } + if (q.AverageManHours != null) + { + txtAverageManHours.Text = q.AverageManHours.ToString(); + } + if (q.TotalLossMan != null) + { + txtTotalLossMan.Text = q.TotalLossMan.ToString(); + } + if (q.LastMonthLossHoursTotal != null) + { + txtLastMonthLossHoursTotal.Text = q.LastMonthLossHoursTotal.ToString(); + } + if (q.KnockOffTotal != null) + { + txtKnockOffTotal.Text = q.KnockOffTotal.ToString(); + } + if (q.DirectLoss != null) + { + txtDirectLoss.Text = q.DirectLoss.ToString(); + } + if (q.IndirectLosses != null) + { + txtIndirectLosses.Text = q.IndirectLosses.ToString(); + } + if (q.TotalLoss != null) + { + txtTotalLoss.Text = q.TotalLoss.ToString(); + } + if (q.TotalLossTime != null) + { + txtTotalLossTime.Text = q.TotalLossTime.ToString(); + } + items = BLL.AccidentCauseReportItemService.GetItemsNoSum(AccidentCauseReportId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + txtFillCompanyPersonCharge.Text = q.FillCompanyPersonCharge; + if (!string.IsNullOrEmpty(q.TabPeople)) + { + txtTabPeople.Text = q.TabPeople; + } + else + { + txtTabPeople.Text = this.CurrUser.PersonName; + } + txtAuditPerson.Text = q.AuditPerson; + if (q.FillingDate != null) + { + txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", q.FillingDate); + } + else + { + txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + } + } + else + { + this.btnCopy.Hidden = false; + //int month = DateTime.Now.Month; + //drpMonth.SelectedValue = drpMonth.SelectedValue = month.ToString(); + //drpYear.SelectedValue = DateTime.Now.Year.ToString(); + drpMonth.SelectedValue = months; + drpYear.SelectedValue = year; + lbMonth1.Text = "(" + drpMonth.SelectedText + ")"; + lbMonth2.Text = "(" + drpMonth.SelectedText + ")"; + lbMonth3.Text = "(" + drpMonth.SelectedText + ")"; + if (DateTime.Now.Month == 1) + { + lbLastMonth.Text = "(十二月)"; + } + else + { + string lastMonth = (from x in Funs.DB.Sys_Const where x.GroupId == BLL.ConstValue.Group_0009 && Convert.ToInt32(x.ConstValue) == (Convert.ToInt32(months) - 1) select x.ConstText).FirstOrDefault(); + lbLastMonth.Text = "(" + lastMonth + ")"; ; + } + //获取项目报告集合 + List accidentCauseReports = (from x in Funs.DB.InformationProject_AccidentCauseReport where x.Year.ToString() == year && x.Month.ToString() == months && x.States == BLL.Const.State_2 select x).ToList(); + if (accidentCauseReports.Count > 0) + { + txtDeathAccident.Text = accidentCauseReports.Sum(x => x.DeathAccident ?? 0).ToString(); + txtDeathToll.Text = accidentCauseReports.Sum(x => x.DeathToll ?? 0).ToString(); + txtInjuredAccident.Text = accidentCauseReports.Sum(x => x.InjuredAccident ?? 0).ToString(); + txtInjuredToll.Text = accidentCauseReports.Sum(x => x.InjuredToll ?? 0).ToString(); + txtMinorWoundAccident.Text = accidentCauseReports.Sum(x => x.MinorWoundAccident ?? 0).ToString(); + txtMinorWoundToll.Text = accidentCauseReports.Sum(x => x.MinorWoundToll ?? 0).ToString(); + txtAverageTotalHours.Text = accidentCauseReports.Sum(x => x.AverageTotalHours ?? 0).ToString(); + txtAverageManHours.Text = accidentCauseReports.Sum(x => x.AverageManHours ?? 0).ToString(); + txtTotalLossMan.Text = accidentCauseReports.Sum(x => x.TotalLossMan ?? 0).ToString(); + txtLastMonthLossHoursTotal.Text = accidentCauseReports.Sum(x => x.LastMonthLossHoursTotal ?? 0).ToString(); + txtKnockOffTotal.Text = accidentCauseReports.Sum(x => x.KnockOffTotal ?? 0).ToString(); + txtDirectLoss.Text = accidentCauseReports.Sum(x => x.DirectLoss ?? 0).ToString(); + txtIndirectLosses.Text = accidentCauseReports.Sum(x => x.IndirectLosses ?? 0).ToString(); + txtTotalLoss.Text = accidentCauseReports.Sum(x => x.TotalLoss ?? 0).ToString(); + txtTotalLossTime.Text = accidentCauseReports.Sum(x => x.TotalLossTime ?? 0).ToString(); + } + List accidentCauseReportIds = accidentCauseReports.Select(x => x.AccidentCauseReportId).ToList(); + List projectItems = (from x in Funs.DB.InformationProject_AccidentCauseReportItem where accidentCauseReportIds.Contains(x.AccidentCauseReportId) select x).ToList(); + var accidentTypes = BLL.ConstValue.drpConstItemList(BLL.ConstValue.Group_0012); + foreach (var a in accidentTypes) + { + if (a.ConstText != "总计") + { + Model.Information_AccidentCauseReportItem item = new Model.Information_AccidentCauseReportItem + { + AccidentCauseReportItemId = SQLHelper.GetNewID(typeof(Model.Information_AccidentCauseReportItem)), + AccidentType = a.ConstText + }; + if (projectItems.Count > 0) + { + item.TotalDeath = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.TotalDeath ?? 0); + item.TotalInjuries = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.TotalInjuries ?? 0); + item.TotalMinorInjuries = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.TotalMinorInjuries ?? 0); + item.Death1 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death1 ?? 0); + item.Injuries1 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries1 ?? 0); + item.MinorInjuries1 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries1 ?? 0); + item.Death2 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death2 ?? 0); + item.Injuries2 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries2 ?? 0); + item.MinorInjuries2 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries2 ?? 0); + item.Death3 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death3 ?? 0); + item.Injuries3 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries3 ?? 0); + item.MinorInjuries3 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries3 ?? 0); + item.Death4 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death4 ?? 0); + item.Injuries4 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries4 ?? 0); + item.MinorInjuries4 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries4 ?? 0); + item.Death5 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death5 ?? 0); + item.Injuries5 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries5 ?? 0); + item.MinorInjuries5 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries5 ?? 0); + item.Death6 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death6 ?? 0); + item.Injuries6 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries6 ?? 0); + item.MinorInjuries6 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries6 ?? 0); + item.Death7 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death7 ?? 0); + item.Injuries7 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries7 ?? 0); + item.MinorInjuries7 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries7 ?? 0); + item.Death8 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death8 ?? 0); + item.Injuries8 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries8 ?? 0); + item.MinorInjuries8 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries8 ?? 0); + item.Death9 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death9 ?? 0); + item.Injuries9 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries9 ?? 0); + item.MinorInjuries9 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries9 ?? 0); + item.Death10 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death10 ?? 0); + item.Injuries10 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries10 ?? 0); + item.MinorInjuries10 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries10 ?? 0); + item.Death11 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Death11 ?? 0); + item.Injuries11 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.Injuries11 ?? 0); + item.MinorInjuries11 = projectItems.Where(x => x.AccidentType == item.AccidentType).Sum(x => x.MinorInjuries11 ?? 0); + } + items.Add(item); + } + } + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + txtTabPeople.Text = this.CurrUser.PersonName; + txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + } + } + #endregion + + #region 关闭窗口 + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + Model.Information_AccidentCauseReport report = BLL.AccidentCauseReportService.GetAccidentCauseReportByAccidentCauseReportId(AccidentCauseReportId); + if (report.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + } + } + #endregion + + #region 保存、提交、上报 + /// + /// 保存 + /// + /// + private void Save(string type) + { + Model.Information_AccidentCauseReport accidentCauseReport = new Information_AccidentCauseReport + { + //string accidentCauseReportId = Request.QueryString["AccidentCauseReportId"]; + UnitId = drpUnit.SelectedValue, + AccidentCauseReportCode = txtAccidentCauseReportCode.Text.Trim(), + Year = Funs.GetNewIntOrZero(drpYear.SelectedValue), + Month = Funs.GetNewIntOrZero(drpMonth.SelectedValue) + }; + if (!string.IsNullOrEmpty(txtDeathAccident.Text.Trim())) + { + accidentCauseReport.DeathAccident = Funs.GetNewIntOrZero(txtDeathAccident.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtDeathToll.Text.Trim())) + { + accidentCauseReport.DeathToll = Funs.GetNewIntOrZero(txtDeathToll.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtInjuredAccident.Text.Trim())) + { + accidentCauseReport.InjuredAccident = Funs.GetNewIntOrZero(txtInjuredAccident.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtInjuredToll.Text.Trim())) + { + accidentCauseReport.InjuredToll = Funs.GetNewIntOrZero(txtInjuredToll.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtMinorWoundAccident.Text.Trim())) + { + accidentCauseReport.MinorWoundAccident = Funs.GetNewIntOrZero(txtMinorWoundAccident.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtMinorWoundToll.Text.Trim())) + { + accidentCauseReport.MinorWoundToll = Funs.GetNewIntOrZero(txtMinorWoundToll.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtAverageTotalHours.Text.Trim())) + { + accidentCauseReport.AverageTotalHours = Funs.GetNewDecimalOrZero(txtAverageTotalHours.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtAverageManHours.Text.Trim())) + { + accidentCauseReport.AverageManHours = Funs.GetNewIntOrZero(txtAverageManHours.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtTotalLossMan.Text.Trim())) + { + accidentCauseReport.TotalLossMan = Funs.GetNewIntOrZero(txtTotalLossMan.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtLastMonthLossHoursTotal.Text.Trim())) + { + accidentCauseReport.LastMonthLossHoursTotal = Funs.GetNewIntOrZero(txtLastMonthLossHoursTotal.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtKnockOffTotal.Text.Trim())) + { + accidentCauseReport.KnockOffTotal = Funs.GetNewIntOrZero(txtKnockOffTotal.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtDirectLoss.Text.Trim())) + { + accidentCauseReport.DirectLoss = Funs.GetNewIntOrZero(txtDirectLoss.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtIndirectLosses.Text.Trim())) + { + accidentCauseReport.IndirectLosses = Funs.GetNewIntOrZero(txtIndirectLosses.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtTotalLoss.Text.Trim())) + { + accidentCauseReport.TotalLoss = Funs.GetNewIntOrZero(txtTotalLoss.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtTotalLossTime.Text.Trim())) + { + accidentCauseReport.TotalLossTime = Funs.GetNewIntOrZero(txtTotalLossTime.Text.Trim()); + } + accidentCauseReport.FillCompanyPersonCharge = txtFillCompanyPersonCharge.Text.Trim(); + accidentCauseReport.TabPeople = txtTabPeople.Text.Trim(); + accidentCauseReport.AuditPerson = txtAuditPerson.Text.Trim(); + if (!string.IsNullOrEmpty(txtFillingDate.Text.Trim())) + { + accidentCauseReport.FillingDate = Convert.ToDateTime(txtFillingDate.Text.Trim()); + } + if (String.IsNullOrEmpty(AccidentCauseReportId)) + { + Model.Information_AccidentCauseReport old = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (old == null) + { + this.AccidentCauseReportId = SQLHelper.GetNewID(typeof(Model.Information_AccidentCauseReport)); + accidentCauseReport.AccidentCauseReportId = this.AccidentCauseReportId; + accidentCauseReport.UpState = BLL.Const.UpState_2; + accidentCauseReport.HandleState = BLL.Const.HandleState_1; + accidentCauseReport.HandleMan = this.CurrUser.PersonId; + BLL.AccidentCauseReportService.AddAccidentCauseReport(accidentCauseReport); + BLL.LogService.AddSys_Log(this.CurrUser, accidentCauseReport.AccidentCauseReportCode, accidentCauseReport.AccidentCauseReportId, BLL.Const.AccidentCauseReportMenuId, BLL.Const.BtnAdd); + } + else + { + ShowNotify("该月份记录已存在!"); + return; + } + } + else + { + Model.Information_AccidentCauseReport oldReport = BLL.AccidentCauseReportService.GetAccidentCauseReportByAccidentCauseReportId(AccidentCauseReportId); + if (oldReport != null) + { + accidentCauseReport.HandleMan = oldReport.HandleMan; + accidentCauseReport.HandleState = oldReport.HandleState; + } + accidentCauseReport.AccidentCauseReportId = AccidentCauseReportId; + accidentCauseReport.UpState = BLL.Const.UpState_2; + BLL.AccidentCauseReportService.UpdateAccidentCauseReport(accidentCauseReport); + BLL.LogService.AddSys_Log(this.CurrUser, accidentCauseReport.AccidentCauseReportCode, accidentCauseReport.AccidentCauseReportId, BLL.Const.AccidentCauseReportMenuId, BLL.Const.BtnModify); + BLL.AccidentCauseReportItemService.DeleteAccidentCauseReportItemByAccidentCauseReportId(AccidentCauseReportId); + } + AddItems(accidentCauseReport.AccidentCauseReportId); + if (type == "updata") //保存并上报 + { + if (accidentCauseReport.UpState == BLL.Const.UpState_2) + { + string code = CNCECHSSEWebService.UpAccidentCauseReport(accidentCauseReport.AccidentCauseReportId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + else + { + ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning); + return; + } + } + if (type == "submit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=AccidentCauseReport&Id={0}", accidentCauseReport.AccidentCauseReportId, "编辑 - "))); + } + if (type != "submit") + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + protected void btnUpdata_Click(object sender, EventArgs e) + { + Save("updata"); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save("submit"); + } + + private void AddItems(string accidentCauseReportId) + { + int Death1 = 0, Injuries1 = 0, MinorInjuries1 = 0, Death2 = 0, Injuries2 = 0, MinorInjuries2 = 0, Death3 = 0, Injuries3 = 0, MinorInjuries3 = 0, + Death4 = 0, Injuries4 = 0, MinorInjuries4 = 0, Death5 = 0, Injuries5 = 0, MinorInjuries5 = 0, Death6 = 0, Injuries6 = 0, MinorInjuries6 = 0, + Death7 = 0, Injuries7 = 0, MinorInjuries7 = 0, Death8 = 0, Injuries8 = 0, MinorInjuries8 = 0, Death9 = 0, Injuries9 = 0, MinorInjuries9 = 0, + Death10 = 0, Injuries10 = 0, MinorInjuries10 = 0, Death11 = 0, Injuries11 = 0, MinorInjuries11 = 0; + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + if (values["AccidentType"].ToString() != "") + { + int sumD = 0, sumI = 0, sumM = 0; + Model.Information_AccidentCauseReportItem item = items.FirstOrDefault(x => x.AccidentType == values["AccidentType"].ToString()); + if (values["Death1"].ToString() != "") + { + item.Death1 = values.Value("Death1"); + Death1 += values.Value("Death1"); + sumD += values.Value("Death1"); + } + if (values["Injuries1"].ToString() != "") + { + item.Injuries1 = values.Value("Injuries1"); + Injuries1 += values.Value("Injuries1"); + sumI += values.Value("Injuries1"); + } + if (values["MinorInjuries1"].ToString() != "") + { + item.MinorInjuries1 = values.Value("MinorInjuries1"); + MinorInjuries1 += values.Value("MinorInjuries1"); + sumM += values.Value("MinorInjuries1"); + } + if (values["Death2"].ToString() != "") + { + item.Death2 = values.Value("Death2"); + Death2 += values.Value("Death2"); + sumD += values.Value("Death2"); + } + if (values["Injuries2"].ToString() != "") + { + item.Injuries2 = values.Value("Injuries2"); + Injuries2 += values.Value("Injuries2"); + sumI += values.Value("Injuries2"); + } + if (values["MinorInjuries2"].ToString() != "") + { + item.MinorInjuries2 = values.Value("MinorInjuries2"); + MinorInjuries2 += values.Value("MinorInjuries2"); + sumM += values.Value("MinorInjuries2"); + } + if (values["Death3"].ToString() != "") + { + item.Death3 = values.Value("Death3"); + Death3 += values.Value("Death3"); + sumD += values.Value("Death3"); + } + if (values["Injuries3"].ToString() != "") + { + item.Injuries3 = values.Value("Injuries3"); + Injuries3 += values.Value("Injuries3"); + sumI += values.Value("Injuries3"); + } + if (values["MinorInjuries3"].ToString() != "") + { + item.MinorInjuries3 = values.Value("MinorInjuries3"); + MinorInjuries3 += values.Value("MinorInjuries3"); + sumM += values.Value("MinorInjuries3"); + } + if (values["Death4"].ToString() != "") + { + item.Death4 = values.Value("Death4"); + Death4 += values.Value("Death4"); + sumD += values.Value("Death4"); + } + if (values["Injuries4"].ToString() != "") + { + item.Injuries4 = values.Value("Injuries4"); + Injuries4 += values.Value("Injuries4"); + sumI += values.Value("Injuries4"); + } + if (values["MinorInjuries4"].ToString() != "") + { + item.MinorInjuries4 = values.Value("MinorInjuries4"); + MinorInjuries4 += values.Value("MinorInjuries4"); + sumM += values.Value("MinorInjuries4"); + } + if (values["Death5"].ToString() != "") + { + item.Death5 = values.Value("Death5"); + Death5 += values.Value("Death5"); + sumD += values.Value("Death5"); + } + if (values["Injuries5"].ToString() != "") + { + item.Injuries5 = values.Value("Injuries5"); + Injuries5 += values.Value("Injuries5"); + sumI += values.Value("Injuries5"); + } + if (values["MinorInjuries5"].ToString() != "") + { + item.MinorInjuries5 = values.Value("MinorInjuries5"); + MinorInjuries5 += values.Value("MinorInjuries5"); + sumM += values.Value("MinorInjuries5"); + } + if (values["Death6"].ToString() != "") + { + item.Death6 = values.Value("Death6"); + Death6 += values.Value("Death6"); + sumD += values.Value("Death6"); + } + if (values["Injuries6"].ToString() != "") + { + item.Injuries6 = values.Value("Injuries6"); + Injuries6 += values.Value("Injuries6"); + sumI += values.Value("Injuries6"); + } + if (values["MinorInjuries6"].ToString() != "") + { + item.MinorInjuries6 = values.Value("MinorInjuries6"); + MinorInjuries6 += values.Value("MinorInjuries6"); + sumM += values.Value("MinorInjuries6"); + } + if (values["Death7"].ToString() != "") + { + item.Death7 = values.Value("Death7"); + Death7 += values.Value("Death7"); + sumD += values.Value("Death7"); + } + if (values["Injuries7"].ToString() != "") + { + item.Injuries7 = values.Value("Injuries7"); + Injuries7 += values.Value("Injuries7"); + sumI += values.Value("Injuries7"); + } + if (values["MinorInjuries7"].ToString() != "") + { + item.MinorInjuries7 = values.Value("MinorInjuries7"); + MinorInjuries7 += values.Value("MinorInjuries7"); + sumM += values.Value("MinorInjuries7"); + } + if (values["Death8"].ToString() != "") + { + item.Death8 = values.Value("Death8"); + Death8 += values.Value("Death8"); + sumD += values.Value("Death8"); + } + if (values["Injuries8"].ToString() != "") + { + item.Injuries8 = values.Value("Injuries8"); + Injuries8 += values.Value("Injuries8"); + sumI += values.Value("Injuries8"); + } + if (values["MinorInjuries8"].ToString() != "") + { + item.MinorInjuries8 = values.Value("MinorInjuries8"); + MinorInjuries8 += values.Value("MinorInjuries8"); + sumM += values.Value("MinorInjuries8"); + } + if (values["Death9"].ToString() != "") + { + item.Death9 = values.Value("Death9"); + Death9 += values.Value("Death9"); + sumD += values.Value("Death9"); + } + if (values["Injuries9"].ToString() != "") + { + item.Injuries9 = values.Value("Injuries9"); + Injuries9 += values.Value("Injuries9"); + sumI += values.Value("Injuries9"); + } + if (values["MinorInjuries9"].ToString() != "") + { + item.MinorInjuries9 = values.Value("MinorInjuries9"); + MinorInjuries9 += values.Value("MinorInjuries9"); + sumM += values.Value("MinorInjuries9"); + } + if (values["Death10"].ToString() != "") + { + item.Death10 = values.Value("Death10"); + Death10 += values.Value("Death10"); + sumD += values.Value("Death10"); + } + if (values["Injuries10"].ToString() != "") + { + item.Injuries10 = values.Value("Injuries10"); + Injuries10 += values.Value("Injuries10"); + sumI += values.Value("Injuries10"); + } + if (values["MinorInjuries10"].ToString() != "") + { + item.MinorInjuries10 = values.Value("MinorInjuries10"); + MinorInjuries10 += values.Value("MinorInjuries10"); + sumM += values.Value("MinorInjuries10"); + } + if (values["Death11"].ToString() != "") + { + item.Death11 = values.Value("Death11"); + Death11 += values.Value("Death11"); + sumD += values.Value("Death11"); + } + if (values["Injuries11"].ToString() != "") + { + item.Injuries11 = values.Value("Injuries11"); + Injuries11 += values.Value("Injuries11"); + sumI += values.Value("Injuries11"); + } + if (values["MinorInjuries11"].ToString() != "") + { + item.MinorInjuries11 = values.Value("MinorInjuries11"); + MinorInjuries11 += values.Value("MinorInjuries11"); + sumM += values.Value("MinorInjuries11"); + } + item.TotalDeath = sumD; + item.TotalInjuries = sumI; + item.TotalMinorInjuries = sumM; + } + } + Model.Information_AccidentCauseReportItem totalItem = new Model.Information_AccidentCauseReportItem + { + AccidentCauseReportItemId = SQLHelper.GetNewID(typeof(Model.Information_AccidentCauseReportItem)), + AccidentType = "总计", + TotalDeath = Death1 + Death2 + Death3 + Death4 + Death5 + Death6 + Death7 + Death8 + Death9 + Death10 + Death11, + TotalInjuries = Injuries1 + Injuries2 + Injuries3 + Injuries4 + Injuries5 + Injuries6 + Injuries7 + Injuries8 + Injuries9 + Injuries10 + Injuries11, + TotalMinorInjuries = MinorInjuries1 + MinorInjuries2 + MinorInjuries3 + MinorInjuries4 + MinorInjuries5 + MinorInjuries6 + MinorInjuries7 + MinorInjuries8 + MinorInjuries9 + MinorInjuries10 + MinorInjuries11, + Death1 = Death1, + Death2 = Death2, + Death3 = Death3, + Death4 = Death4, + Death5 = Death5, + Death6 = Death6, + Death7 = Death7, + Death8 = Death8, + Death9 = Death9, + Death10 = Death10, + Death11 = Death11, + Injuries1 = Injuries1, + Injuries2 = Injuries2, + Injuries3 = Injuries3, + Injuries4 = Injuries4, + Injuries5 = Injuries5, + Injuries6 = Injuries6, + Injuries7 = Injuries7, + Injuries8 = Injuries8, + Injuries9 = Injuries9, + Injuries10 = Injuries10, + Injuries11 = Injuries11, + MinorInjuries1 = MinorInjuries1, + MinorInjuries2 = MinorInjuries2, + MinorInjuries3 = MinorInjuries3, + MinorInjuries4 = MinorInjuries4, + MinorInjuries5 = MinorInjuries5, + MinorInjuries6 = MinorInjuries6, + MinorInjuries7 = MinorInjuries7, + MinorInjuries8 = MinorInjuries8, + MinorInjuries9 = MinorInjuries9, + MinorInjuries10 = MinorInjuries10, + MinorInjuries11 = MinorInjuries11 + }; + items.Add(totalItem); + foreach (var item in items) + { + item.AccidentCauseReportId = accidentCauseReportId; + BLL.AccidentCauseReportItemService.AddAccidentCauseReportItem(item); + } + } + #endregion + + #region 月份下拉事件 + /// + /// 月份下拉事件 + /// + /// + /// + protected void drpMonth_SelectedIndexChanged(object sender, EventArgs e) + { + lbMonth1.Text = "(" + drpMonth.SelectedText + ")"; + lbMonth2.Text = "(" + drpMonth.SelectedText + ")"; + lbMonth3.Text = "(" + drpMonth.SelectedText + ")"; + if (drpMonth.SelectedValue == "1") + { + lbLastMonth.Text = "(十二月)"; + } + else + { + int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue); + string lastMonth = (from x in Funs.DB.Sys_Const where x.GroupId == BLL.ConstValue.Group_0009 && Convert.ToInt32(x.ConstValue) == (month - 1) select x.ConstText).FirstOrDefault(); + lbLastMonth.Text = "(" + lastMonth + ")"; + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.AccidentCauseReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnCopy.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnSaveUp)) + //{ + // this.btnUpdata.Hidden = false; + //} + if (buttonList.Contains(BLL.Const.BtnSubmit)) + { + this.btnSubmit.Hidden = false; + } + } + } + #endregion + + #region 复制上月数据 + /// + /// 复制上月报表数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + showDate = nowDate.Value.AddMonths(-1); + Model.Information_AccidentCauseReport accidentCauseReport = BLL.AccidentCauseReportService.GetAccidentCauseReportByUnitIdAndYearAndMonth(this.drpUnit.SelectedValue, showDate.Year, showDate.Month); + if (accidentCauseReport != null) + { + Model.Information_AccidentCauseReport newAccidentCauseReport = new Information_AccidentCauseReport(); + this.AccidentCauseReportId = SQLHelper.GetNewID(typeof(Model.Information_AccidentCauseReport)); + newAccidentCauseReport.AccidentCauseReportId = this.AccidentCauseReportId; + newAccidentCauseReport.UnitId = this.drpUnit.SelectedValue; + newAccidentCauseReport.AccidentCauseReportCode = accidentCauseReport.AccidentCauseReportCode; + newAccidentCauseReport.Year = Convert.ToInt32(this.drpYear.SelectedValue); + newAccidentCauseReport.Month = Convert.ToInt32(this.drpMonth.SelectedValue); + newAccidentCauseReport.DeathAccident = accidentCauseReport.DeathAccident; + newAccidentCauseReport.DeathToll = accidentCauseReport.DeathToll; + newAccidentCauseReport.InjuredAccident = accidentCauseReport.InjuredAccident; + newAccidentCauseReport.InjuredToll = accidentCauseReport.InjuredToll; + newAccidentCauseReport.MinorWoundAccident = accidentCauseReport.MinorWoundAccident; + newAccidentCauseReport.MinorWoundToll = accidentCauseReport.MinorWoundToll; + newAccidentCauseReport.AverageTotalHours = accidentCauseReport.AverageTotalHours; + newAccidentCauseReport.AverageManHours = accidentCauseReport.AverageManHours; + newAccidentCauseReport.TotalLossMan = accidentCauseReport.TotalLossMan; + newAccidentCauseReport.LastMonthLossHoursTotal = accidentCauseReport.LastMonthLossHoursTotal; + newAccidentCauseReport.KnockOffTotal = accidentCauseReport.KnockOffTotal; + newAccidentCauseReport.DirectLoss = accidentCauseReport.DirectLoss; + newAccidentCauseReport.IndirectLosses = accidentCauseReport.IndirectLosses; + newAccidentCauseReport.TotalLoss = accidentCauseReport.TotalLoss; + newAccidentCauseReport.TotalLossTime = accidentCauseReport.TotalLossTime; + newAccidentCauseReport.FillCompanyPersonCharge = accidentCauseReport.FillCompanyPersonCharge; + newAccidentCauseReport.TabPeople = accidentCauseReport.TabPeople; + newAccidentCauseReport.AuditPerson = accidentCauseReport.AuditPerson; + newAccidentCauseReport.FillingDate = DateTime.Now; + newAccidentCauseReport.UpState = BLL.Const.UpState_2; + newAccidentCauseReport.HandleState = BLL.Const.HandleState_1; + newAccidentCauseReport.HandleMan = this.CurrUser.PersonId; + BLL.AccidentCauseReportService.AddAccidentCauseReport(newAccidentCauseReport); + + items = BLL.AccidentCauseReportItemService.GetItems(accidentCauseReport.AccidentCauseReportId); + if (items.Count > 0) + { + foreach (var item in items) + { + Model.Information_AccidentCauseReportItem newItem = new Information_AccidentCauseReportItem + { + AccidentCauseReportItemId = SQLHelper.GetNewID(typeof(Model.Information_AccidentCauseReportItem)), + AccidentCauseReportId = this.AccidentCauseReportId, + AccidentType = item.AccidentType, + TotalDeath = item.TotalDeath, + TotalInjuries = item.TotalInjuries, + TotalMinorInjuries = item.TotalMinorInjuries, + Death1 = item.Death1, + Injuries1 = item.Injuries1, + MinorInjuries1 = item.MinorInjuries1, + Death2 = item.Death2, + Injuries2 = item.Injuries2, + MinorInjuries2 = item.MinorInjuries2, + Death3 = item.Death3, + Injuries3 = item.Injuries3, + MinorInjuries3 = item.MinorInjuries3, + Death4 = item.Death4, + Injuries4 = item.Injuries4, + MinorInjuries4 = item.MinorInjuries4, + Death5 = item.Death5, + Injuries5 = item.Injuries5, + MinorInjuries5 = item.MinorInjuries5, + Death6 = item.Death6, + Injuries6 = item.Injuries6, + MinorInjuries6 = item.MinorInjuries6, + Death7 = item.Death7, + Injuries7 = item.Injuries7, + MinorInjuries7 = item.MinorInjuries7, + Death8 = item.Death8, + Injuries8 = item.Injuries8, + MinorInjuries8 = item.MinorInjuries8, + Death9 = item.Death9, + Injuries9 = item.Injuries9, + MinorInjuries9 = item.MinorInjuries9, + Death10 = item.Death10, + Injuries10 = item.Injuries10, + MinorInjuries10 = item.MinorInjuries10, + Death11 = item.Death11, + Injuries11 = item.Injuries11, + MinorInjuries11 = item.MinorInjuries11 + }; + BLL.AccidentCauseReportItemService.AddAccidentCauseReportItem(newItem); + } + } + GetValues(newAccidentCauseReport.AccidentCauseReportId); + } + } + } + + /// + /// 获取复制的值加载到页面 + /// + private void GetValues(string accidentCauseReportId) + { + var q = BLL.AccidentCauseReportService.GetAccidentCauseReportByAccidentCauseReportId(accidentCauseReportId); + if (q != null) + { + drpMonth.SelectedValue = q.Month.ToString(); + drpYear.SelectedValue = q.Year.ToString(); + lbMonth1.Text = "(" + drpMonth.SelectedText + ")"; + lbMonth2.Text = "(" + drpMonth.SelectedText + ")"; + lbMonth3.Text = "(" + drpMonth.SelectedText + ")"; + if (DateTime.Now.Month == 1) + { + lbLastMonth.Text = "(十二月)"; + } + else + { + int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue); + string lastMonth = (from x in Funs.DB.Sys_Const where x.GroupId == BLL.ConstValue.Group_0009 && Convert.ToInt32(x.ConstValue) == (month - 1) select x.ConstText).FirstOrDefault(); + lbLastMonth.Text = "(" + lastMonth + ")"; + } + drpUnit.SelectedValue = q.UnitId; + txtAccidentCauseReportCode.Text = q.AccidentCauseReportCode; + if (q.DeathAccident != null) + { + txtDeathAccident.Text = q.DeathAccident.ToString(); + } + if (q.DeathToll != null) + { + txtDeathToll.Text = q.DeathToll.ToString(); + } + if (q.InjuredAccident != null) + { + txtInjuredAccident.Text = q.InjuredAccident.ToString(); + } + if (q.InjuredToll != null) + { + txtInjuredToll.Text = q.InjuredToll.ToString(); + } + if (q.MinorWoundAccident != null) + { + txtMinorWoundAccident.Text = q.MinorWoundAccident.ToString(); + } + if (q.MinorWoundToll != null) + { + txtMinorWoundToll.Text = q.MinorWoundToll.ToString(); + } + if (q.AverageTotalHours != null) + { + txtAverageTotalHours.Text = q.AverageTotalHours.ToString(); + } + if (q.AverageManHours != null) + { + txtAverageManHours.Text = q.AverageManHours.ToString(); + } + if (q.TotalLossMan != null) + { + txtTotalLossMan.Text = q.TotalLossMan.ToString(); + } + if (q.LastMonthLossHoursTotal != null) + { + txtLastMonthLossHoursTotal.Text = q.LastMonthLossHoursTotal.ToString(); + } + if (q.KnockOffTotal != null) + { + txtKnockOffTotal.Text = q.KnockOffTotal.ToString(); + } + if (q.DirectLoss != null) + { + txtDirectLoss.Text = q.DirectLoss.ToString(); + } + if (q.IndirectLosses != null) + { + txtIndirectLosses.Text = q.IndirectLosses.ToString(); + } + if (q.TotalLoss != null) + { + txtTotalLoss.Text = q.TotalLoss.ToString(); + } + if (q.TotalLossTime != null) + { + txtTotalLossTime.Text = q.TotalLossTime.ToString(); + } + items = BLL.AccidentCauseReportItemService.GetItemsNoSum(AccidentCauseReportId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + txtFillCompanyPersonCharge.Text = q.FillCompanyPersonCharge; + if (!string.IsNullOrEmpty(q.TabPeople)) + { + txtTabPeople.Text = q.TabPeople; + } + else + { + txtTabPeople.Text = this.CurrUser.PersonName; + } + txtAuditPerson.Text = q.AuditPerson; + if (q.FillingDate != null) + { + txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", q.FillingDate); + } + else + { + txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + } + + items = BLL.AccidentCauseReportItemService.GetItems(accidentCauseReportId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.designer.cs new file mode 100644 index 00000000..06a9cb3e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/AccidentCauseReportSave.aspx.designer.cs @@ -0,0 +1,915 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class AccidentCauseReportSave { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpMonth 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpMonth; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label2; + + /// + /// txtAccidentCauseReportCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAccidentCauseReportCode; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label4; + + /// + /// lbMonth1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbMonth1; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label5; + + /// + /// txtDeathAccident 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeathAccident; + + /// + /// Label6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label6; + + /// + /// txtDeathToll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeathToll; + + /// + /// Label7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label7; + + /// + /// txtInjuredAccident 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuredAccident; + + /// + /// Label8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label8; + + /// + /// txtInjuredToll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuredToll; + + /// + /// Label9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label9; + + /// + /// txtMinorWoundAccident 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorWoundAccident; + + /// + /// Label10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label10; + + /// + /// txtMinorWoundToll 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorWoundToll; + + /// + /// Label11 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label11; + + /// + /// Label12 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label12; + + /// + /// lbMonth2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbMonth2; + + /// + /// Label14 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label14; + + /// + /// txtAverageTotalHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAverageTotalHours; + + /// + /// Label15 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label15; + + /// + /// txtAverageManHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAverageManHours; + + /// + /// Label16 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label16; + + /// + /// Label21 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label21; + + /// + /// txtTotalLossMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalLossMan; + + /// + /// Label23 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label23; + + /// + /// lbLastMonth 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbLastMonth; + + /// + /// Label24 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label24; + + /// + /// txtLastMonthLossHoursTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtLastMonthLossHoursTotal; + + /// + /// Label25 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label25; + + /// + /// Label13 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label13; + + /// + /// lbMonth3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbMonth3; + + /// + /// Label17 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label17; + + /// + /// txtKnockOffTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtKnockOffTotal; + + /// + /// Label20 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label20; + + /// + /// Label18 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label18; + + /// + /// txtDirectLoss 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDirectLoss; + + /// + /// Label22 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label22; + + /// + /// txtIndirectLosses 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtIndirectLosses; + + /// + /// Label26 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label26; + + /// + /// txtTotalLoss 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalLoss; + + /// + /// Label19 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label19; + + /// + /// Label27 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label27; + + /// + /// txtTotalLossTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalLossTime; + + /// + /// Label28 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label28; + + /// + /// too3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar too3; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtDeath1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath1; + + /// + /// txtInjuries1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries1; + + /// + /// txtMinorInjuries1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries1; + + /// + /// txtDeath2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath2; + + /// + /// txtInjuries2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries2; + + /// + /// txtMinorInjuries2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries2; + + /// + /// txtDeath3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath3; + + /// + /// txtInjuries3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries3; + + /// + /// txtMinorInjuries3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries3; + + /// + /// txtDeath4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath4; + + /// + /// txtInjuries4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries4; + + /// + /// txtMinorInjuries4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries4; + + /// + /// txtDeath5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath5; + + /// + /// txtInjuries5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries5; + + /// + /// txtMinorInjuries5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries5; + + /// + /// txtDeath6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath6; + + /// + /// txtInjuries6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries6; + + /// + /// txtMinorInjuries6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries6; + + /// + /// txtDeath7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath7; + + /// + /// txtInjuries7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries7; + + /// + /// txtMinorInjuries7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries7; + + /// + /// txtDeath8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath8; + + /// + /// txtInjuries8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries8; + + /// + /// txtMinorInjuries8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries8; + + /// + /// txtDeath9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath9; + + /// + /// txtInjuries9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries9; + + /// + /// txtMinorInjuries9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries9; + + /// + /// txtDeath10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath10; + + /// + /// txtInjuries10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries10; + + /// + /// txtMinorInjuries10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries10; + + /// + /// txtDeath11 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDeath11; + + /// + /// txtInjuries11 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtInjuries11; + + /// + /// txtMinorInjuries11 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorInjuries11; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtFillCompanyPersonCharge 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFillCompanyPersonCharge; + + /// + /// txtTabPeople 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTabPeople; + + /// + /// txtAuditPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAuditPerson; + + /// + /// txtFillingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtFillingDate; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx new file mode 100644 index 00000000..f99a5777 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx @@ -0,0 +1,219 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillConductedQuarterlyReport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.DrillConductedQuarterlyReport" %> + + + + + + + 应急演练开展情况季报表 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx.cs new file mode 100644 index 00000000..00bf2518 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx.cs @@ -0,0 +1,748 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class DrillConductedQuarterlyReport : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string DrillConductedQuarterlyReportId + { + get + { + return (string)ViewState["DrillConductedQuarterlyReportId"]; + } + set + { + ViewState["DrillConductedQuarterlyReportId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List drillConductedQuarterlyReportItems = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BLL.ConstValue.InitConstValueDropDownList(this.drpQuarter, ConstValue.Group_0011, false); + BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false); + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + this.drpUnit.Readonly = true; + DateTime showDate = System.DateTime.Now.AddMonths(-3); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + this.drpYear.SelectedValue = showDate.Year.ToString(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + GetValue(); + } + } + #endregion + + #region 清空文本框 + private void SetEmpty() + { + this.SimpleForm1.Title = string.Empty; + txtUnitName.Text = string.Empty; + txtQuarter.Text = string.Empty; + txtCompileDate.Text = string.Empty; + this.lbHandleMan.Text = string.Empty; + Grid1.DataSource = null; + Grid1.DataBind(); + + this.OutputSummaryData(); + } + #endregion + + #region 获取记录值 + private void GetValue() + { + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(drpQuarter.SelectedValue); + this.DrillConductedQuarterlyReportId = string.Empty; + Model.View_Information_DrillConductedQuarterlyReport report = Funs.DB.View_Information_DrillConductedQuarterlyReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarter == quarter && e.YearId == year); + if (report != null) + { + string state = string.Empty; + if (report.UpState == BLL.Const.UpState_3) + { + state = "(已上报)"; + } + else + { + if (report.HandleState == BLL.Const.HandleState_1) + { + state = "(待提交)"; + } + else if (report.HandleState == BLL.Const.HandleState_2) + { + state = "(待审核)"; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + state = "(待审批)"; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + state = "(待上报)"; + } + } + this.SimpleForm1.Title = "应急演练开展情况季报表" + state; + this.DrillConductedQuarterlyReportId = report.DrillConductedQuarterlyReportId; + txtUnitName.Text = "单位:" + report.UnitName; + txtQuarter.Text = "季度:" + report.Quarters; + if (report.HandleState == BLL.Const.HandleState_1 || report.UpState == BLL.Const.UpState_3) + { + this.lbHandleMan.Hidden = true; + } + else + { + this.lbHandleMan.Hidden = false; + this.lbHandleMan.Text = "下一步办理人:" + report.UserName; + } + if (report.ReportDate != null) + { + txtCompileDate.Text = "制表时间:" + string.Format("{0:yyyy-MM-dd}", report.ReportDate); + } + BindGrid1(); + } + else + { + SetEmpty(); + } + this.GetButtonPower(); + } + #endregion + + #region 加载Grid + private void BindGrid1() + { + string strSql = "select * from dbo.Information_DrillConductedQuarterlyReportItem where DrillConductedQuarterlyReportId = @DrillConductedQuarterlyReportId order by SortIndex"; + SqlParameter[] parameter = new SqlParameter[] + { + new SqlParameter("@DrillConductedQuarterlyReportId",this.DrillConductedQuarterlyReportId), + }; + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + OutputSummaryData(); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 计算合计 + /// + private void OutputSummaryData() + { + int totalConductCount = 0;//总体情况(举办次数) + int totalPeopleCount = 0;//总体情况(参演人数) + decimal totalTotalInvestment = 0;//总体情况(直接投入) + int hqConductCount = 0;//企业总部(举办次数) + int hqPeopleCount = 0;//企业总部(参演人数) + decimal hqInvestment = 0;//企业总部(直接投入) + int basicConductCount = 0;//基层单位(举办次数) + int basicPeopleCount = 0;//基层单位(参演人数) + decimal basicInvestment = 0;//基层单位(直接投入) + + drillConductedQuarterlyReportItems = (from x in Funs.DB.Information_DrillConductedQuarterlyReportItem where x.DrillConductedQuarterlyReportId == this.DrillConductedQuarterlyReportId select x).ToList(); + foreach (var item in drillConductedQuarterlyReportItems) + { + totalConductCount += Convert.ToInt32(item.TotalConductCount); + totalPeopleCount += Convert.ToInt32(item.TotalPeopleCount); + totalTotalInvestment += Convert.ToDecimal(item.TotalInvestment); + hqConductCount += Convert.ToInt32(item.HQConductCount); + hqPeopleCount += Convert.ToInt32(item.HQPeopleCount); + hqInvestment += Convert.ToDecimal(item.HQInvestment); + basicConductCount += Convert.ToInt32(item.BasicConductCount); + basicPeopleCount += Convert.ToInt32(item.BasicPeopleCount); + basicInvestment += Convert.ToDecimal(item.BasicInvestment); + } + + JObject summary = new JObject(); + summary.Add("IndustryType", "合计:"); + summary.Add("TotalConductCount", totalConductCount); + summary.Add("TotalPeopleCount", totalPeopleCount); + summary.Add("TotalInvestment", totalTotalInvestment); + summary.Add("HQConductCount", hqConductCount); + summary.Add("HQPeopleCount", hqPeopleCount); + summary.Add("HQInvestment", hqInvestment); + summary.Add("BasicConductCount", basicConductCount); + summary.Add("BasicPeopleCount", basicPeopleCount); + summary.Add("BasicInvestment", basicInvestment); + Grid1.SummaryData = summary; + } + #endregion + + #region 增加、修改、删除、审核、审批、上报按钮事件 + /// + /// Tree增加按钮 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrillConductedQuarterlyReportAdd.aspx?UnitId={0}&&Year={1}&&Quarter={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarter.SelectedValue, "编辑 - "))); + } + + /// + /// 显示编辑页面 + /// + private void ShowEdit() + { + Model.Information_DrillConductedQuarterlyReport report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report == null) + { + Alert.ShowInTop("所选时间无报表记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrillConductedQuarterlyReportAdd.aspx?DrillConductedQuarterlyReportId={0}", report.DrillConductedQuarterlyReportId, "编辑 - "))); + } + + /// + /// Tree编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审核 + /// + /// + /// + protected void btnAudit1_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审批 + /// + /// + /// + protected void btnAudit2_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 上报 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// Tree删除按钮 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + Model.Information_DrillConductedQuarterlyReport report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, report.YearId.ToString() + "-" + report.Quarter.ToString(), + report.DrillConductedQuarterlyReportId, BLL.Const.DrillConductedQuarterlyReportMenuId, BLL.Const.BtnDelete); + BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.DrillConductedQuarterlyReportId); + BLL.DrillConductedQuarterlyReportItemService.DeleteDrillConductedQuarterlyReportItemList(report.DrillConductedQuarterlyReportId); + BLL.DrillConductedQuarterlyReportService.DeleteDrillConductedQuarterlyReportById(report.DrillConductedQuarterlyReportId); + + SetEmpty(); + this.btnNew.Hidden = false; + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 过滤、分页、排序、关闭窗口 + /// + /// 表头过滤 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid1(); + } + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid1(); + } + + /// + /// Grid1排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid1(); + } + + /// + /// 分页列表显示条数下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid1(); + } + + /// + /// 关闭Grid1弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DrillConductedQuarterlyReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnIn)) + { + this.btnImport.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnPrint)) + { + this.btnPrint.Hidden = false; + } + int year = Funs.GetNewIntOrZero(this.drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue); + var report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, year, quarter); + this.btnAudit1.Hidden = true; + this.btnAudit2.Hidden = true; + this.btnUpdata.Hidden = true; + if (report != null) + { + this.btnNew.Hidden = true; + if (report.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入 + { + if (report.HandleState == BLL.Const.HandleState_2) + { + this.btnAudit1.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + this.btnAudit2.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + this.btnDelete.Hidden = true; + this.btnUpdata.Hidden = false; + } + } + if (report.UpState == BLL.Const.UpState_3) + { + this.btnUpdata.Hidden = true; + this.btnEdit.Hidden = true; + this.btnDelete.Hidden = true; + } + if (report.HandleMan == this.CurrUser.PersonId || report.CompileMan == this.CurrUser.PersonName) + { + this.btnEdit.Hidden = false; + } + else + { + this.btnEdit.Hidden = true; + } + } + } + + if (this.CurrUser.PersonId == BLL.Const.sysglyId) + { + this.btnDelete.Hidden = false; + } + } + #endregion + + #region 单位下拉框联动事件 + /// + /// 单位下拉框联动事件 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + GetValue(); + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../DataIn/DrillConductedQuarterlyReportImport.aspx", "导入 - "))); + } + #endregion + + #region 关闭导入弹出窗口 + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭查看审批信息弹出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + Model.Information_DrillConductedQuarterlyReport report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_DrillConductedQuarterlyReportId, report.DrillConductedQuarterlyReportId, "", "打印 - "))); + } + } + #endregion + + #region 季度向前/向后 + /// + /// 前一季度 + /// + /// + /// + protected void BtnBulletLeft_Click(object sender, EventArgs e) + { + SetMonthChange("-"); + } + + /// + /// 后一季度 + /// + /// + /// + protected void BulletRight_Click(object sender, EventArgs e) + { + SetMonthChange("+"); + } + + /// + /// 季度加减变化 + /// + /// + private void SetMonthChange(string type) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue) * 3).ToString()); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + if (type == "+") + { + showDate = nowDate.Value.AddMonths(3); + } + else + { + showDate = nowDate.Value.AddMonths(-3); + } + + this.drpYear.SelectedValue = showDate.Year.ToString(); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + ///值变化 + GetValue(); + } + } + #endregion + + #region 查看审批信息 + /// + /// 查看审批信息 + /// + /// + /// + protected void btnSee_Click(object sender, EventArgs e) + { + Model.Information_DrillConductedQuarterlyReport report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.DrillConductedQuarterlyReportId, "查看 - "))); + } + else + { + ShowNotify("所选月份无记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("应急演练开展情况季报表" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + MultiHeaderTable mht = new MultiHeaderTable(); + mht.ResolveMultiHeaderTable(Grid1.Columns); + sb.Append(""); + sb.Append(""); + foreach (List rows in mht.MultiTable) + { + sb.Append(""); + foreach (object[] cell in rows) + { + int rowspan = Convert.ToInt32(cell[0]); + int colspan = Convert.ToInt32(cell[1]); + GridColumn column = cell[2] as GridColumn; + + sb.AppendFormat("{3}", + rowspan != 1 ? " rowspan=\"" + rowspan + "\"" : "", + colspan != 1 ? " colspan=\"" + colspan + "\"" : "", + colspan != 1 ? " style=\"text-align:center;\"" : "", + column.HeaderText); + } + sb.Append(""); + } + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in mht.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + sb.Append(""); + } + sb.Append("
{0}
"); + return sb.ToString(); + } + + #region 多表头处理 + /// + /// 多表头处理 + /// + public class MultiHeaderTable + { + // 包含 rowspan,colspan 的多表头,方便生成 HTML 的 table 标签 + public List> MultiTable = new List>(); + // 最终渲染的列数组 + public List Columns = new List(); + public void ResolveMultiHeaderTable(GridColumnCollection columns) + { + List row = new List(); + foreach (GridColumn column in columns) + { + object[] cell = new object[4]; + cell[0] = 1; // rowspan + cell[1] = 1; // colspan + cell[2] = column; + cell[3] = null; + row.Add(cell); + } + ResolveMultiTable(row, 0); + ResolveColumns(row); + } + + private void ResolveColumns(List row) + { + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + List subrow = new List(); + foreach (GridColumn column in groupField.Columns) + { + subrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + ResolveColumns(subrow); + } + else + { + Columns.Add(cell[2] as GridColumn); + } + } + } + + private void ResolveMultiTable(List row, int level) + { + List nextrow = new List(); + + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // 如果当前列包含子列,则更改当前列的 colspan,以及增加父列(向上递归)的colspan + cell[1] = Convert.ToInt32(groupField.Columns.Count); + PlusColspan(level - 1, cell[3] as GridColumn, groupField.Columns.Count - 1); + + foreach (GridColumn column in groupField.Columns) + { + nextrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + } + } + MultiTable.Add(row); + // 如果当前下一行,则增加上一行(向上递归)中没有子列的列的 rowspan + if (nextrow.Count > 0) + { + PlusRowspan(level); + ResolveMultiTable(nextrow, level + 1); + } + } + + private void PlusRowspan(int level) + { + if (level < 0) + { + return; + } + foreach (object[] cells in MultiTable[level]) + { + GroupField groupField = cells[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // ... + } + else + { + cells[0] = Convert.ToInt32(cells[0]) + 1; + } + } + PlusRowspan(level - 1); + } + + private void PlusColspan(int level, GridColumn parent, int plusCount) + { + if (level < 0) + { + return; + } + + foreach (object[] cells in MultiTable[level]) + { + GridColumn column = cells[2] as GridColumn; + if (column == parent) + { + cells[1] = Convert.ToInt32(cells[1]) + plusCount; + + PlusColspan(level - 1, cells[3] as GridColumn, plusCount); + } + } + } + } + #endregion + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx.designer.cs new file mode 100644 index 00000000..737e4d0d --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReport.aspx.designer.cs @@ -0,0 +1,321 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class DrillConductedQuarterlyReport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpQuarter; + + /// + /// BtnBulletLeft 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletLeft; + + /// + /// BtnBulletRight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletRight; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnAudit1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit1; + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit2; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// txtUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtUnitName; + + /// + /// txtQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtQuarter; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCompileDate; + + /// + /// lbHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbHandleMan; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Window4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window4; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx new file mode 100644 index 00000000..884c4eeb --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx @@ -0,0 +1,228 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillConductedQuarterlyReportAdd.aspx.cs" Async="true" Inherits="FineUIPro.Web.ZHGL.Information.DrillConductedQuarterlyReportAdd" %> + + + + + + + 编辑应急演练开展情况季报表 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.cs new file mode 100644 index 00000000..73d3d69e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.cs @@ -0,0 +1,610 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class DrillConductedQuarterlyReportAdd : PageBase + { + #region 定义变量 + public string DrillConductedQuarterlyReportId + { + get + { + return (string)ViewState["DrillConductedQuarterlyReportId"]; + } + set + { + ViewState["DrillConductedQuarterlyReportId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List items = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + items.Clear(); + this.ddlUnitId.DataTextField = "UnitName"; + this.ddlUnitId.DataValueField = "UnitId"; + this.ddlUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + this.ddlUnitId.DataBind(); + + this.ddlYearId.DataTextField = "ConstText"; + ddlYearId.DataValueField = "ConstValue"; + ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + ddlYearId.DataBind(); + + this.ddlQuarter.DataTextField = "ConstText"; + ddlQuarter.DataValueField = "ConstValue"; + ddlQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011); + ddlQuarter.DataBind(); + this.ddlUnitId.Readonly = true; + string unitId = Request.Params["UnitId"]; + string year = Request.QueryString["Year"]; + string quarter = Request.QueryString["Quarter"]; + this.DrillConductedQuarterlyReportId = Request.Params["DrillConductedQuarterlyReportId"]; + if (!string.IsNullOrEmpty(this.DrillConductedQuarterlyReportId)) + { + items = BLL.DrillConductedQuarterlyReportItemService.GetDrillConductedQuarterlyReportItemList(this.DrillConductedQuarterlyReportId); + int i = items.Count * 10; + int count = items.Count; + if (count < 10) + { + for (int j = 0; j < (10 - count); j++) + { + i += 10; + Model.Information_DrillConductedQuarterlyReportItem newItem = new Model.Information_DrillConductedQuarterlyReportItem + { + DrillConductedQuarterlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillConductedQuarterlyReportItem)), + SortIndex = i + }; + items.Add(newItem); + } + } + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + + var drillConductedQuarterlyReport = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportById(this.DrillConductedQuarterlyReportId); + if (drillConductedQuarterlyReport != null) + { + this.btnCopy.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + if (drillConductedQuarterlyReport.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + else + { + if (drillConductedQuarterlyReport.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + } + if (drillConductedQuarterlyReport.UpState == BLL.Const.UpState_3) //已上报 + { + this.btnSave.Hidden = true; + this.btnUpdata.Hidden = true; + } + if (!string.IsNullOrEmpty(drillConductedQuarterlyReport.UnitId)) + { + this.ddlUnitId.SelectedValue = drillConductedQuarterlyReport.UnitId; + } + if (drillConductedQuarterlyReport.YearId.HasValue) + { + this.ddlYearId.SelectedValue = drillConductedQuarterlyReport.YearId.ToString(); + } + if (drillConductedQuarterlyReport.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = drillConductedQuarterlyReport.Quarter.ToString(); + } + if (drillConductedQuarterlyReport.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", drillConductedQuarterlyReport.ReportDate); + } + } + } + else + { + this.btnCopy.Hidden = false; + this.ddlUnitId.SelectedValue = unitId; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.ddlYearId.SelectedValue = year; + this.ddlQuarter.SelectedValue = quarter; + //获取项目报告集合 + List projectItems = (from x in Funs.DB.InformationProject_DrillConductedQuarterlyReport + join y in Funs.DB.InformationProject_DrillConductedQuarterlyReportItem + on x.DrillConductedQuarterlyReportId equals y.DrillConductedQuarterlyReportId + where x.YearId.ToString() == year && x.Quarter.ToString() == quarter && x.States == BLL.Const.State_2 + select y).Distinct().ToList(); + if (projectItems.Count > 0) + { + int i = 0; + foreach (var projectItem in projectItems) + { + i += 10; + Model.Information_DrillConductedQuarterlyReportItem item = new Model.Information_DrillConductedQuarterlyReportItem + { + DrillConductedQuarterlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillConductedQuarterlyReportItem)), + SortIndex = i + }; + Model.Base_Project project = (from x in Funs.DB.Base_Project + join y in Funs.DB.InformationProject_DrillConductedQuarterlyReport + on x.ProjectId equals y.ProjectId + join z in Funs.DB.InformationProject_DrillConductedQuarterlyReportItem + on y.DrillConductedQuarterlyReportId equals z.DrillConductedQuarterlyReportId + where z.DrillConductedQuarterlyReportItemId == projectItem.DrillConductedQuarterlyReportItemId + select x).FirstOrDefault(); + if (project != null) + { + item.IndustryType = project.ProjectName; + } + item.TotalConductCount = projectItem.TotalConductCount; + item.TotalPeopleCount = projectItem.TotalPeopleCount; + item.TotalInvestment = projectItem.TotalInvestment; + item.HQConductCount = projectItem.HQConductCount; + item.HQPeopleCount = projectItem.HQPeopleCount; + item.HQInvestment = projectItem.HQInvestment; + item.BasicConductCount = projectItem.BasicConductCount; + item.BasicPeopleCount = projectItem.BasicPeopleCount; + item.BasicInvestment = projectItem.BasicInvestment; + item.ComprehensivePractice = projectItem.ComprehensivePractice; + item.CPScene = projectItem.CPScene; + item.CPDesktop = projectItem.CPDesktop; + item.SpecialDrill = projectItem.SpecialDrill; + item.SDScene = projectItem.SDScene; + item.SDDesktop = projectItem.SDDesktop; + items.Add(item); + } + } + else + { + for (int i = 0; i < 100; i++) + { + i += 10; + Model.Information_DrillConductedQuarterlyReportItem newItem = new Model.Information_DrillConductedQuarterlyReportItem + { + DrillConductedQuarterlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillConductedQuarterlyReportItem)), + SortIndex = i + }; + items.Add(newItem); + } + } + Grid1.DataSource = items; + Grid1.DataBind(); + + + } + } + } + + #endregion + + #region 保存、提交、上报 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + /// + /// 上报按钮 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + Save("updata"); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save("submit"); + } + + /// + /// 保存数据 + /// + /// + private void Save(string type) + { + if (this.ddlUnitId.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择单位!", MessageBoxIcon.Warning); + return; + } + var drill = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportByUnitIdDate(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue), this.DrillConductedQuarterlyReportId); + if (drill != null) + { + ShowNotify("本单位本季度报表已存在,不能重复编制", MessageBoxIcon.Warning); + return; + } + + var drillConductedQuarterlyReport = new Model.Information_DrillConductedQuarterlyReport(); + if (this.ddlUnitId.SelectedValue != BLL.Const._Null) + { + drillConductedQuarterlyReport.UnitId = this.ddlUnitId.SelectedValue; + } + if (!string.IsNullOrEmpty(this.dpkCompileDate.Text.Trim())) + { + drillConductedQuarterlyReport.ReportDate = Convert.ToDateTime(this.dpkCompileDate.Text.Trim()); + } + drillConductedQuarterlyReport.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + drillConductedQuarterlyReport.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + if (string.IsNullOrEmpty(this.DrillConductedQuarterlyReportId)) + { + this.DrillConductedQuarterlyReportId = SQLHelper.GetNewID(typeof(Model.Information_DrillConductedQuarterlyReport)); drillConductedQuarterlyReport.DrillConductedQuarterlyReportId = this.DrillConductedQuarterlyReportId; + drillConductedQuarterlyReport.CompileMan = this.CurrUser.PersonName; + drillConductedQuarterlyReport.UpState = BLL.Const.UpState_2; + drillConductedQuarterlyReport.HandleMan = this.CurrUser.PersonId; + drillConductedQuarterlyReport.HandleState = BLL.Const.HandleState_1; + BLL.DrillConductedQuarterlyReportService.AddDrillConductedQuarterlyReport(drillConductedQuarterlyReport); + BLL.LogService.AddSys_Log(this.CurrUser, drillConductedQuarterlyReport.YearId.ToString() + "-" + drillConductedQuarterlyReport.Quarter.ToString(), + drillConductedQuarterlyReport.DrillConductedQuarterlyReportId, BLL.Const.DrillConductedQuarterlyReportMenuId, BLL.Const.BtnAdd); + } + else + { + Model.Information_DrillConductedQuarterlyReport oldReport = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportById(this.DrillConductedQuarterlyReportId); + if (oldReport != null) + { + drillConductedQuarterlyReport.HandleMan = oldReport.HandleMan; + drillConductedQuarterlyReport.HandleState = oldReport.HandleState; + } + drillConductedQuarterlyReport.DrillConductedQuarterlyReportId = this.DrillConductedQuarterlyReportId; + drillConductedQuarterlyReport.UpState = BLL.Const.UpState_2; + BLL.DrillConductedQuarterlyReportService.UpdateDrillConductedQuarterlyReport(drillConductedQuarterlyReport); + BLL.LogService.AddSys_Log(this.CurrUser, drillConductedQuarterlyReport.YearId.ToString() + "-" + drillConductedQuarterlyReport.Quarter.ToString(), + drillConductedQuarterlyReport.DrillConductedQuarterlyReportId, BLL.Const.DrillConductedQuarterlyReportMenuId, BLL.Const.BtnModify); + BLL.DrillConductedQuarterlyReportItemService.DeleteDrillConductedQuarterlyReportItemList(drillConductedQuarterlyReport.DrillConductedQuarterlyReportId); + } + GetItems(drillConductedQuarterlyReport.DrillConductedQuarterlyReportId); + foreach (var item in items) + { + BLL.DrillConductedQuarterlyReportItemService.AddDrillConductedQuarterlyReportItem(item); + } + if (type == "updata") //保存并上报 + { + if (drillConductedQuarterlyReport.UpState == BLL.Const.UpState_2) + { + string code = CNCECHSSEWebService.UpDrillConductedQuarterlyReport(drillConductedQuarterlyReport.DrillConductedQuarterlyReportId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + else + { + ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning); + return; + } + } + if (type == "submit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=DrillConductedQuarterlyReport&Id={0}", drillConductedQuarterlyReport.DrillConductedQuarterlyReportId, "编辑 - "))); + } + else + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + /// + /// 获取明细值 + /// + /// + private void GetItems(string drillConductedQuarterlyReportId) + { + items.Clear(); + int i = 10; + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + //if (values["IndustryType"].ToString() != "") + //{ + Model.Information_DrillConductedQuarterlyReportItem item = new Model.Information_DrillConductedQuarterlyReportItem(); + if (values["DrillConductedQuarterlyReportItemId"].ToString() != "") + { + item.DrillConductedQuarterlyReportItemId = values.Value("DrillConductedQuarterlyReportItemId"); + } + item.DrillConductedQuarterlyReportId = drillConductedQuarterlyReportId; + item.SortIndex = i; + if (values["IndustryType"].ToString() != "") + { + item.IndustryType = values.Value("IndustryType"); + } + if (values["TotalConductCount"].ToString() != "") + { + item.TotalConductCount = values.Value("TotalConductCount"); + } + if (values["TotalPeopleCount"].ToString() != "") + { + item.TotalPeopleCount = values.Value("TotalPeopleCount"); + } + if (values["TotalInvestment"].ToString() != "") + { + item.TotalInvestment = values.Value("TotalInvestment"); + } + if (values["HQConductCount"].ToString() != "") + { + item.HQConductCount = values.Value("HQConductCount"); + } + if (values["HQPeopleCount"].ToString() != "") + { + item.HQPeopleCount = values.Value("HQPeopleCount"); + } + if (values["HQInvestment"].ToString() != "") + { + item.HQInvestment = values.Value("HQInvestment"); + } + if (values["BasicConductCount"].ToString() != "") + { + item.BasicConductCount = values.Value("BasicConductCount"); + } + if (values["BasicPeopleCount"].ToString() != "") + { + item.BasicPeopleCount = values.Value("BasicPeopleCount"); + } + if (values["BasicInvestment"].ToString() != "") + { + item.BasicInvestment = values.Value("BasicInvestment"); + } + if (values["ComprehensivePractice"].ToString() != "") + { + item.ComprehensivePractice = values.Value("ComprehensivePractice"); + } + if (values["CPScene"].ToString() != "") + { + item.CPScene = values.Value("CPScene"); + } + if (values["CPDesktop"].ToString() != "") + { + item.CPDesktop = values.Value("CPDesktop"); + } + if (values["SpecialDrill"].ToString() != "") + { + item.SpecialDrill = values.Value("SpecialDrill"); + } + if (values["SDScene"].ToString() != "") + { + item.SDScene = values.Value("SDScene"); + } + if (values["SDDesktop"].ToString() != "") + { + item.SDDesktop = values.Value("SDDesktop"); + } + items.Add(item); + i += 10; + //} + } + } + #endregion + + #region 关闭办理流程窗口 + /// + /// 关闭办理流程窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + Model.Information_DrillConductedQuarterlyReport report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportById(this.DrillConductedQuarterlyReportId); + if (report.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + } + } + #endregion + + #region Grid行事件 + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + GetItems(string.Empty); + if (e.CommandName == "Add") + { + Model.Information_DrillConductedQuarterlyReportItem oldItem = items.FirstOrDefault(x => x.DrillConductedQuarterlyReportItemId == rowID); + Model.Information_DrillConductedQuarterlyReportItem newItem = new Model.Information_DrillConductedQuarterlyReportItem + { + DrillConductedQuarterlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillConductedQuarterlyReportItem)) + }; + if (oldItem != null) + { + newItem.SortIndex = oldItem.SortIndex + 1; + } + else + { + newItem.SortIndex = 0; + } + items.Add(newItem); + items = items.OrderBy(x => x.SortIndex).ToList(); + Grid1.DataSource = items; + Grid1.DataBind(); + } + if (e.CommandName == "Delete") + { + if (Grid1.Rows.Count == 1) + { + ShowNotify("只有一条数据,无法删除", MessageBoxIcon.Warning); + return; + } + foreach (var item in items) + { + if (item.DrillConductedQuarterlyReportItemId == rowID) + { + items.Remove(item); + break; + } + } + Grid1.DataSource = items; + Grid1.DataBind(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DrillConductedQuarterlyReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnCopy.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnSaveUp)) + //{ + // this.btnUpdata.Hidden = false; + + //} + if (buttonList.Contains(BLL.Const.BtnSubmit)) + { + this.btnSubmit.Hidden = false; + } + } + } + #endregion + + #region 复制上个季度数据 + /// + /// 复制上个季度的数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + int lastYear = 0, lastQuarter = 0; + int year = Convert.ToInt32(this.ddlYearId.SelectedValue); + int quarter = Convert.ToInt32(this.ddlQuarter.SelectedValue); + if (quarter == 1) + { + lastYear = year - 1; + lastQuarter = 4; + } + else + { + lastYear = year; + lastQuarter = quarter - 1; + } + Model.Information_DrillConductedQuarterlyReport drillConductedQuarterlyReport = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportByUnitIdAndYearAndQuarters(this.ddlUnitId.SelectedValue, lastYear, lastQuarter); + if (drillConductedQuarterlyReport != null) + { + Model.Information_DrillConductedQuarterlyReport newDrillConductedQuarterlyReport = new Model.Information_DrillConductedQuarterlyReport(); + this.DrillConductedQuarterlyReportId = SQLHelper.GetNewID(typeof(Model.Information_DrillConductedQuarterlyReport)); + newDrillConductedQuarterlyReport.DrillConductedQuarterlyReportId = this.DrillConductedQuarterlyReportId; + newDrillConductedQuarterlyReport.UnitId = this.ddlUnitId.SelectedValue; + newDrillConductedQuarterlyReport.ReportDate = DateTime.Now; + newDrillConductedQuarterlyReport.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + newDrillConductedQuarterlyReport.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + newDrillConductedQuarterlyReport.CompileMan = this.CurrUser.PersonName; + newDrillConductedQuarterlyReport.UpState = BLL.Const.UpState_2; + newDrillConductedQuarterlyReport.HandleState = BLL.Const.HandleState_1; + newDrillConductedQuarterlyReport.HandleMan = this.CurrUser.PersonId; + BLL.DrillConductedQuarterlyReportService.AddDrillConductedQuarterlyReport(newDrillConductedQuarterlyReport); + + items = BLL.DrillConductedQuarterlyReportItemService.GetDrillConductedQuarterlyReportItemList(drillConductedQuarterlyReport.DrillConductedQuarterlyReportId); + if (items.Count > 0) + { + foreach (var item in items) + { + Model.Information_DrillConductedQuarterlyReportItem newItem = new Model.Information_DrillConductedQuarterlyReportItem + { + DrillConductedQuarterlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillConductedQuarterlyReportItem)), + DrillConductedQuarterlyReportId = this.DrillConductedQuarterlyReportId, + IndustryType = item.IndustryType, + TotalConductCount = item.TotalConductCount, + TotalPeopleCount = item.TotalPeopleCount, + TotalInvestment = item.TotalInvestment, + HQConductCount = item.HQConductCount, + HQPeopleCount = item.HQPeopleCount, + HQInvestment = item.HQInvestment, + BasicConductCount = item.BasicConductCount, + BasicPeopleCount = item.BasicPeopleCount, + BasicInvestment = item.BasicInvestment, + ComprehensivePractice = item.ComprehensivePractice, + CPScene = item.CPScene, + CPDesktop = item.CPDesktop, + SpecialDrill = item.SpecialDrill, + SDScene = item.SDScene, + SDDesktop = item.SDDesktop, + SortIndex = item.SortIndex + }; + BLL.DrillConductedQuarterlyReportItemService.AddDrillConductedQuarterlyReportItem(newItem); + } + } + GetValues(newDrillConductedQuarterlyReport.DrillConductedQuarterlyReportId); + } + + } + + /// + /// 获取数据 + /// + private void GetValues(string drillConductedQuarterlyReportId) + { + var report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportById(drillConductedQuarterlyReportId); + if (report != null) + { + if (!string.IsNullOrEmpty(report.UnitId)) + { + this.ddlUnitId.SelectedValue = report.UnitId; + } + if (report.YearId.HasValue) + { + this.ddlYearId.SelectedValue = report.YearId.ToString(); + } + if (report.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = report.Quarter.ToString(); + } + if (report.ReportDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", report.ReportDate); + } + items = BLL.DrillConductedQuarterlyReportItemService.GetDrillConductedQuarterlyReportItemList(drillConductedQuarterlyReportId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.designer.cs new file mode 100644 index 00000000..78f5619e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillConductedQuarterlyReportAdd.aspx.designer.cs @@ -0,0 +1,294 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class DrillConductedQuarterlyReportAdd { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ddlUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlUnitId; + + /// + /// ddlYearId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlYearId; + + /// + /// ddlQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlQuarter; + + /// + /// dpkCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtIndustryType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtIndustryType; + + /// + /// txtTotalConductCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalConductCount; + + /// + /// txtTotalPeopleCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalPeopleCount; + + /// + /// txtTotalInvestment 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalInvestment; + + /// + /// txtHQConductCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtHQConductCount; + + /// + /// txtHQPeopleCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtHQPeopleCount; + + /// + /// txtHQInvestment 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtHQInvestment; + + /// + /// txtBasicConductCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtBasicConductCount; + + /// + /// txtBasicPeopleCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtBasicPeopleCount; + + /// + /// txtBasicInvestment 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtBasicInvestment; + + /// + /// txtComprehensivePractice 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtComprehensivePractice; + + /// + /// txtCPScene 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtCPScene; + + /// + /// txtCPDesktop 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtCPDesktop; + + /// + /// txtSpecialDrill 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSpecialDrill; + + /// + /// txtSDScene 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSDScene; + + /// + /// txtSDDesktop 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSDDesktop; + + /// + /// TextBox2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox TextBox2; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx new file mode 100644 index 00000000..fb4f5ed5 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx @@ -0,0 +1,158 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillPlanHalfYearReport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.DrillPlanHalfYearReport" %> + + + + + + + 应急演练工作计划半年报表 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx.cs new file mode 100644 index 00000000..8f18f00d --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx.cs @@ -0,0 +1,590 @@ +using BLL; +using System; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class DrillPlanHalfYearReport : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string DrillPlanHalfYearReportId + { + get + { + return (string)ViewState["DrillPlanHalfYearReportId"]; + } + set + { + ViewState["DrillPlanHalfYearReportId"] = value; + } + } + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.drpHalfYear.DataTextField = "ConstText"; + drpHalfYear.DataValueField = "ConstValue"; + drpHalfYear.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0010); + drpHalfYear.DataBind(); + + this.drpYear.DataTextField = "ConstText"; + drpYear.DataValueField = "ConstValue"; + drpYear.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + drpYear.DataBind(); + + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + this.drpUnit.Readonly = true; + + int lastYear = 0, lastHalfYear = 0; + int year = DateTime.Now.Year; + int halfYear = Funs.GetNowHalfYearByTime(DateTime.Now); + if (halfYear == 1) + { + lastYear = year - 1; + lastHalfYear = 2; + } + else + { + lastYear = year; + lastHalfYear = halfYear - 1; + } + this.drpYear.SelectedValue = lastYear.ToString(); + this.drpHalfYear.SelectedValue = lastHalfYear.ToString(); + + GetValue(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + } + } + #endregion + + #region 清空文本 + private void SetEmpty() + { + SimpleForm1.Title = string.Empty; + txtUnitName.Text = string.Empty; + txtCompileMan.Text = string.Empty; + txtTel.Text = string.Empty; + txtCompileDate.Text = string.Empty; + lbHandleMan.Text = string.Empty; + Grid1.DataSource = null; + Grid1.DataBind(); + } + #endregion + + #region 获取记录值 + private void GetValue() + { + + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + + int halfYear = Funs.GetNewIntOrZero(drpHalfYear.SelectedValue); + Model.View_Information_DrillPlanHalfYearReport report = Funs.DB.View_Information_DrillPlanHalfYearReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.HalfYearId == halfYear && e.YearId == year); + if (report != null) + { + string state = string.Empty; + if (report.UpState == BLL.Const.UpState_3) + { + state = "(已上报)"; + } + else + { + if (report.HandleState == BLL.Const.HandleState_1) + { + state = "(待提交)"; + } + else if (report.HandleState == BLL.Const.HandleState_2) + { + state = "(待审核)"; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + state = "(待审批)"; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + state = "(待上报)"; + } + } + this.SimpleForm1.Title = "应急演练工作计划半年报表" + state; + if (report.HandleState == BLL.Const.HandleState_1 || report.UpState == BLL.Const.UpState_3) + { + this.lbHandleMan.Hidden = true; + } + else + { + this.lbHandleMan.Hidden = false; + var user = BLL.Person_PersonsService.GetPerson_PersonsById(report.HandleMan); + if (user != null) + { + this.lbHandleMan.Text = "下一步办理人:" + user.PersonName; + } + } + this.txtUnitName.Text = report.UnitName; + this.txtCompileMan.Text = report.CompileMan; + this.txtTel.Text = report.Telephone; + if (report.CompileDate != null) + { + this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", report.CompileDate); + } + DrillPlanHalfYearReportId = report.DrillPlanHalfYearReportId; + BindGrid1(); + } + else + { + SetEmpty(); + } + this.GetButtonPower(); + } + #endregion + + #region 加载Grid1 + /// + /// 加载Grid1 + /// + private void BindGrid1() + { + if (!string.IsNullOrEmpty(DrillPlanHalfYearReportId)) + { + string strSql = "select * from dbo.Information_DrillPlanHalfYearReportItem where DrillPlanHalfYearReportId = @DrillPlanHalfYearReportId order by SortIndex"; + SqlParameter[] parameter = new SqlParameter[] + { + new SqlParameter("@DrillPlanHalfYearReportId",DrillPlanHalfYearReportId), + }; + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + } + #endregion + + #region 过滤、分页、排序 + /// + /// 过滤表头 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid1(); + } + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid1(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid1(); + } + + /// + /// 分页列表显示条数下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid1(); + } + #endregion + + #region 增加、编辑、删除、审核、审批、上报按钮事件 + /// + /// 增加按钮 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrillPlanHalfYearReportAdd.aspx?UnitId={0}&&Year={1}&&HalfYear={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpHalfYear.SelectedValue, "编辑 - "))); + } + + /// + /// 编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审核 + /// + /// + /// + protected void btnAudit1_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审批 + /// + /// + /// + protected void btnAudit2_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 上报 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 弹出编辑窗口 + /// + private void ShowEdit() + { + Model.Information_DrillPlanHalfYearReport report = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportByUnitIdAndYearAndHalfYear(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpHalfYear.SelectedValue)); + if (report == null) + { + Alert.ShowInTop("所选时间无报表记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DrillPlanHalfYearReportAdd.aspx?DrillPlanHalfYearReportId={0}", report.DrillPlanHalfYearReportId, "编辑 - "))); + } + + /// + /// 批量删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + Model.Information_DrillPlanHalfYearReport report = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportByUnitIdAndYearAndHalfYear(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpHalfYear.SelectedValue)); + if (report != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, report.YearId.ToString() + "-" + report.HalfYearId.ToString(), + report.DrillPlanHalfYearReportId, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnDelete); + BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.DrillPlanHalfYearReportId); + BLL.DrillPlanHalfYearReportItemService.DeleteDrillPlanHalfYearReportItemList(report.DrillPlanHalfYearReportId); + BLL.DrillPlanHalfYearReportService.DeleteDrillPlanHalfYearReportById(report.DrillPlanHalfYearReportId); + SetEmpty(); + this.btnNew.Hidden = false; + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭查看审批信息弹出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DrillPlanHalfYearReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnIn)) + { + this.btnImport.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnPrint)) + { + this.btnPrint.Hidden = false; + } + int year = Funs.GetNewIntOrZero(this.drpYear.SelectedValue); + int halfYear = Funs.GetNewIntOrZero(this.drpHalfYear.SelectedValue); + var report = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportByUnitIdAndYearAndHalfYear(this.drpUnit.SelectedValue, year, halfYear); + this.btnAudit1.Hidden = true; + this.btnAudit2.Hidden = true; + this.btnUpdata.Hidden = true; + if (report != null) + { + this.btnNew.Hidden = true; + if (report.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入 + { + if (report.HandleState == BLL.Const.HandleState_2) + { + this.btnAudit1.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + this.btnAudit2.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + this.btnDelete.Hidden = true; + this.btnUpdata.Hidden = false; + } + } + if (report.UpState == BLL.Const.UpState_3) + { + this.btnUpdata.Hidden = true; + this.btnEdit.Hidden = true; + this.btnDelete.Hidden = true; + } + if (report.HandleMan == this.CurrUser.PersonId || report.CompileMan == this.CurrUser.PersonName) + { + this.btnEdit.Hidden = false; + } + else + { + this.btnEdit.Hidden = true; + } + } + } + + if (this.CurrUser.PersonId == BLL.Const.sysglyId) + { + this.btnDelete.Hidden = false; + } + } + #endregion + + #region 单位下拉框联动事件 + /// + /// 单位下拉框联动事件 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + GetValue(); + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../DataIn/DrillPlanHalfYearReportImport.aspx", "导入 - "))); + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + Model.Information_DrillPlanHalfYearReport report = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportByUnitIdAndYearAndHalfYear(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpHalfYear.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_DrillPlanHalfYearReportId, report.DrillPlanHalfYearReportId, "", "打印 - "))); + } + } + #endregion + + #region 半年向前/向后 + /// + /// 前一半年 + /// + /// + /// + protected void BtnBulletLeft_Click(object sender, EventArgs e) + { + SetMonthChange("-"); + } + + /// + /// 后一半年 + /// + /// + /// + protected void BulletRight_Click(object sender, EventArgs e) + { + SetMonthChange("+"); + } + + /// + /// 半年加减变化 + /// + /// + private void SetMonthChange(string type) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpHalfYear.SelectedValue) * 6).ToString()); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + if (type == "+") + { + showDate = nowDate.Value.AddMonths(6); + } + else + { + showDate = nowDate.Value.AddMonths(-6); + } + + this.drpYear.SelectedValue = showDate.Year.ToString(); + this.drpHalfYear.SelectedValue = Funs.GetNowHalfYearByTime(showDate).ToString(); + ///值变化 + GetValue(); + } + } + #endregion + + #region 查看审批信息 + /// + /// 查看审批信息 + /// + /// + /// + protected void btnSee_Click(object sender, EventArgs e) + { + Model.Information_DrillPlanHalfYearReport report = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportByUnitIdAndYearAndHalfYear(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpHalfYear.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.DrillPlanHalfYearReportId, "查看 - "))); + } + else + { + ShowNotify("所选月份无记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("应急演练工作计划半年报表" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid1(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx.designer.cs new file mode 100644 index 00000000..cd0805e2 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReport.aspx.designer.cs @@ -0,0 +1,330 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class DrillPlanHalfYearReport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpHalfYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpHalfYear; + + /// + /// BtnBulletLeft 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletLeft; + + /// + /// BtnBulletRight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletRight; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnAudit1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit1; + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit2; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// txtUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtUnitName; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCompileMan; + + /// + /// txtTel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtTel; + + /// + /// txtCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtCompileDate; + + /// + /// lbHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbHandleMan; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Window4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window4; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx new file mode 100644 index 00000000..733b1835 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx @@ -0,0 +1,130 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DrillPlanHalfYearReportAdd.aspx.cs" Async="true" Inherits="FineUIPro.Web.ZHGL.Information.DrillPlanHalfYearReportAdd" %> + + + + + + + 编辑应急演练工作计划半年报表 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.cs new file mode 100644 index 00000000..3a1a44a0 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.cs @@ -0,0 +1,603 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class DrillPlanHalfYearReportAdd : PageBase + { + #region 定义变量 + public string DrillPlanHalfYearReportId + { + get + { + return (string)ViewState["DrillPlanHalfYearReportId"]; + } + set + { + ViewState["DrillPlanHalfYearReportId"] = value; + } + } + + private static List items = new List(); + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + items.Clear(); + this.ddlUnitId.DataValueField = "UnitId"; + this.ddlUnitId.DataTextField = "UnitName"; + this.ddlUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + this.ddlUnitId.DataBind(); + + this.ddlYearId.DataTextField = "ConstText"; + ddlYearId.DataValueField = "ConstValue"; + ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + ddlYearId.DataBind(); + //this.ddlYearId.SelectedValue = DateTime.Now.Year.ToString(); + + this.ddlHalfYearId.DataTextField = "ConstText"; + ddlHalfYearId.DataValueField = "ConstValue"; + ddlHalfYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0010); + ddlHalfYearId.DataBind(); + this.ddlHalfYearId.SelectedValue = Funs.GetNowHalfYearByTime(DateTime.Now).ToString(); + + this.ddlUnitId.Readonly = true; + string year = Request.QueryString["Year"]; + string halfYear = Request.QueryString["HalfYear"]; + this.DrillPlanHalfYearReportId = Request.Params["DrillPlanHalfYearReportId"]; + if (!string.IsNullOrEmpty(this.DrillPlanHalfYearReportId)) + { + items = BLL.DrillPlanHalfYearReportItemService.GetDrillPlanHalfYearReportItemList(this.DrillPlanHalfYearReportId); + int i = items.Count * 10; + int count = items.Count; + if (count < 10) + { + for (int j = 0; j < (10 - count); j++) + { + i += 10; + Model.Information_DrillPlanHalfYearReportItem newItem = new Model.Information_DrillPlanHalfYearReportItem + { + DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)), + SortIndex = i + }; + items.Add(newItem); + } + } + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + + var drill = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportById(this.DrillPlanHalfYearReportId); + if (drill != null) + { + this.btnCopy.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + if (drill.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + else + { + if (drill.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + } + if (drill.UpState == BLL.Const.UpState_3) //已上报 + { + this.btnSave.Hidden = true; + this.btnUpdata.Hidden = true; + } + if (!string.IsNullOrEmpty(drill.UnitId.Trim())) + { + this.ddlUnitId.SelectedValue = drill.UnitId.Trim(); + } + if (drill.YearId.HasValue) + { + this.ddlYearId.SelectedValue = drill.YearId.ToString(); + } + if (drill.HalfYearId.HasValue) + { + this.ddlHalfYearId.SelectedValue = drill.HalfYearId.ToString(); + } + if (!string.IsNullOrEmpty(drill.CompileMan)) + { + this.txtCompileMan.Text = drill.CompileMan; + } + this.txtTel.Text = drill.Telephone; + if (drill.CompileDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", drill.CompileDate); + } + } + } + else + { + this.btnCopy.Hidden = false; + this.ddlUnitId.SelectedValue = this.CurrUser.UnitId; + this.txtCompileMan.Text = this.CurrUser.PersonName; + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.ddlYearId.SelectedValue = year; + this.ddlHalfYearId.SelectedValue = halfYear; + //获取项目报告集合 + List projectItems = (from x in Funs.DB.InformationProject_DrillPlanHalfYearReport + join y in Funs.DB.InformationProject_DrillPlanHalfYearReportItem + on x.DrillPlanHalfYearReportId equals y.DrillPlanHalfYearReportId + where x.YearId.ToString() == year && x.HalfYearId.ToString() == halfYear && x.States == BLL.Const.State_2 + select y).Distinct().ToList(); + if (projectItems.Count > 0) + { + int i = 0; + foreach (var projectItem in projectItems) + { + i += 10; + Model.Information_DrillPlanHalfYearReportItem item = new Model.Information_DrillPlanHalfYearReportItem + { + DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)), + SortIndex = i, + DrillPlanName = projectItem.DrillPlanName, + OrganizationUnit = projectItem.OrganizationUnit, + DrillPlanDate = projectItem.DrillPlanDate, + AccidentScene = projectItem.AccidentScene, + ExerciseWay = projectItem.ExerciseWay + }; + items.Add(item); + } + } + else + { + //增加明细集合 + for (int i = 0; i < 100; i++) + { + i += 10; + Model.Information_DrillPlanHalfYearReportItem newItem = new Model.Information_DrillPlanHalfYearReportItem + { + DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)), + SortIndex = i + }; + items.Add(newItem); + } + } + Grid1.DataSource = items; + Grid1.DataBind(); + } + } + } + #endregion + + #region 保存 + private void Save(string type) + { + if (this.ddlUnitId.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择单位!", MessageBoxIcon.Warning); + return; + } + Model.Information_DrillPlanHalfYearReport drillPlanHalfYearReport = new Model.Information_DrillPlanHalfYearReport(); + + if (this.ddlUnitId.SelectedValue != "null") + { + drillPlanHalfYearReport.UnitId = this.ddlUnitId.SelectedValue; + } + drillPlanHalfYearReport.CompileMan = this.CurrUser.PersonName; + drillPlanHalfYearReport.Telephone = this.txtTel.Text.Trim(); + drillPlanHalfYearReport.CompileDate = DateTime.Now; + if (this.ddlYearId.SelectedValue != BLL.Const._Null) + { + drillPlanHalfYearReport.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + } + if (this.ddlHalfYearId.SelectedValue != BLL.Const._Null) + { + drillPlanHalfYearReport.HalfYearId = Funs.GetNewIntOrZero(this.ddlHalfYearId.SelectedValue); + } + if (string.IsNullOrEmpty(this.DrillPlanHalfYearReportId)) + { + var drill = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportByUnitIdDate(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlHalfYearId.SelectedValue)); + if (drill != null) + { + ShowNotify("本单位本月报表已存在,不能重复编制", MessageBoxIcon.Warning); + return; + } + else + { + this.DrillPlanHalfYearReportId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReport)); + drillPlanHalfYearReport.DrillPlanHalfYearReportId = this.DrillPlanHalfYearReportId; + drillPlanHalfYearReport.UpState = BLL.Const.UpState_2; + drillPlanHalfYearReport.HandleMan = this.CurrUser.PersonId; + drillPlanHalfYearReport.HandleState = BLL.Const.HandleState_1; + BLL.DrillPlanHalfYearReportService.AddDrillPlanHalfYearReport(drillPlanHalfYearReport); + BLL.LogService.AddSys_Log(this.CurrUser, drillPlanHalfYearReport.YearId.ToString() + "-" + drillPlanHalfYearReport.HalfYearId.ToString(), + drillPlanHalfYearReport.DrillPlanHalfYearReportId, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnAdd); + } + } + else + { + var oldReport = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportById(this.DrillPlanHalfYearReportId); + if (oldReport != null) + { + drillPlanHalfYearReport.HandleMan = oldReport.HandleMan; + drillPlanHalfYearReport.HandleState = oldReport.HandleState; + } + drillPlanHalfYearReport.DrillPlanHalfYearReportId = this.DrillPlanHalfYearReportId; + drillPlanHalfYearReport.UpState = BLL.Const.UpState_2; + BLL.DrillPlanHalfYearReportService.UpdateDrillPlanHalfYearReport(drillPlanHalfYearReport); + BLL.LogService.AddSys_Log(this.CurrUser, drillPlanHalfYearReport.YearId.ToString() + "-" + drillPlanHalfYearReport.HalfYearId.ToString(), + drillPlanHalfYearReport.DrillPlanHalfYearReportId, BLL.Const.DrillPlanHalfYearReportMenuId, BLL.Const.BtnModify); + BLL.DrillPlanHalfYearReportItemService.DeleteDrillPlanHalfYearReportItemList(drillPlanHalfYearReport.DrillPlanHalfYearReportId); + } + GetItems(drillPlanHalfYearReport.DrillPlanHalfYearReportId); + foreach (var item in items) + { + if (!string.IsNullOrEmpty(item.DrillPlanName)) + { + BLL.DrillPlanHalfYearReportItemService.AddDrillPlanHalfYearReportItem(item); + } + } + if (type == "updata") //保存并上报 + { + if (drillPlanHalfYearReport.UpState == BLL.Const.UpState_2) + { + string code = CNCECHSSEWebService.UpDrillPlanHalfYearReport(drillPlanHalfYearReport.DrillPlanHalfYearReportId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + else + { + ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning); + return; + } + } + if (type == "submit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=DrillPlanHalfYearReport&Id={0}", drillPlanHalfYearReport.DrillPlanHalfYearReportId, "编辑 - "))); + } + else + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + private void GetItems(string drillPlanHalfYearReportId) + { + items.Clear(); + int i = 10; + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + Model.Information_DrillPlanHalfYearReportItem item = new Model.Information_DrillPlanHalfYearReportItem(); + if (values["DrillPlanHalfYearReportItemId"].ToString() != "") + { + item.DrillPlanHalfYearReportItemId = values.Value("DrillPlanHalfYearReportItemId"); + } + item.DrillPlanHalfYearReportId = drillPlanHalfYearReportId; + item.SortIndex = i; + if (values["DrillPlanName"].ToString() != "") + { + item.DrillPlanName = values.Value("DrillPlanName"); + } + if (values["OrganizationUnit"].ToString() != "") + { + item.OrganizationUnit = values.Value("OrganizationUnit"); + } + if (values["DrillPlanDate"].ToString() != "") + { + item.DrillPlanDate = values.Value("DrillPlanDate"); + } + if (values["AccidentScene"].ToString() != "") + { + item.AccidentScene = values.Value("AccidentScene"); + } + if (values["ExerciseWay"].ToString() != "") + { + item.ExerciseWay = values.Value("ExerciseWay"); + } + items.Add(item); + i += 10; + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + /// + /// 上报按钮 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + Save("updata"); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save("submit"); + } + #endregion + + #region Grid1行点击事件 + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + GetItems(string.Empty); + if (e.CommandName == "Add") + { + Model.Information_DrillPlanHalfYearReportItem oldItem = items.FirstOrDefault(x => x.DrillPlanHalfYearReportItemId == rowID); + Model.Information_DrillPlanHalfYearReportItem newItem = new Model.Information_DrillPlanHalfYearReportItem + { + DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)) + }; + if (oldItem != null) + { + newItem.SortIndex = oldItem.SortIndex + 1; + } + else + { + newItem.SortIndex = 0; + } + items.Add(newItem); + items = items.OrderBy(x => x.SortIndex).ToList(); + Grid1.DataSource = items; + Grid1.DataBind(); + } + if (e.CommandName == "Delete") + { + foreach (var item in items) + { + if (item.DrillPlanHalfYearReportItemId == rowID) + { + items.Remove(item); + break; + } + } + Grid1.DataSource = items; + Grid1.DataBind(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取明细 + //private void GetNewItems(string unitId) + //{ + // //增加明细集合 + // var projects = BLL.ProjectService.GetProjectDropDownList(); + // int i = 10; + // foreach (var p in projects) + // { + // Model.Information_DrillPlanHalfYearReportItem item = new Model.Information_DrillPlanHalfYearReportItem(); + // item.DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)); + // item.DrillPlanName = p.ProjectName; + // item.SortIndex = i; + // items.Add(item); + // i += 10; + // } + //i += 10; + //Model.Information_DrillPlanHalfYearReportItem newItem1 = new Model.Information_DrillPlanHalfYearReportItem(); + //newItem1.DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)); + //newItem1.SortIndex = i; + //items.Add(newItem1); + //i += 10; + //Model.Information_DrillPlanHalfYearReportItem newItem2 = new Model.Information_DrillPlanHalfYearReportItem(); + //newItem2.DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)); + //newItem2.SortIndex = i; + //items.Add(newItem2); + //i += 10; + //Model.Information_DrillPlanHalfYearReportItem newItem3 = new Model.Information_DrillPlanHalfYearReportItem(); + //newItem3.DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)); + //newItem3.SortIndex = i; + //items.Add(newItem3); + //i += 10; + //Model.Information_DrillPlanHalfYearReportItem newItem4 = new Model.Information_DrillPlanHalfYearReportItem(); + //newItem4.DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)); + //newItem4.SortIndex = i; + //items.Add(newItem4); + //i += 10; + //Model.Information_DrillPlanHalfYearReportItem newItem5 = new Model.Information_DrillPlanHalfYearReportItem(); + //newItem5.DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)); + //newItem5.SortIndex = i; + //items.Add(newItem5); + //} + #endregion + + #region 单位下拉选择事件 + /// + /// 单位下拉选择事件 + /// + /// + /// + protected void ddlUnitId_SelectedIndexChanged(object sender, EventArgs e) + { + //items.Clear(); + //if (ddlUnitId.SelectedValue != BLL.Const._Null) + //{ + // GetNewItems(ddlUnitId.SelectedValue); + //} + //Grid1.DataSource = items; + //Grid1.DataBind(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.DrillPlanHalfYearReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnCopy.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnSaveUp)) + //{ + // this.btnUpdata.Hidden = false; + + //} + if (buttonList.Contains(BLL.Const.BtnSubmit)) + { + this.btnSubmit.Hidden = false; + } + } + } + #endregion + + #region 关闭办理流程窗口 + /// + /// 关闭办理流程窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + Model.Information_DrillPlanHalfYearReport drillPlanHalfYearReport = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportById(this.DrillPlanHalfYearReportId); + if (drillPlanHalfYearReport != null) + { + if (drillPlanHalfYearReport.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + } + } + } + #endregion + + #region 复制上半年数据 + /// + /// 复制上半年数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + int lastYear = 0, lastHalfYear = 0; + int year = Convert.ToInt32(this.ddlYearId.SelectedValue); + int halfYear = Convert.ToInt32(this.ddlHalfYearId.SelectedValue); + if (halfYear == 1) + { + lastYear = year - 1; + lastHalfYear = 2; + } + else + { + lastYear = year; + lastHalfYear = halfYear - 1; + } + Model.Information_DrillPlanHalfYearReport drillPlanHalfYearReport = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportByUnitIdAndYearAndHalfYear(this.ddlUnitId.SelectedValue, lastYear, lastHalfYear); + if (drillPlanHalfYearReport != null) + { + Model.Information_DrillPlanHalfYearReport newDrillPlanHalfYearReport = new Model.Information_DrillPlanHalfYearReport(); + this.DrillPlanHalfYearReportId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReport)); + newDrillPlanHalfYearReport.DrillPlanHalfYearReportId = this.DrillPlanHalfYearReportId; + newDrillPlanHalfYearReport.UnitId = this.ddlUnitId.SelectedValue; + newDrillPlanHalfYearReport.CompileMan = this.CurrUser.PersonName; + newDrillPlanHalfYearReport.CompileDate = DateTime.Now; + newDrillPlanHalfYearReport.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + newDrillPlanHalfYearReport.HalfYearId = Funs.GetNewIntOrZero(this.ddlHalfYearId.SelectedValue); + newDrillPlanHalfYearReport.Telephone = drillPlanHalfYearReport.Telephone; + newDrillPlanHalfYearReport.UpState = BLL.Const.UpState_2; + newDrillPlanHalfYearReport.HandleMan = this.CurrUser.PersonId; + newDrillPlanHalfYearReport.HandleState = BLL.Const.HandleState_1; + BLL.DrillPlanHalfYearReportService.AddDrillPlanHalfYearReport(newDrillPlanHalfYearReport); + + items = BLL.DrillPlanHalfYearReportItemService.GetDrillPlanHalfYearReportItemList(drillPlanHalfYearReport.DrillPlanHalfYearReportId); + if (items.Count > 0) + { + foreach (var item in items) + { + Model.Information_DrillPlanHalfYearReportItem newItem = new Model.Information_DrillPlanHalfYearReportItem + { + DrillPlanHalfYearReportItemId = SQLHelper.GetNewID(typeof(Model.Information_DrillPlanHalfYearReportItem)), + DrillPlanHalfYearReportId = this.DrillPlanHalfYearReportId, + DrillPlanName = item.DrillPlanName, + OrganizationUnit = item.OrganizationUnit, + DrillPlanDate = item.DrillPlanDate, + AccidentScene = item.AccidentScene, + ExerciseWay = item.ExerciseWay, + SortIndex = item.SortIndex + }; + BLL.DrillPlanHalfYearReportItemService.AddDrillPlanHalfYearReportItem(newItem); + } + } + GetValues(newDrillPlanHalfYearReport.DrillPlanHalfYearReportId); + } + } + + /// + /// 获取值 + /// + /// + private void GetValues(string drillPlanHalfYearReportId) + { + var drill = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportById(drillPlanHalfYearReportId); + if (drill != null) + { + if (!string.IsNullOrEmpty(drill.UnitId.Trim())) + { + this.ddlUnitId.SelectedValue = drill.UnitId.Trim(); + } + if (drill.YearId.HasValue) + { + this.ddlYearId.SelectedValue = drill.YearId.ToString(); + } + if (drill.HalfYearId.HasValue) + { + this.ddlHalfYearId.SelectedValue = drill.HalfYearId.ToString(); + } + if (!string.IsNullOrEmpty(drill.CompileMan)) + { + this.txtCompileMan.Text = drill.CompileMan; + } + this.txtTel.Text = drill.Telephone; + if (drill.CompileDate != null) + { + this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", drill.CompileDate); + } + + items = BLL.DrillPlanHalfYearReportItemService.GetDrillPlanHalfYearReportItemList(drillPlanHalfYearReportId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.designer.cs new file mode 100644 index 00000000..ccb132c6 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/DrillPlanHalfYearReportAdd.aspx.designer.cs @@ -0,0 +1,213 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class DrillPlanHalfYearReportAdd { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ddlUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlUnitId; + + /// + /// ddlYearId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlYearId; + + /// + /// ddlHalfYearId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlHalfYearId; + + /// + /// txtCompileMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCompileMan; + + /// + /// txtTel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTel; + + /// + /// dpkCompileDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker dpkCompileDate; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtDrillPlanName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillPlanName; + + /// + /// txtOrganizationUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOrganizationUnit; + + /// + /// txtDrillPlanDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillPlanDate; + + /// + /// txtAccidentScene 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAccidentScene; + + /// + /// txtExerciseWay 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtExerciseWay; + + /// + /// txtDrillPlanHalfYearReportItemId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDrillPlanHalfYearReportItemId; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx new file mode 100644 index 00000000..6b41a6ef --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx @@ -0,0 +1,311 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MillionsMonthlyReport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.MillionsMonthlyReport" %> + + + + + + + 百万工时安全统计月报表 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.cs new file mode 100644 index 00000000..25e4d384 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.cs @@ -0,0 +1,764 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using BLL; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class MillionsMonthlyReport : PageBase + { + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false); + BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false); + + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + this.drpUnit.Readonly = true; + ////取上个报表时间 + DateTime showDate = System.DateTime.Now.AddMonths(-1); + drpMonth.SelectedValue = showDate.Month.ToString(); + drpYear.SelectedValue = showDate.Year.ToString(); + GetValue(); + } + } + + private void SetEmpty() + { + this.SimpleForm1.Title = string.Empty; + lbUnitName.Text = "填报企业:"; + lbFillingDate.Text = "填报日期:"; + lbDutyPerson.Text = "负责人:"; + lbRecordableIncidentRate.Text = "百万工时总可记录事故率:"; + lbLostTimeRate.Text = "百万工时损失工时率:"; + lbLostTimeInjuryRate.Text = "百万工时损失工时伤害事故率:"; + lbDeathAccidentFrequency.Text = "百万工时死亡事故频率:"; + lbAccidentMortality.Text = "百万工时事故死亡率:"; + lbHandleMan.Text = string.Empty; + this.Grid1.DataSource = null; + this.Grid1.DataBind(); + } + #endregion + + #region 获取记录值 + private void GetValue() + { + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + int month = Funs.GetNewIntOrZero(drpMonth.SelectedValue); + Model.View_Information_MillionsMonthlyReport report = Funs.DB.View_Information_MillionsMonthlyReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Month == month && e.Year == year); + if (report != null) + { + string upState = string.Empty; + if (report.UpState == BLL.Const.UpState_3) + { + upState = "(已上报)"; + } + else + { + upState = "(未上报)"; + } + this.SimpleForm1.Title = "企业百万工时安全统计月报表" + report.MonthStr + report.YearStr + upState; + lbUnitName.Text = "填报企业:" + report.UnitName; + if (report.FillingDate != null) + { + lbFillingDate.Text = "填报日期:" + string.Format("{0:yyyy-MM-dd}", report.FillingDate); + } + else + { + lbFillingDate.Text = "填报日期:"; + } + lbDutyPerson.Text = "负责人:" + report.DutyPerson; + if (report.HandleState == BLL.Const.HandleState_1 || report.UpState == BLL.Const.UpState_3) + { + this.lbHandleMan.Hidden = true; + } + else + { + this.lbHandleMan.Hidden = false; + lbHandleMan.Text = "下一步办理人:" + report.UserName; + } + lbRecordableIncidentRate.Text = "百万工时总可记录事故率:" + (report.RecordableIncidentRate ?? 0).ToString(); + lbLostTimeRate.Text = "百万工时损失工时率:" + (report.LostTimeRate ?? 0).ToString(); + lbLostTimeInjuryRate.Text = "百万工时损失工时伤害事故率:" + (report.LostTimeInjuryRate ?? 0).ToString(); + lbDeathAccidentFrequency.Text = "百万工时死亡事故频率:" + (report.DeathAccidentFrequency ?? 0).ToString(); + lbAccidentMortality.Text = "百万工时事故死亡率:" + (report.AccidentMortality ?? 0).ToString(); + List items = BLL.MillionsMonthlyReportItemService.GetItems(report.MillionsMonthlyReportId); + //本年度累计行 + Model.Information_MillionsMonthlyReportItem yearTotalItem = new Model.Information_MillionsMonthlyReportItem(); + //之前月度合计值集合 + List yearSumItems = BLL.MillionsMonthlyReportItemService.GetYearSumItems(report.UnitId, report.Year, report.Month); + yearTotalItem.MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)); + yearTotalItem.MillionsMonthlyReportId = report.MillionsMonthlyReportId; + yearTotalItem.SortIndex = (items.Count + 1) * 10; + yearTotalItem.Affiliation = "本年度累计"; + yearTotalItem.Name = "本年度累计"; + yearTotalItem.PostPersonNum = yearSumItems.Sum(x => x.PostPersonNum ?? 0); + yearTotalItem.SnapPersonNum = yearSumItems.Sum(x => x.SnapPersonNum ?? 0); + yearTotalItem.ContractorNum = yearSumItems.Sum(x => x.ContractorNum ?? 0); + yearTotalItem.SumPersonNum = yearSumItems.Sum(x => x.SumPersonNum ?? 0); + yearTotalItem.TotalWorkNum = yearSumItems.Sum(x => x.TotalWorkNum ?? 0); + yearTotalItem.SeriousInjuriesNum = yearSumItems.Sum(x => x.SeriousInjuriesNum ?? 0); + yearTotalItem.SeriousInjuriesPersonNum = yearSumItems.Sum(x => x.SeriousInjuriesPersonNum ?? 0); + yearTotalItem.SeriousInjuriesLossHour = yearSumItems.Sum(x => x.SeriousInjuriesLossHour ?? 0); + yearTotalItem.MinorAccidentNum = yearSumItems.Sum(x => x.MinorAccidentNum ?? 0); + yearTotalItem.MinorAccidentPersonNum = yearSumItems.Sum(x => x.MinorAccidentPersonNum ?? 0); + yearTotalItem.MinorAccidentLossHour = yearSumItems.Sum(x => x.MinorAccidentLossHour ?? 0); + yearTotalItem.OtherAccidentNum = yearSumItems.Sum(x => x.OtherAccidentNum ?? 0); + yearTotalItem.OtherAccidentPersonNum = yearSumItems.Sum(x => x.OtherAccidentPersonNum ?? 0); + yearTotalItem.OtherAccidentLossHour = yearSumItems.Sum(x => x.OtherAccidentLossHour ?? 0); + yearTotalItem.RestrictedWorkPersonNum = yearSumItems.Sum(x => x.RestrictedWorkPersonNum ?? 0); + yearTotalItem.RestrictedWorkLossHour = yearSumItems.Sum(x => x.RestrictedWorkLossHour ?? 0); + yearTotalItem.MedicalTreatmentPersonNum = yearSumItems.Sum(x => x.MedicalTreatmentPersonNum ?? 0); + yearTotalItem.MedicalTreatmentLossHour = yearSumItems.Sum(x => x.MedicalTreatmentLossHour ?? 0); + yearTotalItem.FireNum = yearSumItems.Sum(x => x.FireNum ?? 0); + yearTotalItem.ExplosionNum = yearSumItems.Sum(x => x.ExplosionNum ?? 0); + yearTotalItem.TrafficNum = yearSumItems.Sum(x => x.TrafficNum ?? 0); + yearTotalItem.EquipmentNum = yearSumItems.Sum(x => x.EquipmentNum ?? 0); + yearTotalItem.QualityNum = yearSumItems.Sum(x => x.QualityNum ?? 0); + yearTotalItem.OtherNum = yearSumItems.Sum(x => x.OtherNum ?? 0); + yearTotalItem.FirstAidDressingsNum = yearSumItems.Sum(x => x.FirstAidDressingsNum ?? 0); + yearTotalItem.AttemptedEventNum = yearSumItems.Sum(x => x.AttemptedEventNum ?? 0); + yearTotalItem.LossDayNum = yearSumItems.Sum(x => x.LossDayNum ?? 0); + items.Add(yearTotalItem); + Grid1.DataSource = items; + Grid1.DataBind(); + if (Grid1.Rows.Count > 2) + { + Grid1.Rows[Grid1.Rows.Count - 2].Values[0] = ""; + Grid1.Rows[Grid1.Rows.Count - 2].Values[1] = ""; + } + if (Grid1.Rows.Count > 1) + { + Grid1.Rows[Grid1.Rows.Count - 1].Values[0] = ""; + Grid1.Rows[Grid1.Rows.Count - 1].Values[1] = ""; + } + } + else + { + SetEmpty(); + } + this.GetButtonPower(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭查看审批信息弹出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + #endregion + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.MillionsMonthlyReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnIn)) + { + this.btnImport.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnPrint)) + { + this.btnPrint.Hidden = false; + } + } + + var getReport = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + this.btnAudit1.Hidden = true; + this.btnAudit2.Hidden = true; + this.btnUpdata.Hidden = true; + if (getReport != null) + { + this.btnNew.Hidden = true; + if (getReport.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入 + { + if (getReport.HandleState == BLL.Const.HandleState_2) + { + this.btnAudit1.Hidden = false; + this.btnEdit.Hidden = true; + } + else if (getReport.HandleState == BLL.Const.HandleState_3) + { + this.btnAudit2.Hidden = false; + this.btnEdit.Hidden = true; + } + else if (getReport.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + this.btnEdit.Hidden = true; + } + } + } + } + #endregion + + #region 增加、修改、审核、审批、上报、删除 + /// + /// 增加 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MillionsMonthlyReportSave.aspx?UnitId={0}&&Year={1}&&Months={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpMonth.SelectedValue, "编辑 - "))); + } + + /// + /// 修改 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MillionsMonthlyReportSave.aspx?MillionsMonthlyReportId={0}", report.MillionsMonthlyReportId, "编辑 - "))); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + + /// + /// 审核 + /// + /// + /// + protected void btnAudit1_Click(object sender, EventArgs e) + { + Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MillionsMonthlyReportSave.aspx?MillionsMonthlyReportId={0}", report.MillionsMonthlyReportId, "编辑 - "))); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + + /// + /// 审批 + /// + /// + /// + protected void btnAudit2_Click(object sender, EventArgs e) + { + Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MillionsMonthlyReportSave.aspx?MillionsMonthlyReportId={0}", report.MillionsMonthlyReportId, "编辑 - "))); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + + /// + /// 上报 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MillionsMonthlyReportSave.aspx?MillionsMonthlyReportId={0}", report.MillionsMonthlyReportId, "编辑 - "))); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + + /// + /// 删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.MillionsMonthlyReportId, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnDelete); + BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.MillionsMonthlyReportId); + BLL.MillionsMonthlyReportItemService.DeleteMillionsMonthlyReportItemByMillionsMonthlyReportId(report.MillionsMonthlyReportId); + BLL.MillionsMonthlyReportService.DeleteMillionsMonthlyReportByMillionsMonthlyReportId(report.MillionsMonthlyReportId); + + SetEmpty(); + this.btnNew.Hidden = false; + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + else + { + ShowNotify("所选时间无报表记录!"); + } + } + #endregion + + #region 格式化字符串 + /// + /// 把时间转换为文字形式 + /// + /// + /// + protected string ConvertCompileDate(object CompileDate) + { + if (CompileDate != null) + { + return string.Format("{0:yyyy-MM-dd}", CompileDate); + } + return ""; + } + + /// + /// 把时间转换为文字形式 + /// + /// + /// + protected string ConvertDate(object MillionsMonthlyReportId) + { + if (MillionsMonthlyReportId != null) + { + Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId.ToString()); + if (report != null) + { + return report.Year + "年" + report.Month + "月"; + } + } + return ""; + } + #endregion + + #region 单位下拉选择事件 + /// + /// 单位下拉框联动事件 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + var units = BLL.UnitService.GetUnitDropDownList(); + if (units != null && !string.IsNullOrEmpty(this.drpUnit.SelectedText)) + { + var unit = units.FirstOrDefault(x => x.UnitName.Contains(this.drpUnit.SelectedText)); + if (unit != null) + { + drpUnit.SelectedValue = unit.UnitId; + } + } + + GetValue(); + } + #endregion + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../DataIn/MillionsMonthlyReportImport.aspx", "导入 - "))); + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_MillionsMonthlyReportId, report.MillionsMonthlyReportId, "", "打印 - "))); + } + } + #endregion + + #region 月份向前/向后 + /// + /// 前一个月 + /// + /// + /// + protected void BtnBulletLeft_Click(object sender, EventArgs e) + { + SetMonthChange("-"); + } + + /// + /// 后一个月 + /// + /// + /// + protected void BulletRight_Click(object sender, EventArgs e) + { + SetMonthChange("+"); + } + + /// + /// 月份加减变化 + /// + /// + private void SetMonthChange(string type) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + if (type == "+") + { + showDate = nowDate.Value.AddMonths(1); + } + else + { + showDate = nowDate.Value.AddMonths(-1); + } + + this.drpYear.SelectedValue = showDate.Year.ToString(); + drpMonth.SelectedValue = showDate.Month.ToString(); + ///值变化 + GetValue(); + } + } + #endregion + + #region 查看审批信息 + /// + /// 查看审批信息 + /// + /// + /// + protected void btnSee_Click(object sender, EventArgs e) + { + Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.MillionsMonthlyReportId, "查看 - "))); + } + else + { + ShowNotify("所选月份无记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("百万工时安全统计月报" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + MultiHeaderTable mht = new MultiHeaderTable(); + mht.ResolveMultiHeaderTable(Grid1.Columns); + sb.Append(""); + sb.Append(""); + foreach (List rows in mht.MultiTable) + { + sb.Append(""); + foreach (object[] cell in rows) + { int rowspan = Convert.ToInt32(cell[0]); + int colspan = Convert.ToInt32(cell[1]); + GridColumn column = cell[2] as GridColumn; + + sb.AppendFormat("{3}", + rowspan != 1 ? " rowspan=\"" + rowspan + "\"" : "", + colspan != 1 ? " colspan=\"" + colspan + "\"" : "", + colspan != 1 ? " style=\"text-align:center;\"" : "", + column.HeaderText); + } + sb.Append(""); + } + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in mht.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as AspNet.Label).Text; + } + sb.AppendFormat("", html); + } + sb.Append(""); + } + sb.Append("
{0}
"); + return sb.ToString(); + } + + #region 多表头处理 + /// + /// 多表头处理 + /// + public class MultiHeaderTable + { + // 包含 rowspan,colspan 的多表头,方便生成 HTML 的 table 标签 + public List> MultiTable = new List>(); + // 最终渲染的列数组 + public List Columns = new List(); + public void ResolveMultiHeaderTable(GridColumnCollection columns) + { + List row = new List(); + foreach (GridColumn column in columns) + { + object[] cell = new object[4]; + cell[0] = 1; // rowspan + cell[1] = 1; // colspan + cell[2] = column; + cell[3] = null; + row.Add(cell); + } + ResolveMultiTable(row, 0); + ResolveColumns(row); + } + + private void ResolveColumns(List row) + { + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + List subrow = new List(); + foreach (GridColumn column in groupField.Columns) + { + subrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + ResolveColumns(subrow); + } + else + { + Columns.Add(cell[2] as GridColumn); + } + } + } + + private void ResolveMultiTable(List row, int level) + { + List nextrow = new List(); + + foreach (object[] cell in row) + { + GroupField groupField = cell[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // 如果当前列包含子列,则更改当前列的 colspan,以及增加父列(向上递归)的colspan + cell[1] = Convert.ToInt32(groupField.Columns.Count); + PlusColspan(level - 1, cell[3] as GridColumn, groupField.Columns.Count - 1); + + foreach (GridColumn column in groupField.Columns) + { + nextrow.Add(new object[] + { + 1, + 1, + column, + groupField + }); + } + } + } + MultiTable.Add(row); + // 如果当前下一行,则增加上一行(向上递归)中没有子列的列的 rowspan + if (nextrow.Count > 0) + { + PlusRowspan(level); + ResolveMultiTable(nextrow, level + 1); + } + } + + private void PlusRowspan(int level) + { + if (level < 0) + { + return; + } + foreach (object[] cells in MultiTable[level]) + { + GroupField groupField = cells[2] as GroupField; + if (groupField != null && groupField.Columns.Count > 0) + { + // ... + } + else + { + cells[0] = Convert.ToInt32(cells[0]) + 1; + } + } + PlusRowspan(level - 1); + } + + private void PlusColspan(int level, GridColumn parent, int plusCount) + { + if (level < 0) + { + return; + } + + foreach (object[] cells in MultiTable[level]) + { + GridColumn column = cells[2] as GridColumn; + if (column == parent) + { + cells[1] = Convert.ToInt32(cells[1]) + plusCount; + + PlusColspan(level - 1, cells[3] as GridColumn, plusCount); + } + } + } + } + #endregion + #endregion + + #region 查看未上报的项目 + /// + /// 查看未上报的项目 + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) + { + string info = string.Empty; + DateTime date = Convert.ToDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue + "-01").AddDays(-1).AddMonths(1); + var projects = (from x in Funs.DB.Base_Project + where (x.ProjectState == BLL.Const.ProjectState_1 || x.ProjectState == null) + && x.StartDate <= date + select x).ToList(); + foreach (var item in projects) + { + var millionsMonthlyReport = Funs.DB.InformationProject_MillionsMonthlyReport.FirstOrDefault(x => x.ProjectId == item.ProjectId && x.Year == date.Year && x.Month == date.Month); + if (millionsMonthlyReport == null) + { + info += item.ProjectCode + ":" + item.ProjectName + ",未填写报表;
"; + } + else + { + if (millionsMonthlyReport.States != BLL.Const.State_2) + { + info += item.ProjectCode + ":" + item.ProjectName + "报表未报;"; + var flows = (from x in Funs.DB.Sys_FlowOperate + join y in Funs.DB.Person_Persons on x.OperaterId equals y.PersonId + where x.DataId == millionsMonthlyReport.MillionsMonthlyReportId && x.IsClosed != false + select y).FirstOrDefault(); + if (flows != null) + { + info += "待" + flows.PersonName + "处理;"; + } + info += "
"; + } + } + } + + if (!string.IsNullOrEmpty(info)) + { + Alert.ShowInTop(info + "项目报表未上报。", MessageBoxIcon.Warning); + } + else + { + ShowNotify("项目报表已上报", MessageBoxIcon.Success); + } + + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.designer.cs new file mode 100644 index 00000000..bffd7619 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReport.aspx.designer.cs @@ -0,0 +1,366 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class MillionsMonthlyReport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpMonth 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpMonth; + + /// + /// BtnBulletLeft 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletLeft; + + /// + /// BtnBulletRight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletRight; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnAudit1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit1; + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit2; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// btnView 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnView; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// lbUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbUnitName; + + /// + /// lbFillingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbFillingDate; + + /// + /// lbDutyPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbDutyPerson; + + /// + /// lbHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbHandleMan; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// Form3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form3; + + /// + /// lbRecordableIncidentRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbRecordableIncidentRate; + + /// + /// lbLostTimeRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbLostTimeRate; + + /// + /// lbLostTimeInjuryRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbLostTimeInjuryRate; + + /// + /// lbDeathAccidentFrequency 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbDeathAccidentFrequency; + + /// + /// lbAccidentMortality 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbAccidentMortality; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Window4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window4; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx new file mode 100644 index 00000000..d20630af --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx @@ -0,0 +1,397 @@ +<%@ Page Language="C#" AutoEventWireup="true" Async="true" CodeBehind="MillionsMonthlyReportSave.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.MillionsMonthlyReportSave" %> + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs new file mode 100644 index 00000000..38a3157e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.cs @@ -0,0 +1,993 @@ +using BLL; +using Model; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class MillionsMonthlyReportSave : PageBase + { + #region 定义变量 + /// + /// 报表主键Id + /// + public string MillionsMonthlyReportId + { + get + { + return (string)ViewState["MillionsMonthlyReportId"]; + } + set + { + ViewState["MillionsMonthlyReportId"] = value; + } + } + + /// + /// 定义集合 + /// + private static List items = new List(); + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + items.Clear(); + BLL.ConstValue.InitConstValueDropDownList(this.drpMonth, ConstValue.Group_0009, false); + BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false); + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + this.drpUnit.Readonly = true; + string unitId = Request.QueryString["UnitId"]; + string year = Request.QueryString["Year"]; + string months = Request.QueryString["Months"]; + MillionsMonthlyReportId = Request.QueryString["MillionsMonthlyReportId"]; + if (!String.IsNullOrEmpty(MillionsMonthlyReportId)) + { + items = BLL.MillionsMonthlyReportItemService.GetItemsNoSum(MillionsMonthlyReportId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId); + if (report != null) + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + this.btnCopy.Hidden = true; + if (report.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + else + { + if (report.HandleMan == this.CurrUser.PersonId || this.CurrUser.PersonId == BLL.Const.sysglyId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + } + if (report.UpState == BLL.Const.UpState_3) + { + this.btnSave.Hidden = true; + this.btnUpdata.Hidden = true; + } + drpMonth.SelectedValue = report.Month.ToString(); + drpYear.SelectedValue = report.Year.ToString(); + drpUnit.SelectedValue = report.UnitId; + if (report.FillingDate != null) + { + txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", report.FillingDate); + } + txtDutyPerson.Text = report.DutyPerson; + if (report.RecordableIncidentRate != null) + { + txtRecordableIncidentRate.Text = report.RecordableIncidentRate.ToString(); + } + if (report.LostTimeRate != null) + { + txtLostTimeRate.Text = report.LostTimeRate.ToString(); + } + if (report.LostTimeInjuryRate != null) + { + txtLostTimeInjuryRate.Text = report.LostTimeInjuryRate.ToString(); + } + if (report.DeathAccidentFrequency != null) + { + txtDeathAccidentFrequency.Text = report.DeathAccidentFrequency.ToString(); + } + if (report.AccidentMortality != null) + { + txtAccidentMortality.Text = report.AccidentMortality.ToString(); + } + } + } + else + { + this.btnCopy.Hidden = false; + drpMonth.SelectedValue = months; + drpYear.SelectedValue = year; + txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + txtDutyPerson.Text = this.CurrUser.PersonName; + //增加明细集合 + GetNewItems(year, months); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + this.txtRecordableIncidentRate.Text = "0"; + this.txtLostTimeRate.Text = "0"; + this.txtLostTimeInjuryRate.Text = "0"; + this.txtDeathAccidentFrequency.Text = "0"; + this.txtAccidentMortality.Text = "0"; + } + } + } + #endregion + + #region 关闭窗口 + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + Model.Information_MillionsMonthlyReport report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId); + if (report.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + } + } + #endregion + + #region 保存、提交、上报 + /// + /// 保存数据 + /// + /// + private void Save(string type) + { + //string millionsMonthlyReportId = Request.QueryString["MillionsMonthlyReportId"]; + Model.Information_MillionsMonthlyReport report = new Information_MillionsMonthlyReport + { + UnitId = drpUnit.SelectedValue, + Year = Funs.GetNewIntOrZero(drpYear.SelectedValue), + Month = Funs.GetNewIntOrZero(drpMonth.SelectedValue) + }; + if (!string.IsNullOrEmpty(txtFillingDate.Text.Trim())) + { + report.FillingDate = Convert.ToDateTime(txtFillingDate.Text.Trim()); + } + report.DutyPerson = txtDutyPerson.Text.Trim(); + if (!string.IsNullOrEmpty(txtRecordableIncidentRate.Text.Trim())) + { + report.RecordableIncidentRate = Convert.ToDecimal(txtRecordableIncidentRate.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtLostTimeRate.Text.Trim())) + { + report.LostTimeRate = Convert.ToDecimal(txtLostTimeRate.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtLostTimeInjuryRate.Text.Trim())) + { + report.LostTimeInjuryRate = Convert.ToDecimal(txtLostTimeInjuryRate.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtDeathAccidentFrequency.Text.Trim())) + { + report.DeathAccidentFrequency = Convert.ToDecimal(txtDeathAccidentFrequency.Text.Trim()); + } + if (!string.IsNullOrEmpty(txtAccidentMortality.Text.Trim())) + { + report.AccidentMortality = Convert.ToDecimal(txtAccidentMortality.Text.Trim()); + } + + if (String.IsNullOrEmpty(MillionsMonthlyReportId)) + { + Information_MillionsMonthlyReport old = MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdDate(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpMonth.SelectedValue)); + if (old == null) + { + report.MillionsMonthlyReportId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReport)); + report.UpState = BLL.Const.UpState_2; + report.FillingMan = this.CurrUser.PersonName; + report.HandleState = BLL.Const.HandleState_1; + report.HandleMan = this.CurrUser.PersonId; + BLL.MillionsMonthlyReportService.AddMillionsMonthlyReport(report); + BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.MillionsMonthlyReportId, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnAdd); + } + else + { + ShowNotify("该月份记录已存在!", MessageBoxIcon.Warning); + return; + } + } + else + { + Model.Information_MillionsMonthlyReport oldReport = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(MillionsMonthlyReportId); + if (oldReport != null) + { + report.HandleMan = oldReport.HandleMan; + report.HandleState = oldReport.HandleState; + } + report.MillionsMonthlyReportId = MillionsMonthlyReportId; + report.UpState = BLL.Const.UpState_2; + BLL.MillionsMonthlyReportService.UpdateMillionsMonthlyReport(report); + BLL.LogService.AddSys_Log(this.CurrUser, report.Year.ToString() + "-" + report.Month.ToString(), report.MillionsMonthlyReportId, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnModify); + } + MillionsMonthlyReportId = report.MillionsMonthlyReportId; + BLL.MillionsMonthlyReportItemService.DeleteMillionsMonthlyReportItemByMillionsMonthlyReportId(report.MillionsMonthlyReportId); + List mReportItemList = new List(); + GetItems(report.MillionsMonthlyReportId); + foreach (var item in items) + { + if (!string.IsNullOrEmpty(item.Name)) + { + item.Affiliation = System.Web.HttpUtility.HtmlDecode(item.Affiliation); + item.Name = System.Web.HttpUtility.HtmlDecode(item.Name); + MillionsMonthlyReportItemService.AddMillionsMonthlyReportItem(item); + mReportItemList.Add(item); + } + } + if (type == "updata") //数据同步 + { + if (report.UpState == BLL.Const.UpState_2) + { + string code = CNCECHSSEWebService.UpMillionsMonthlyReport(report.MillionsMonthlyReportId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + else + { + ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning); + return; + } + } + if (type == "submit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=MillionsMonthlyReport&Id={0}", report.MillionsMonthlyReportId, "编辑 - "))); + } + } + + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + protected void btnUpdata_Click(object sender, EventArgs e) + { + Save("updata"); + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save("submit"); + } + #endregion + + #region 增加本月明细 + private void GetItems(string millionsMonthlyReportId) + { + decimal TotalWorkNumSum = 0; + int PostPersonNumSum = 0, SnapPersonNumSum = 0, ContractorNumSum = 0, SumPersonNumSum = 0, SeriousInjuriesNumSum = 0, SeriousInjuriesPersonNumSum = 0, SeriousInjuriesLossHourSum = 0, MinorAccidentNumSum = 0, + MinorAccidentPersonNumSum = 0, MinorAccidentLossHourSum = 0, OtherAccidentNumSum = 0, OtherAccidentPersonNumSum = 0, OtherAccidentLossHourSum = 0, RestrictedWorkPersonNumSum = 0, RestrictedWorkLossHourSum = 0, MedicalTreatmentPersonNumSum = 0, MedicalTreatmentLossHourSum = 0, + FireNumSum = 0, ExplosionNumSum = 0, TrafficNumSum = 0, EquipmentNumSum = 0, QualityNumSum = 0, OtherNumSum = 0, FirstAidDressingsNumSum = 0, AttemptedEventNumSum = 0, LossDayNumSum = 0; + items.Clear(); + int i = 10; + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int SumPersonNum = 0; + Model.Information_MillionsMonthlyReportItem item = new Information_MillionsMonthlyReportItem(); + if (values["MillionsMonthlyReportItemId"].ToString() != "") + { + item.MillionsMonthlyReportItemId = values.Value("MillionsMonthlyReportItemId"); + } + item.MillionsMonthlyReportId = millionsMonthlyReportId; + item.SortIndex = i; + if (!string.IsNullOrEmpty(values["Affiliation"].ToString())) + { + item.Affiliation = values.Value("Affiliation"); + } + if (!string.IsNullOrEmpty(values["Name"].ToString())) + { + item.Name = values.Value("Name"); + } + if (!string.IsNullOrEmpty(values["PostPersonNum"].ToString())) + { + item.PostPersonNum = values.Value("PostPersonNum"); + SumPersonNum += values.Value("PostPersonNum"); + PostPersonNumSum += values.Value("PostPersonNum"); + SumPersonNumSum += values.Value("PostPersonNum"); + } + else + { + item.PostPersonNum = 0; + } + if (!string.IsNullOrEmpty(values["SnapPersonNum"].ToString())) + { + item.SnapPersonNum = values.Value("SnapPersonNum"); + SumPersonNum += values.Value("SnapPersonNum"); + SnapPersonNumSum += values.Value("SnapPersonNum"); + SumPersonNumSum += values.Value("SnapPersonNum"); + } + else + { + item.SnapPersonNum = 0; + } + if (!string.IsNullOrEmpty(values["ContractorNum"].ToString())) + { + item.ContractorNum = values.Value("ContractorNum"); + SumPersonNum += values.Value("ContractorNum"); + ContractorNumSum += values.Value("ContractorNum"); + SumPersonNumSum += values.Value("ContractorNum"); + } + else + { + item.ContractorNum = 0; + } + if (SumPersonNum != 0) + { + item.SumPersonNum = SumPersonNum; //获取每条明细记录员工总数合计值 + } + if (!string.IsNullOrEmpty(values["TotalWorkNum"].ToString())) + { + item.TotalWorkNum = values.Value("TotalWorkNum"); + TotalWorkNumSum += values.Value("TotalWorkNum"); + } + else + { + item.TotalWorkNum = 0; + } + if (!string.IsNullOrEmpty(values["SeriousInjuriesNum"].ToString())) + { + item.SeriousInjuriesNum = values.Value("SeriousInjuriesNum"); + SeriousInjuriesNumSum += values.Value("SeriousInjuriesNum"); + } + else + { + item.SeriousInjuriesNum = 0; + } + if (!string.IsNullOrEmpty(values["SeriousInjuriesPersonNum"].ToString())) + { + item.SeriousInjuriesPersonNum = values.Value("SeriousInjuriesPersonNum"); + SeriousInjuriesPersonNumSum += values.Value("SeriousInjuriesPersonNum"); + } + else + { + item.SeriousInjuriesPersonNum = 0; + } + if (values["SeriousInjuriesLossHour"].ToString() != "") + { + item.SeriousInjuriesLossHour = values.Value("SeriousInjuriesLossHour"); + SeriousInjuriesLossHourSum += values.Value("SeriousInjuriesLossHour"); + } + else + { + item.SeriousInjuriesLossHour = 0; + } + if (values["MinorAccidentNum"].ToString() != "") + { + item.MinorAccidentNum = values.Value("MinorAccidentNum"); + MinorAccidentNumSum += values.Value("MinorAccidentNum"); + } + else + { + item.MinorAccidentNum = 0; + } + if (values["MinorAccidentPersonNum"].ToString() != "") + { + item.MinorAccidentPersonNum = values.Value("MinorAccidentPersonNum"); + MinorAccidentPersonNumSum += values.Value("MinorAccidentPersonNum"); + } + if (values["MinorAccidentLossHour"].ToString() != "") + { + item.MinorAccidentLossHour = values.Value("MinorAccidentLossHour"); + MinorAccidentLossHourSum += values.Value("MinorAccidentLossHour"); + } + else + { + item.MinorAccidentLossHour = 0; + } + if (values["OtherAccidentNum"].ToString() != "") + { + item.OtherAccidentNum = values.Value("OtherAccidentNum"); + OtherAccidentNumSum += values.Value("OtherAccidentNum"); + } + if (values["OtherAccidentPersonNum"].ToString() != "") + { + item.OtherAccidentPersonNum = values.Value("OtherAccidentPersonNum"); + OtherAccidentPersonNumSum += values.Value("OtherAccidentPersonNum"); + } + else + { + item.OtherAccidentPersonNum = 0; + } + if (values["OtherAccidentLossHour"].ToString() != "") + { + item.OtherAccidentLossHour = values.Value("OtherAccidentLossHour"); + OtherAccidentLossHourSum += values.Value("OtherAccidentLossHour"); + } + else + { + item.OtherAccidentLossHour = 0; + } + if (values["RestrictedWorkPersonNum"].ToString() != "") + { + item.RestrictedWorkPersonNum = values.Value("RestrictedWorkPersonNum"); + RestrictedWorkPersonNumSum += values.Value("RestrictedWorkPersonNum"); + } + else + { + item.RestrictedWorkPersonNum = 0; + } + if (values["RestrictedWorkLossHour"].ToString() != "") + { + item.RestrictedWorkLossHour = values.Value("RestrictedWorkLossHour"); + RestrictedWorkLossHourSum += values.Value("RestrictedWorkLossHour"); + } + else + { + item.RestrictedWorkLossHour = 0; + } + if (values["MedicalTreatmentPersonNum"].ToString() != "") + { + item.MedicalTreatmentPersonNum = values.Value("MedicalTreatmentPersonNum"); + MedicalTreatmentPersonNumSum += values.Value("MedicalTreatmentPersonNum"); + } + else + { + item.MedicalTreatmentPersonNum = 0; + } + if (values["MedicalTreatmentLossHour"].ToString() != "") + { + item.MedicalTreatmentLossHour = values.Value("MedicalTreatmentLossHour"); + MedicalTreatmentLossHourSum += values.Value("MedicalTreatmentLossHour"); + } + else + { + item.MedicalTreatmentLossHour = 0; + } + if (values["FireNum"].ToString() != "") + { + item.FireNum = values.Value("FireNum"); + FireNumSum += values.Value("FireNum"); + } + else + { + item.FireNum = 0; + } + if (values["ExplosionNum"].ToString() != "") + { + item.ExplosionNum = values.Value("ExplosionNum"); + ExplosionNumSum += values.Value("ExplosionNum"); + } + else + { + item.ExplosionNum = 0; + } + if (values["TrafficNum"].ToString() != "") + { + item.TrafficNum = values.Value("TrafficNum"); + TrafficNumSum += values.Value("TrafficNum"); + } + else + { + item.TrafficNum = 0; + } + if (values["EquipmentNum"].ToString() != "") + { + item.EquipmentNum = values.Value("EquipmentNum"); + EquipmentNumSum += values.Value("EquipmentNum"); + } + else + { + item.EquipmentNum = 0; + } + if (values["QualityNum"].ToString() != "") + { + item.QualityNum = values.Value("QualityNum"); + QualityNumSum += values.Value("QualityNum"); + } + else + { + item.QualityNum = 0; + } + if (values["OtherNum"].ToString() != "") + { + item.OtherNum = values.Value("OtherNum"); + OtherNumSum += values.Value("OtherNum"); + } + else + { + item.OtherNum = 0; + } + if (values["FirstAidDressingsNum"].ToString() != "") + { + item.FirstAidDressingsNum = values.Value("FirstAidDressingsNum"); + FirstAidDressingsNumSum += values.Value("FirstAidDressingsNum"); + } + else + { + item.FirstAidDressingsNum = 0; + } + if (values["AttemptedEventNum"].ToString() != "") + { + item.AttemptedEventNum = values.Value("AttemptedEventNum"); + AttemptedEventNumSum += values.Value("AttemptedEventNum"); + } + else + { + item.AttemptedEventNum = 0; + } + if (values["LossDayNum"].ToString() != "") + { + item.LossDayNum = values.Value("LossDayNum"); + LossDayNumSum += values.Value("LossDayNum"); + } + else + { + item.LossDayNum = 0; + } + items.Add(item); + i += 10; + } + + Information_MillionsMonthlyReportItem totalItem = new Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)), + MillionsMonthlyReportId = millionsMonthlyReportId, + SortIndex = i + 10, + Affiliation = "本月合计", + Name = "本月合计", + PostPersonNum = PostPersonNumSum, + SnapPersonNum = SnapPersonNumSum, + ContractorNum = ContractorNumSum, + SumPersonNum = SumPersonNumSum, + TotalWorkNum = TotalWorkNumSum, + SeriousInjuriesNum = SeriousInjuriesNumSum, + SeriousInjuriesPersonNum = SeriousInjuriesPersonNumSum, + SeriousInjuriesLossHour = SeriousInjuriesLossHourSum, + MinorAccidentNum = MinorAccidentNumSum, + MinorAccidentPersonNum = MinorAccidentPersonNumSum, + MinorAccidentLossHour = MinorAccidentLossHourSum, + OtherAccidentNum = OtherAccidentNumSum, + OtherAccidentPersonNum = OtherAccidentPersonNumSum, + OtherAccidentLossHour = OtherAccidentLossHourSum, + RestrictedWorkPersonNum = RestrictedWorkPersonNumSum, + RestrictedWorkLossHour = RestrictedWorkLossHourSum, + MedicalTreatmentPersonNum = MedicalTreatmentPersonNumSum, + MedicalTreatmentLossHour = MedicalTreatmentLossHourSum, + FireNum = FireNumSum, + ExplosionNum = ExplosionNumSum, + TrafficNum = TrafficNumSum, + EquipmentNum = EquipmentNumSum, + QualityNum = QualityNumSum, + OtherNum = OtherNumSum, + FirstAidDressingsNum = FirstAidDressingsNumSum, + AttemptedEventNum = AttemptedEventNumSum, + LossDayNum = LossDayNumSum + }; + items.Add(totalItem); + } + #endregion + + #region Grid行点击事件 + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string rowID = Grid1.DataKeys[e.RowIndex][0].ToString(); + GetItems(string.Empty); + Model.Information_MillionsMonthlyReportItem totalItem = items.FirstOrDefault(x => x.Affiliation == "本月合计"); + items.Remove(totalItem); + if (e.CommandName == "Add") + { + Model.Information_MillionsMonthlyReportItem oldItem = items.FirstOrDefault(x => x.MillionsMonthlyReportItemId == rowID); + Model.Information_MillionsMonthlyReportItem newItem = new Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)) + }; + if (oldItem != null) + { + newItem.SortIndex = oldItem.SortIndex + 1; + newItem.Affiliation = oldItem.Affiliation; + } + else + { + newItem.SortIndex = 0; + } + items.Add(newItem); + items = items.OrderBy(x => x.SortIndex).ToList(); + Grid1.DataSource = items; + Grid1.DataBind(); + } + if (e.CommandName == "Delete") + { + foreach (var item in items) + { + if (item.MillionsMonthlyReportItemId == rowID) + { + items.Remove(item); + break; + } + } + Grid1.DataSource = items; + Grid1.DataBind(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 获取明细 + private void GetNewItems(string year, string months) + { + //获取项目集合 + List millionsMonthlyReports = (from x in Funs.DB.InformationProject_MillionsMonthlyReport where x.Year.ToString() == year && x.Month.ToString() == months && x.States == BLL.Const.State_2 select x).ToList(); + List projectIds = millionsMonthlyReports.Select(x => x.ProjectId).ToList(); + //增加明细集合 + Model.Information_MillionsMonthlyReportItem item1 = new Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)), + Affiliation = "机关后勤服务", + Name = "总部", + SortIndex = 10, + PostPersonNum = 0, + SnapPersonNum = 0, + ContractorNum = 0, + SumPersonNum = 0, + TotalWorkNum = 0, + SeriousInjuriesNum = 0, + SeriousInjuriesPersonNum = 0, + SeriousInjuriesLossHour = 0, + MinorAccidentNum = 0, + MinorAccidentPersonNum = 0, + MinorAccidentLossHour = 0, + OtherAccidentNum = 0, + OtherAccidentPersonNum = 0, + OtherAccidentLossHour = 0, + RestrictedWorkPersonNum = 0, + RestrictedWorkLossHour = 0, + MedicalTreatmentPersonNum = 0, + MedicalTreatmentLossHour = 0, + FireNum = 0, + ExplosionNum = 0, + TrafficNum = 0, + EquipmentNum = 0, + QualityNum = 0, + OtherNum = 0, + FirstAidDressingsNum = 0, + AttemptedEventNum = 0, + LossDayNum = 0, + }; + + items.Add(item1); + Model.Information_MillionsMonthlyReportItem item2 = new Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)), + Affiliation = "机关后勤服务", + Name = "二级单位", + SortIndex = 20, + PostPersonNum = 0, + SnapPersonNum = 0, + ContractorNum = 0, + SumPersonNum = 0, + TotalWorkNum = 0, + SeriousInjuriesNum = 0, + SeriousInjuriesPersonNum = 0, + SeriousInjuriesLossHour = 0, + MinorAccidentNum = 0, + MinorAccidentPersonNum = 0, + MinorAccidentLossHour = 0, + OtherAccidentNum = 0, + OtherAccidentPersonNum = 0, + OtherAccidentLossHour = 0, + RestrictedWorkPersonNum = 0, + RestrictedWorkLossHour = 0, + MedicalTreatmentPersonNum = 0, + MedicalTreatmentLossHour = 0, + FireNum = 0, + ExplosionNum = 0, + TrafficNum = 0, + EquipmentNum = 0, + QualityNum = 0, + OtherNum = 0, + FirstAidDressingsNum = 0, + AttemptedEventNum = 0, + LossDayNum = 0, + }; + items.Add(item2); + var projects = (from x in Funs.DB.Base_Project + where projectIds.Contains(x.ProjectId) + select x).ToList(); + + if (this.CurrUser.UnitId == BLL.Const.UnitId_SEDIN) + { + projects = BLL.ProjectService.GetProjectWorkList(); + } + int i = 20; + foreach (var p in projects) + { + i += 10; + Model.Information_MillionsMonthlyReportItem item = new Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)), + Affiliation = "项目现场", + Name = p.ProjectName, + SortIndex = i + }; + + if (!string.IsNullOrEmpty(p.UnitId)) + { + var name = BLL.UnitService.GetUnitNameByUnitId(p.UnitId); + if (!string.IsNullOrEmpty(name)) + { + item.Affiliation = name; + item.Name = "[" + p.ProjectCode + "]" + p.ProjectName; + } + } + + Model.InformationProject_MillionsMonthlyReport report = millionsMonthlyReports.FirstOrDefault(x => x.ProjectId == p.ProjectId); + if (report != null) + { + item.PostPersonNum = report.PostPersonNum; + item.SnapPersonNum = report.SnapPersonNum; + item.ContractorNum = report.ContractorNum; + item.SumPersonNum = report.SumPersonNum; + item.TotalWorkNum = report.TotalWorkNum; + item.SeriousInjuriesNum = report.SeriousInjuriesNum; + item.SeriousInjuriesPersonNum = report.SeriousInjuriesPersonNum; + item.SeriousInjuriesLossHour = report.SeriousInjuriesLossHour; + item.MinorAccidentNum = report.MinorAccidentNum; + item.MinorAccidentPersonNum = report.MinorAccidentPersonNum; + item.MinorAccidentLossHour = report.MinorAccidentLossHour; + item.OtherAccidentNum = report.OtherAccidentNum; + item.OtherAccidentPersonNum = report.OtherAccidentPersonNum; + item.OtherAccidentLossHour = report.OtherAccidentLossHour; + item.RestrictedWorkPersonNum = report.RestrictedWorkPersonNum; + item.RestrictedWorkLossHour = report.RestrictedWorkLossHour; + item.MedicalTreatmentPersonNum = report.MedicalTreatmentPersonNum; + item.MedicalTreatmentLossHour = report.MedicalTreatmentLossHour; + item.FireNum = report.FireNum; + item.ExplosionNum = report.ExplosionNum; + item.TrafficNum = report.TrafficNum; + item.EquipmentNum = report.EquipmentNum; + item.QualityNum = report.QualityNum; + item.OtherNum = report.OtherNum; + item.FirstAidDressingsNum = report.FirstAidDressingsNum; + item.AttemptedEventNum = report.AttemptedEventNum; + item.LossDayNum = report.LossDayNum; + } + else + { + item.PostPersonNum = 0; + item.SnapPersonNum = 0; + item.ContractorNum = 0; + item.SumPersonNum = 0; + item.TotalWorkNum = 0; + item.SeriousInjuriesNum = 0; + item.SeriousInjuriesPersonNum = 0; + item.SeriousInjuriesLossHour = 0; + item.MinorAccidentNum = 0; + item.MinorAccidentPersonNum = 0; + item.MinorAccidentLossHour = 0; + item.OtherAccidentNum = 0; + item.OtherAccidentPersonNum = 0; + item.OtherAccidentLossHour = 0; + item.RestrictedWorkPersonNum = 0; + item.RestrictedWorkLossHour = 0; + item.MedicalTreatmentPersonNum = 0; + item.MedicalTreatmentLossHour = 0; + item.FireNum = 0; + item.ExplosionNum = 0; + item.TrafficNum = 0; + item.EquipmentNum = 0; + item.QualityNum = 0; + item.OtherNum = 0; + item.FirstAidDressingsNum = 0; + item.AttemptedEventNum = 0; + item.LossDayNum = 0; + } + items.Add(item); + } + } + #endregion + + #region 单位下拉选择事件 + /// + /// 单位下拉选择事件 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + items.Clear(); + if (drpUnit.SelectedValue != BLL.Const._Null) + { + //GetNewItems(); + } + Grid1.DataSource = items; + Grid1.DataBind(); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.MillionsMonthlyReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + this.btnCopy.Hidden = false; + } + //if (buttonList.Contains(BLL.Const.BtnSaveUp)) + //{ + // this.btnUpdata.Hidden = false; + //} + if (buttonList.Contains(BLL.Const.BtnSubmit)) + { + this.btnSubmit.Hidden = false; + //this.btnCopy.Hidden = false; + } + } + } + #endregion + + #region 复制上个月数据 + /// + /// 复制上个月的数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + this.drpMonth.SelectedValue); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + showDate = nowDate.Value.AddMonths(-1); + Model.Information_MillionsMonthlyReport millionsMonthlyReport = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByUnitIdAndYearAndMonth(this.drpUnit.SelectedValue, showDate.Year, showDate.Month); + if (millionsMonthlyReport != null) + { + Model.Information_MillionsMonthlyReport newMillionsMonthlyReport = new Information_MillionsMonthlyReport(); + this.MillionsMonthlyReportId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReport)); + newMillionsMonthlyReport.MillionsMonthlyReportId = this.MillionsMonthlyReportId; + newMillionsMonthlyReport.UnitId = this.drpUnit.SelectedValue; + newMillionsMonthlyReport.Year = Convert.ToInt32(this.drpYear.SelectedValue); + newMillionsMonthlyReport.Month = Convert.ToInt32(this.drpMonth.SelectedValue); + newMillionsMonthlyReport.FillingMan = this.CurrUser.PersonName; + newMillionsMonthlyReport.FillingDate = DateTime.Now; + newMillionsMonthlyReport.DutyPerson = this.CurrUser.PersonName; + newMillionsMonthlyReport.RecordableIncidentRate = millionsMonthlyReport.RecordableIncidentRate; + newMillionsMonthlyReport.LostTimeRate = millionsMonthlyReport.LostTimeRate; + newMillionsMonthlyReport.LostTimeInjuryRate = millionsMonthlyReport.LostTimeInjuryRate; + newMillionsMonthlyReport.DeathAccidentFrequency = millionsMonthlyReport.DeathAccidentFrequency; + newMillionsMonthlyReport.AccidentMortality = millionsMonthlyReport.AccidentMortality; + newMillionsMonthlyReport.UpState = BLL.Const.UpState_2; + newMillionsMonthlyReport.HandleState = BLL.Const.HandleState_1; + newMillionsMonthlyReport.HandleMan = this.CurrUser.PersonId; + BLL.MillionsMonthlyReportService.AddMillionsMonthlyReport(newMillionsMonthlyReport); + + items = BLL.MillionsMonthlyReportItemService.GetItems(millionsMonthlyReport.MillionsMonthlyReportId); + if (items.Count > 0) + { + foreach (var item in items) + { + if (item.Affiliation != "本月合计" || item.Name != "本月合计") + { + Model.Information_MillionsMonthlyReportItem newItem = new Information_MillionsMonthlyReportItem + { + MillionsMonthlyReportItemId = SQLHelper.GetNewID(typeof(Model.Information_MillionsMonthlyReportItem)), + MillionsMonthlyReportId = this.MillionsMonthlyReportId, + SortIndex = item.SortIndex, + Affiliation = item.Affiliation, + Name = item.Name, + PostPersonNum = item.PostPersonNum, + SnapPersonNum = item.SnapPersonNum, + ContractorNum = item.ContractorNum, + SumPersonNum = item.SumPersonNum, + TotalWorkNum = item.TotalWorkNum, + SeriousInjuriesNum = item.SeriousInjuriesNum, + SeriousInjuriesPersonNum = item.SeriousInjuriesPersonNum, + SeriousInjuriesLossHour = item.SeriousInjuriesLossHour, + MinorAccidentNum = item.MinorAccidentNum, + MinorAccidentPersonNum = item.MinorAccidentPersonNum, + MinorAccidentLossHour = item.MinorAccidentLossHour, + OtherAccidentNum = item.OtherAccidentNum, + OtherAccidentPersonNum = item.OtherAccidentPersonNum, + OtherAccidentLossHour = item.OtherAccidentLossHour, + RestrictedWorkPersonNum = item.RestrictedWorkPersonNum, + RestrictedWorkLossHour = item.RestrictedWorkLossHour, + MedicalTreatmentPersonNum = item.MedicalTreatmentPersonNum, + MedicalTreatmentLossHour = item.MedicalTreatmentLossHour, + FireNum = item.FireNum, + ExplosionNum = item.ExplosionNum, + TrafficNum = item.TrafficNum, + EquipmentNum = item.EquipmentNum, + QualityNum = item.QualityNum, + OtherNum = item.OtherNum, + FirstAidDressingsNum = item.FirstAidDressingsNum, + AttemptedEventNum = item.AttemptedEventNum, + LossDayNum = item.LossDayNum + }; + BLL.MillionsMonthlyReportItemService.AddMillionsMonthlyReportItem(newItem); + } + } + } + + GetValues(newMillionsMonthlyReport.MillionsMonthlyReportId); + } + } + } + + /// + /// 获取复制的值绑定到文本中 + /// + private void GetValues(string millionsMonthlyReportId) + { + var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(millionsMonthlyReportId); + if (report != null) + { + drpMonth.SelectedValue = report.Month.ToString(); + drpYear.SelectedValue = report.Year.ToString(); + drpUnit.SelectedValue = report.UnitId; + if (report.FillingDate != null) + { + txtFillingDate.Text = string.Format("{0:yyyy-MM-dd}", report.FillingDate); + } + txtDutyPerson.Text = report.DutyPerson; + if (report.RecordableIncidentRate != null) + { + txtRecordableIncidentRate.Text = report.RecordableIncidentRate.ToString(); + } + if (report.LostTimeRate != null) + { + txtLostTimeRate.Text = report.LostTimeRate.ToString(); + } + if (report.LostTimeInjuryRate != null) + { + txtLostTimeInjuryRate.Text = report.LostTimeInjuryRate.ToString(); + } + if (report.DeathAccidentFrequency != null) + { + txtDeathAccidentFrequency.Text = report.DeathAccidentFrequency.ToString(); + } + if (report.AccidentMortality != null) + { + txtAccidentMortality.Text = report.AccidentMortality.ToString(); + } + items = BLL.MillionsMonthlyReportItemService.GetItems(millionsMonthlyReportId); + this.Grid1.DataSource = items; + this.Grid1.DataBind(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.designer.cs new file mode 100644 index 00000000..23a22659 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/MillionsMonthlyReportSave.aspx.designer.cs @@ -0,0 +1,456 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class MillionsMonthlyReportSave { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpMonth 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpMonth; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// txtFillingDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtFillingDate; + + /// + /// txtDutyPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDutyPerson; + + /// + /// txtRecordableIncidentRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRecordableIncidentRate; + + /// + /// txtLostTimeRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLostTimeRate; + + /// + /// txtLostTimeInjuryRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLostTimeInjuryRate; + + /// + /// txtDeathAccidentFrequency 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDeathAccidentFrequency; + + /// + /// txtAccidentMortality 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAccidentMortality; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtAffiliation 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAffiliation; + + /// + /// txtName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtName; + + /// + /// txtPostPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtPostPersonNum; + + /// + /// txtSnapPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtSnapPersonNum; + + /// + /// txtContractorNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtContractorNum; + + /// + /// txtTotalWorkNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalWorkNum; + + /// + /// txtSeriousInjuriesNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtSeriousInjuriesNum; + + /// + /// txtSeriousInjuriesPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtSeriousInjuriesPersonNum; + + /// + /// txtSeriousInjuriesLossHour 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtSeriousInjuriesLossHour; + + /// + /// txtMinorAccidentNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorAccidentNum; + + /// + /// txtMinorAccidentPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorAccidentPersonNum; + + /// + /// txtMinorAccidentLossHour 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMinorAccidentLossHour; + + /// + /// txtOtherAccidentNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtOtherAccidentNum; + + /// + /// txtOtherAccidentPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtOtherAccidentPersonNum; + + /// + /// txtOtherAccidentLossHour 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtOtherAccidentLossHour; + + /// + /// txtRestrictedWorkPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtRestrictedWorkPersonNum; + + /// + /// txtRestrictedWorkLossHour 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtRestrictedWorkLossHour; + + /// + /// txtMedicalTreatmentPersonNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMedicalTreatmentPersonNum; + + /// + /// txtMedicalTreatmentLossHour 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMedicalTreatmentLossHour; + + /// + /// txtFireNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtFireNum; + + /// + /// txtExplosionNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtExplosionNum; + + /// + /// txtTrafficNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTrafficNum; + + /// + /// txtEquipmentNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtEquipmentNum; + + /// + /// txtQualityNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtQualityNum; + + /// + /// txtOtherNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtOtherNum; + + /// + /// txtFirstAidDressingsNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtFirstAidDressingsNum; + + /// + /// txtAttemptedEventNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAttemptedEventNum; + + /// + /// txtLossDayNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtLossDayNum; + + /// + /// TextBox2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox TextBox2; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx new file mode 100644 index 00000000..dad25cf3 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx @@ -0,0 +1,48 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportAuditSee.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.ReportAuditSee" %> + + + + + + 查看审核信息 + + + + +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.cs new file mode 100644 index 00000000..7bbf141e --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.cs @@ -0,0 +1,63 @@ +using BLL; +using System; +using System.Data; +using System.Data.SqlClient; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class ReportAuditSee : PageBase + { + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + // 表头过滤 + if (!IsPostBack) + { + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + string strSql = "select * from View_ProjectData_FlowOperate where DataId=@DataId order by SortIndex desc"; + SqlParameter[] parameter = new SqlParameter[] + { + new SqlParameter("@DataId",Request.Params["Id"]), + }; + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + // 2.获取当前分页数据 + //var table = this.GetPagedDataTable(Grid1, tb1); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + BindGrid(); + } + + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, EventArgs e) + { + BindGrid(); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.designer.cs new file mode 100644 index 00000000..aeaec9d9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportAuditSee.aspx.designer.cs @@ -0,0 +1,51 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class ReportAuditSee { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx new file mode 100644 index 00000000..5e956546 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx @@ -0,0 +1,83 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportSubmit.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.ReportSubmit" %> + + + + + + 办理流程 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs new file mode 100644 index 00000000..eb7079f9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.cs @@ -0,0 +1,259 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class ReportSubmit : PageBase + { + #region 定义变量 + /// + /// 报表类别 + /// + public string Type + { + get + { + return (string)ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + } + } + + /// + /// 报表主键Id + /// + public string Id + { + get + { + return (string)ViewState["Id"]; + } + set + { + ViewState["Id"] = value; + } + } + #endregion + + #region 加载页面 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.Type = Request.Params["Type"]; + this.Id = Request.Params["Id"]; + this.BindGrid(); + } + } + #endregion + + #region 人员下拉框绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + string unitId = Const.UnitId_SEDIN; + + string strSql = @"SELECT PersonId,PersonName,JobNum" + + @" FROM Person_Persons AS users" + //+ @" LEFT JOIN Sys_Role AS role ON users.RoleId= role.RoleId" + + @" WHERE users.IsPost=1 AND users.RoleIds is not null AND UnitId ='" + unitId + "'"; + List listStr = new List(); + if (!string.IsNullOrEmpty(this.txtPersonName.Text.Trim())) + { + strSql += " AND (PersonName LIKE @Name OR JobNum LIKE @Name)"; + listStr.Add(new SqlParameter("@Name", "%" + this.txtPersonName.Text.Trim() + "%")); + } + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 查询 + /// + /// 下拉框查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.drpHandleMan.Values = null; + this.BindGrid(); + } + #endregion + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + string handleMan = this.drpHandleMan.Value; + string handleStates = (this.cbNext.SelectedValue == "0") ? BLL.Const.HandleState_4 : BLL.Const.HandleState_3; + if (!string.IsNullOrEmpty(handleMan) && handleMan != Const._Null) + { + + #region 百万工时安全统计月报 + if (Type == "MillionsMonthlyReport")//百万工时安全统计月报 + { + var report = BLL.MillionsMonthlyReportService.GetMillionsMonthlyReportByMillionsMonthlyReportId(Id); + if (report != null) + { + SetFlowData(Const.MillionsMonthlyReportMenuId, this.Id, handleMan); + report.HandleState = handleStates; + report.HandleMan = handleMan; + BLL.MillionsMonthlyReportService.UpdateMillionsMonthlyReport(report); + } + } + #endregion + + #region 职工伤亡事故原因分析 + if (Type == "AccidentCauseReport")//职工伤亡事故原因分析 + { + var report = BLL.AccidentCauseReportService.GetAccidentCauseReportByAccidentCauseReportId(Id); + if (report != null) + { + SetFlowData(Const.AccidentCauseReportMenuId, this.Id, handleMan); + report.HandleState = handleStates; + report.HandleMan = handleMan; + BLL.AccidentCauseReportService.UpdateAccidentCauseReport(report); + } + } + #endregion + + #region 安全生产数据季报 + if (Type == "SafetyQuarterlyReport")//安全生产数据季报 + { + var report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(Id); + if (report != null) + { + SetFlowData(Const.SafetyQuarterlyReportMenuId, this.Id, handleMan); + report.HandleState = handleStates; + report.HandleMan = handleMan; + BLL.SafetyQuarterlyReportService.UpdateSafetyQuarterlyReport(report); + } + } + #endregion + + #region 应急演练开展情况季报表 + if (Type == "DrillConductedQuarterlyReport")//应急演练开展情况季报表 + { + var report = BLL.DrillConductedQuarterlyReportService.GetDrillConductedQuarterlyReportById(Id); + if (report != null) + { + SetFlowData(Const.DrillConductedQuarterlyReportMenuId, this.Id, handleMan); + report.HandleState = handleStates; + report.HandleMan = handleMan; + BLL.DrillConductedQuarterlyReportService.UpdateDrillConductedQuarterlyReport(report); + } + } + #endregion + + #region 应急演练工作计划半年报 + if (Type == "DrillPlanHalfYearReport")//应急演练工作计划半年报 + { + var report = BLL.DrillPlanHalfYearReportService.GetDrillPlanHalfYearReportById(this.Id); + if (report != null) + { + SetFlowData(Const.DrillPlanHalfYearReportMenuId, this.Id, handleMan); + report.HandleState = handleStates; + report.HandleMan = handleMan; + BLL.DrillPlanHalfYearReportService.UpdateDrillPlanHalfYearReport(report); + } + } + #endregion + + ShowNotify("提交成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInParent("请选择办理人!", MessageBoxIcon.Warning); + } + } + #endregion + + /// + /// + /// + /// + /// + private void SetFlowData(string menuId, string dataId,string handleMan) + { + var getIsExitOperate = Funs.DB.ProjectData_FlowOperate.FirstOrDefault(x => x.DataId == this.Id); + if (getIsExitOperate == null) //首次生成审批记录 + { + ////编制人添加记录信息 + Model.ProjectData_FlowOperate newFlow = new Model.ProjectData_FlowOperate + { + MenuId = menuId, + DataId = this.Id, + OperaterId = this.CurrUser.PersonId, + OperaterTime = DateTime.Now, + IsClosed = true, + State = BLL.Const.State_1, + Opinion = this.txtOpinion.Text + }; + BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newFlow); + } + ////更新 当前人要处理的意见 + var updateUnFlowOperate = Funs.DB.ProjectData_FlowOperate.FirstOrDefault(x => x.MenuId == menuId && x.DataId == dataId && (x.IsClosed == false || !x.IsClosed.HasValue)); + if (updateUnFlowOperate != null) + { + updateUnFlowOperate.OperaterTime = DateTime.Now; + updateUnFlowOperate.Opinion = this.txtOpinion.Text; + updateUnFlowOperate.IsClosed = true; + BLL.ProjectDataFlowSetService.UpdateFlowOperateOpinion(updateUnFlowOperate); + } + + string states = (this.cbNext.SelectedValue == "0") ? BLL.Const.State_2: BLL.Const.State_1; + ////增加 下一步办理信息 + Model.ProjectData_FlowOperate newdateUnFlowOperate = new Model.ProjectData_FlowOperate + { + MenuId = menuId, + DataId = this.Id, + OperaterId = handleMan, + IsClosed = false, + State = states, + }; + BLL.ProjectDataFlowSetService.AddProjectData_FlowOperate(newdateUnFlowOperate); + } + + /// + /// + /// + /// + /// + protected void cbNext_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.cbNext.SelectedValue == "0") + { + this.drpHandleMan.Label = "上报人"; + var getFData = Funs.DB.ProjectData_FlowOperate.FirstOrDefault(x => x.DataId == Id && x.SortIndex == 1); + if (getFData != null) + { + this.drpHandleMan.Value = getFData.OperaterId; + } + } + else + { + this.drpHandleMan.Label = "办理人"; + this.drpHandleMan.Value = string.Empty; + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.designer.cs new file mode 100644 index 00000000..a5b046f9 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/ReportSubmit.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class ReportSubmit { + + /// + /// Head1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlHead Head1; + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// cbNext 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList cbNext; + + /// + /// drpHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownBox drpHandleMan; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtPersonName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPersonName; + + /// + /// txtOpinion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtOpinion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx new file mode 100644 index 00000000..a3ec0a91 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx @@ -0,0 +1,136 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyQuarterlyReport.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.SafetyQuarterlyReport" ValidateRequest="false" %> + + + + + + + 安全生产数据季报 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.cs new file mode 100644 index 00000000..0432df9f --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.cs @@ -0,0 +1,632 @@ +using BLL; +using System; +using System.IO; +using System.Linq; +using System.Web; +using System.Web.UI; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class SafetyQuarterlyReport : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string SafetyQuarterlyReportId + { + get + { + return (string)ViewState["SafetyQuarterlyReportId"]; + } + set + { + ViewState["SafetyQuarterlyReportId"] = value; + } + } + + /// + /// 附件路径 + /// + public string FullTimeManAttachUrl + { + get + { + return (string)ViewState["FullTimeManAttachUrl"]; + } + set + { + ViewState["FullTimeManAttachUrl"] = value; + } + } + + public string PMManAttachUrl + { + get + { + return (string)ViewState["PMManAttachUrl"]; + } + set + { + ViewState["PMManAttachUrl"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.drpQuarter.DataTextField = "ConstText"; + drpQuarter.DataValueField = "ConstValue"; + drpQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011); + drpQuarter.DataBind(); + this.drpYear.DataTextField = "ConstText"; + drpYear.DataValueField = "ConstValue"; + drpYear.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + drpYear.DataBind(); + this.drpUnit.DataTextField = "UnitName"; + drpUnit.DataValueField = "UnitId"; + drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + drpUnit.DataBind(); + this.drpUnit.Readonly = true; + DateTime showDate = System.DateTime.Now.AddMonths(-3); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + drpYear.SelectedValue = showDate.Year.ToString(); + GetValue(); + } + } + #endregion + + #region 清空Label + /// + /// 清空文本框 + /// + private void SetEmpty() + { + this.SimpleForm1.Title = string.Empty; + lblUnitName.Text = string.Empty; + lblYearId.Text = string.Empty; + lblQuarters.Text = string.Empty; + lblHandleMan.Text = string.Empty; + // this.txtValue.Text = "无数据"; + this.txtValue.Text = HttpUtility.HtmlDecode("无数据"); + this.SimpleForm1.Title = "安全生产数据季报"; + + this.fAttach1.Hidden = true; + this.lbAttachUrl1.Text = string.Empty; + this.fAttach2.Hidden = true; + this.lbAttachUrl2.Text = string.Empty; + } + #endregion + + #region 获取记录值 + private void GetValue() + { + this.SetEmpty(); + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(drpQuarter.SelectedValue); + Model.View_Information_SafetyQuarterlyReport safetyQuarterlyReport = Funs.DB.View_Information_SafetyQuarterlyReport.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarters == quarter && e.YearId == year); + if (safetyQuarterlyReport != null) + { + string upState = string.Empty; + if (safetyQuarterlyReport.UpState == BLL.Const.UpState_3) + { + upState = "(已上报)"; + } + else + { + upState = "(未上报)"; + } + this.SimpleForm1.Title = "安全生产数据季报" + upState; + this.lblUnitName.Text = safetyQuarterlyReport.UnitName; + this.lblYearId.Text = safetyQuarterlyReport.YearId.ToString(); + this.lblQuarters.Text = safetyQuarterlyReport.QuartersStr; + + this.GetTxetValue(safetyQuarterlyReport); + if (safetyQuarterlyReport.HandleState == BLL.Const.HandleState_1 || safetyQuarterlyReport.UpState == BLL.Const.UpState_3) + { + this.lblHandleMan.Hidden = true; + } + else + { + this.lblHandleMan.Hidden = false; + this.lblHandleMan.Text = "下一步办理人:" + safetyQuarterlyReport.UserName; + } + + this.fAttach1.Hidden = false; + if (!string.IsNullOrEmpty(safetyQuarterlyReport.FullTimeManAttachUrl)) + { + this.FullTimeManAttachUrl = safetyQuarterlyReport.FullTimeManAttachUrl; + this.lbAttachUrl1.Text = safetyQuarterlyReport.FullTimeManAttachUrl.Substring(safetyQuarterlyReport.FullTimeManAttachUrl.IndexOf("~") + 1); + } + + this.fAttach2.Hidden = false; + if (!string.IsNullOrEmpty(safetyQuarterlyReport.PMManAttachUrl)) + { + this.PMManAttachUrl = safetyQuarterlyReport.PMManAttachUrl; + this.lbAttachUrl2.Text = safetyQuarterlyReport.PMManAttachUrl.Substring(safetyQuarterlyReport.PMManAttachUrl.IndexOf("~") + 1); + } + } + else + { + SetEmpty(); + } + this.GetButtonPower(); + } + + /// + /// 得到值 + /// + /// + private void GetTxetValue(Model.View_Information_SafetyQuarterlyReport safetyQuarterlyReport) + { + this.SafetyQuarterlyReportId = safetyQuarterlyReport.SafetyQuarterlyReportId; + var unit = BLL.UnitService.GetUnitByUnitId(safetyQuarterlyReport.UnitId); + string unitTypeName = string.Empty; + if (unit != null) + { + var unitType = BLL.UnitTypeService.GetUnitTypeById(unit.UnitTypeId); + if (unitType != null) + { + unitTypeName = unitType.UnitTypeName; + } + + } + else + { + return; + } + string textvalue = string.Empty; + if (!string.IsNullOrEmpty(unitTypeName) && unitTypeName.Contains("施工")) + { + textvalue = (" 总投入工时数:" + safetyQuarterlyReport.TotalInWorkHours).PadRight(103, ' ') + "备注:" + safetyQuarterlyReport.TotalInWorkHoursRemark + "\r\n\r\n" + + (" 总损失工时数:" + safetyQuarterlyReport.TotalOutWorkHours).PadRight(103, ' ') + "备注:" + safetyQuarterlyReport.TotalOutWorkHoursRemark + "\r\n\r\n" + + (" 百万工时损失率:" + safetyQuarterlyReport.WorkHoursLossRate).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.WorkHoursLossRateRemark + "\r\n\r\n" + + (" 工时统计准确率:" + safetyQuarterlyReport.WorkHoursAccuracy).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.WorkHoursAccuracyRemark + "\r\n\r\n" + + (" 主营业务收入/亿元:" + safetyQuarterlyReport.MainBusinessIncome).PadRight(101, ' ') + "备注:" + safetyQuarterlyReport.MainBusinessIncomeRemark + "\r\n\r\n" + + (" 单位工时收入/元:" + safetyQuarterlyReport.UnitTimeIncome).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.UnitTimeIncomeRemark + "\r\n\r\n" + + (" 百亿产值死亡率:" + safetyQuarterlyReport.BillionsOutputMortality).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.BillionsOutputMortalityRemark + "\r\n\r\n" + + (" 重大火灾事故报告数:" + safetyQuarterlyReport.MajorFireAccident).PadRight(101, ' ') + "备注:" + safetyQuarterlyReport.MajorFireAccidentRemark + "\r\n\r\n" + + (" 重大机械设备事故报告数:" + safetyQuarterlyReport.MajorEquipAccident).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.MajorEquipAccidentRemark + "\r\n\r\n" + + (" 事故发生频率(占总收入之比):" + safetyQuarterlyReport.AccidentFrequency).PadRight(98, ' ') + "备注:" + safetyQuarterlyReport.AccidentFrequencyRemark + "\r\n\r\n" + + (" 重伤以上事故报告数:" + safetyQuarterlyReport.SeriousInjuryAccident).PadRight(101, ' ') + "备注:" + safetyQuarterlyReport.SeriousInjuryAccidentRemark + "\r\n\r\n" + + (" 火灾事故统计报告数:" + safetyQuarterlyReport.FireAccident).PadRight(101, ' ') + "备注:" + safetyQuarterlyReport.FireAccidentRemark + "\r\n\r\n" + + (" 装备事故统计报告数:" + safetyQuarterlyReport.EquipmentAccident).PadRight(101, ' ') + "备注:" + safetyQuarterlyReport.EquipmentAccidentRemark + "\r\n\r\n" + + (" 中毒及职业伤害报告数:" + safetyQuarterlyReport.PoisoningAndInjuries).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.PoisoningAndInjuriesRemark + "\r\n\r\n" + + (" 安全生产投入总额/元:" + safetyQuarterlyReport.ProductionSafetyInTotal).PadRight(101, ' ') + "备注:" + safetyQuarterlyReport.ProductionSafetyInTotalRemark + "\r\n\r\n" + + (" 安全防护投入/元:" + safetyQuarterlyReport.ProtectionInput).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.ProtectionInputRemark + "\r\n\r\n" + + (" 劳动保护及职业健康投入/元:" + safetyQuarterlyReport.LaboAndHealthIn).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.LaborAndHealthInRemark + "\r\n\r\n" + + (" 安全技术进步投入/元:" + safetyQuarterlyReport.TechnologyProgressIn).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.TechnologyProgressInRemark + "\r\n\r\n" + + (" 安全教育培训投入/元:" + safetyQuarterlyReport.EducationTrainIn).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.EducationTrainInRemark + "\r\n\r\n" + + (" 工程造价占比:" + safetyQuarterlyReport.ProjectCostRate).PadRight(105, ' ') + "备注:" + safetyQuarterlyReport.ProjectCostRateRemark + "\r\n\r\n" + + (" 百万工时安全生产投入额/万元:" + safetyQuarterlyReport.ProductionInput).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.ProductionInputRemark + "\r\n\r\n" + + (" 安全生产投入占施工收入之比:" + safetyQuarterlyReport.Revenue).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.RevenueRemark + "\r\n\r\n" + + (" 安全专职人员总数(附名单):" + safetyQuarterlyReport.FullTimeMan).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.FullTimeManRemark + "\r\n\r\n" + + (" 项目经理人员总数(附名单):" + safetyQuarterlyReport.PMMan).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.PMManRemark + "\r\n\r\n" + + (" 企业负责人安全生产继续教育数:" + safetyQuarterlyReport.CorporateDirectorEdu).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.CorporateDirectorEduRemark + "\r\n\r\n" + + (" 项目负责人安全生产继续教育数:" + safetyQuarterlyReport.ProjectLeaderEdu).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.ProjectLeaderEduRemark + "\r\n\r\n" + + (" 安全专职人员安全生产继续教育数:" + safetyQuarterlyReport.FullTimeEdu).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.FullTimeEduRemark + "\r\n\r\n" + + (" 安全生产三类人员继续教育覆盖率:" + safetyQuarterlyReport.ThreeKidsEduRate).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.ThreeKidsEduRateRemark + "\r\n\r\n" + + (" 上行报告(施工现场安全生产动态季报、专项活动总结上报、生产事故按时限上报)履行率:" + safetyQuarterlyReport.UplinReportRate).PadRight(84, ' ') + "备注:" + safetyQuarterlyReport.UplinReportRateRemark + "\r\n\r\n" + + (" 重点装备总数:" + safetyQuarterlyReport.KeyEquipmentTotal).PadRight(106, ' ') + "备注:" + safetyQuarterlyReport.KeyEquipmentTotalRemark + "\r\n\r\n" + + (" 重点装备安全控制检查报告数:" + safetyQuarterlyReport.KeyEquipmentReportCount).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.KeyEquipmentReportCountRemark + "\r\n\r\n" + + (" 化工界区施工作业项目数:" + safetyQuarterlyReport.ChemicalAreaProjectCount).PadRight(103, ' ') + "备注:" + safetyQuarterlyReport.ChemicalAreaProjectCountRemark + "\r\n\r\n" + + (" 化工界区施工作业有害介质检测复测覆盖数:" + safetyQuarterlyReport.HarmfulMediumCoverCount).PadRight(98, ' ') + "备注:" + safetyQuarterlyReport.HarmfulMediumCoverCountRemark + "\r\n\r\n" + + (" 施工作业安全技术交底覆盖率(%):" + safetyQuarterlyReport.HarmfulMediumCoverRate).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.HarmfulMediumCoverRateRemark + "\r\n\r\n" + + (" 备注:" + safetyQuarterlyReport.Remarks).PadRight(100, ' '); + } + else + { + textvalue = (" 总投入工时数:" + safetyQuarterlyReport.TotalInWorkHours).PadRight(103, ' ') + "备注:" + safetyQuarterlyReport.TotalInWorkHoursRemark + "\r\n\r\n" + + (" 总损失工时数:" + safetyQuarterlyReport.TotalOutWorkHours).PadRight(103, ' ') + "备注:" + safetyQuarterlyReport.TotalOutWorkHoursRemark + "\r\n\r\n" + + (" 百万工时损失率:" + safetyQuarterlyReport.WorkHoursLossRate).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.WorkHoursLossRateRemark + "\r\n\r\n" + + (" 工时统计准确率:" + safetyQuarterlyReport.WorkHoursAccuracy).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.WorkHoursAccuracyRemark + "\r\n\r\n" + + (" 主营业务收入/亿元:" + safetyQuarterlyReport.MainBusinessIncome).PadRight(101, ' ') + "备注:" + safetyQuarterlyReport.MainBusinessIncomeRemark + "\r\n\r\n" + + (" 施工收入/亿元:" + safetyQuarterlyReport.ConstructionRevenue).PadRight(103, ' ') + "备注:" + safetyQuarterlyReport.ConstructionRevenueRemark + "\r\n\r\n" + + (" 单位工时收入/元:" + safetyQuarterlyReport.UnitTimeIncome).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.UnitTimeIncomeRemark + "\r\n\r\n" + + (" 百亿产值死亡率:" + safetyQuarterlyReport.BillionsOutputMortality).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.BillionsOutputMortalityRemark + "\r\n\r\n" + + (" 重大火灾事故报告数:" + safetyQuarterlyReport.MajorFireAccident).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.MajorFireAccidentRemark + "\r\n\r\n" + + (" 重大机械设备事故报告数:" + safetyQuarterlyReport.MajorEquipAccident).PadRight(98, ' ') + "备注:" + safetyQuarterlyReport.MajorEquipAccidentRemark + "\r\n\r\n" + + (" 事故发生频率(占总收入之比):" + safetyQuarterlyReport.AccidentFrequency).PadRight(97, ' ') + "备注:" + safetyQuarterlyReport.AccidentFrequencyRemark + "\r\n\r\n" + + (" 重伤以上事故报告数:" + safetyQuarterlyReport.SeriousInjuryAccident).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.SeriousInjuryAccidentRemark + "\r\n\r\n" + + (" 火灾事故统计报告数:" + safetyQuarterlyReport.FireAccident).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.FireAccidentRemark + "\r\n\r\n" + + (" 装备事故统计报告数:" + safetyQuarterlyReport.EquipmentAccident).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.EquipmentAccidentRemark + "\r\n\r\n" + + (" 中毒及职业伤害报告数:" + safetyQuarterlyReport.PoisoningAndInjuries).PadRight(99, ' ') + "备注:" + safetyQuarterlyReport.PoisoningAndInjuriesRemark + "\r\n\r\n" + + (" 安全生产投入总额/元:" + safetyQuarterlyReport.ProductionSafetyInTotal).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.ProductionSafetyInTotalRemark + "\r\n\r\n" + + (" 安全防护投入/元:" + safetyQuarterlyReport.ProtectionInput).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.ProtectionInputRemark + "\r\n\r\n" + + (" 劳动保护及职业健康投入/元:" + safetyQuarterlyReport.LaboAndHealthIn).PadRight(98, ' ') + "备注:" + safetyQuarterlyReport.LaborAndHealthInRemark + "\r\n\r\n" + + (" 安全技术进步投入/元:" + safetyQuarterlyReport.TechnologyProgressIn).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.TechnologyProgressInRemark + "\r\n\r\n" + + (" 安全教育培训投入/元:" + safetyQuarterlyReport.EducationTrainIn).PadRight(100, ' ') + "备注:" + safetyQuarterlyReport.EducationTrainInRemark + "\r\n\r\n" + + (" 工程造价占比:" + safetyQuarterlyReport.ProjectCostRate).PadRight(102, ' ') + "备注:" + safetyQuarterlyReport.ProjectCostRateRemark + "\r\n\r\n" + + (" 百万工时安全生产投入额/万元:" + safetyQuarterlyReport.ProductionInput).PadRight(98, ' ') + "备注:" + safetyQuarterlyReport.ProductionInputRemark + "\r\n\r\n" + + (" 安全生产投入占施工收入之比:" + safetyQuarterlyReport.Revenue).PadRight(98, ' ') + "备注:" + safetyQuarterlyReport.RevenueRemark + "\r\n\r\n" + + (" 安全专职人员总数(附名单):" + safetyQuarterlyReport.FullTimeMan).PadRight(98, ' ') + "备注:" + safetyQuarterlyReport.FullTimeManRemark + "\r\n\r\n" + + (" 项目经理人员总数(附名单):" + safetyQuarterlyReport.PMMan).PadRight(98, ' ') + "备注:" + safetyQuarterlyReport.PMManRemark + "\r\n\r\n" + + (" 企业负责人安全生产继续教育数:" + safetyQuarterlyReport.CorporateDirectorEdu).PadRight(97, ' ') + "备注:" + safetyQuarterlyReport.CorporateDirectorEduRemark + "\r\n\r\n" + + (" 项目负责人安全生产继续教育数:" + safetyQuarterlyReport.ProjectLeaderEdu).PadRight(97, ' ') + "备注:" + safetyQuarterlyReport.ProjectLeaderEduRemark + "\r\n\r\n" + + (" 安全专职人员安全生产继续教育数:" + safetyQuarterlyReport.FullTimeEdu).PadRight(96, ' ') + "备注:" + safetyQuarterlyReport.FullTimeEduRemark + "\r\n\r\n" + + (" 安全生产三类人员继续教育覆盖率:" + safetyQuarterlyReport.ThreeKidsEduRate).PadRight(96, ' ') + "备注:" + safetyQuarterlyReport.ThreeKidsEduRateRemark + "\r\n\r\n" + + (" 上行报告(施工现场安全生产动态季报、专项活动总结上报、生产事故按时限上报)履行率:" + safetyQuarterlyReport.UplinReportRate).PadRight(81, ' ') + "备注:" + safetyQuarterlyReport.UplinReportRateRemark + "\r\n\r\n" + + (" 备注:" + safetyQuarterlyReport.Remarks).PadRight(100, ' '); + + } + + this.txtValue.Text = textvalue; + } + #endregion + + #region 增加、修改、删除、审核、审批、上报、导入事件 + /// + /// 增加按钮 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyQuarterlyReportEdit.aspx?UnitId={0}&&Year={1}&&Quarter={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarter.SelectedValue, "编辑 - "))); + } + + /// + /// 弹出编辑框 + /// + private void ShowEdit() + { + Model.Information_SafetyQuarterlyReport report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report == null) + { + Alert.ShowInTop("所选时间无报表记录!", MessageBoxIcon.Warning); + return; + } + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyQuarterlyReportEdit.aspx?SafetyQuarterlyReportId={0}", report.SafetyQuarterlyReportId, "编辑 - "))); + } + + /// + /// 编辑 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + + /// + /// 审核 + /// + /// + /// + protected void btnAudit1_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 审批 + /// + /// + /// + protected void btnAudit2_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 上报 + /// + /// + /// + protected void btnUpdata_Click(object sender, EventArgs e) + { + ShowEdit(); + } + + /// + /// 删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + Model.Information_SafetyQuarterlyReport report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, (this.lblYearId.Text + "-" + this.lblQuarters.Text), report.SafetyQuarterlyReportId, BLL.Const.SafetyQuarterlyReportMenuId, BLL.Const.BtnDelete); + + BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.SafetyQuarterlyReportId); + BLL.SafetyQuarterlyReportService.DeleteSafetyQuarterlyReportById(report.SafetyQuarterlyReportId); + + SetEmpty(); + this.btnNew.Hidden = false; + ShowNotify("删除数据成功!(表格数据已重新绑定)", MessageBoxIcon.Success); + } + else + { + ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning); + } + } + + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../DataIn/SafetyQuarterlyReportImport.aspx", "导入 - "))); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭编辑弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + GetValue(); + } + + /// + /// 关闭查看审批信息弹出窗口 + /// + /// + /// + protected void Window4_Close(object sender, WindowCloseEventArgs e) + { + + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SafetyQuarterlyReportMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnIn)) + { + this.btnImport.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnPrint)) + { + this.btnPrint.Hidden = false; + } + int year = Funs.GetNewIntOrZero(drpYear.SelectedValue); + int quarter = Funs.GetNewIntOrZero(drpQuarter.SelectedValue); + var report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, year, quarter); + this.btnAudit1.Hidden = true; + this.btnAudit2.Hidden = true; + this.btnUpdata.Hidden = true; + if (report != null) + { + this.btnNew.Hidden = true; + if (report.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入 + { + if (report.HandleState == BLL.Const.HandleState_2) + { + this.btnAudit1.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_3) + { + this.btnAudit2.Hidden = false; + } + else if (report.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + } + } + } + } + #endregion + + #region 单位下拉框联动事件 + /// + /// 单位下拉框联动事件 + /// + /// + /// + protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e) + { + GetValue(); + } + #endregion + + #region 打印 + /// + /// 打印 + /// + /// + /// + protected void btnPrint_Click(object sender, EventArgs e) + { + Model.Information_SafetyQuarterlyReport report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_SafetyQuarterlyReportId, report.SafetyQuarterlyReportId, "", "打印 - "))); + } + } + #endregion + + #region 季度向前/向后 + /// + /// 前一季度 + /// + /// + /// + protected void BtnBulletLeft_Click(object sender, EventArgs e) + { + SetMonthChange("-"); + } + + /// + /// 后一季度 + /// + /// + /// + protected void BulletRight_Click(object sender, EventArgs e) + { + SetMonthChange("+"); + } + + /// + /// 季度加减变化 + /// + /// + private void SetMonthChange(string type) + { + DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue) * 3).ToString()); + if (nowDate.HasValue) + { + DateTime showDate = new DateTime(); + if (type == "+") + { + showDate = nowDate.Value.AddMonths(3); + } + else + { + showDate = nowDate.Value.AddMonths(-3); + } + + this.drpYear.SelectedValue = showDate.Year.ToString(); + this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); + ///值变化 + GetValue(); + } + } + #endregion + + #region 查看审批信息 + /// + /// 查看审批信息 + /// + /// + /// + protected void btnSee_Click(object sender, EventArgs e) + { + Model.Information_SafetyQuarterlyReport report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue)); + if (report != null) + { + PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.SafetyQuarterlyReportId, "查看 - "))); + } + else + { + ShowNotify("所选月份无记录!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 附件查看 + /// + /// 查看附件 + /// + /// + /// + protected void btnSee1_Click(object sender, EventArgs e) + { + this.ShowFullAttch(this.FullTimeManAttachUrl); + } + + /// + /// 查看附件 + /// + /// + /// + protected void btnSee2_Click(object sender, EventArgs e) + { + this.ShowFullAttch(this.PMManAttachUrl); + } + + /// + /// 附件显示 + /// + /// + private void ShowFullAttch(string url) + { + string filePath = BLL.Funs.RootPath + url; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(filePath); + if (info.Exists) + { + long fileSize = info.Length; + System.Web.HttpContext.Current.Response.Clear(); + System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); + System.Web.HttpContext.Current.Response.TransmitFile(filePath, 0, fileSize); + System.Web.HttpContext.Current.Response.Flush(); + System.Web.HttpContext.Current.Response.Close(); + } + else + { + ScriptManager.RegisterStartupScript(this, typeof(string), "_alert", "alert('附件不存在!')", true); + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + string result = this.txtValue.Text.Trim(); + if (!string.IsNullOrEmpty(result)) + { + result = result.Replace("
", "\r\n"); + + string name = this.drpYear.SelectedText + "年" + this.drpQuarter.SelectedText + "安全生产数据季报"; + // 非AJAX回发 + Response.ClearContent(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode(name, System.Text.Encoding.UTF8) + ".txt"); + Response.ContentType = "text/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.Write(result); + Response.End(); + } + else + { + Alert.ShowInTop("数据为空,无法导出", MessageBoxIcon.Warning); + return; + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.designer.cs new file mode 100644 index 00000000..8327eee6 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReport.aspx.designer.cs @@ -0,0 +1,357 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class SafetyQuarterlyReport { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// RegionPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RegionPanel RegionPanel1; + + /// + /// Region2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Region Region2; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpYear 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpYear; + + /// + /// drpQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpQuarter; + + /// + /// BtnBulletLeft 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletLeft; + + /// + /// BtnBulletRight 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnBulletRight; + + /// + /// btnSee 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnAudit1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit1; + + /// + /// btnAudit2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit2; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// btnPrint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrint; + + /// + /// lblUnitName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblUnitName; + + /// + /// lblYearId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblYearId; + + /// + /// lblQuarters 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblQuarters; + + /// + /// lblHandleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lblHandleMan; + + /// + /// txtValue 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtValue; + + /// + /// fAttach1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow fAttach1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// lbAttachUrl1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbAttachUrl1; + + /// + /// btnSee1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee1; + + /// + /// fAttach2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow fAttach2; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label4; + + /// + /// lbAttachUrl2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbAttachUrl2; + + /// + /// btnSee2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSee2; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + + /// + /// Window4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window4; + } +} diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx new file mode 100644 index 00000000..f937a23b --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx @@ -0,0 +1,419 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyQuarterlyReportEdit.aspx.cs" Async="true" Inherits="FineUIPro.Web.ZHGL.Information.SafetyQuarterlyReportEdit" %> + + + + + + + 编辑安全生产数据季报 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.cs new file mode 100644 index 00000000..69c02fa7 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.cs @@ -0,0 +1,1470 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using BLL; +using System.IO; + +namespace FineUIPro.Web.ZHGL.Information +{ + public partial class SafetyQuarterlyReportEdit : PageBase + { + #region 定义变量 + /// + /// 主键 + /// + public string SafetyQuarterlyReportId + { + get + { + return (string)ViewState["SafetyQuarterlyReportId"]; + } + set + { + ViewState["SafetyQuarterlyReportId"] = value; + } + } + + /// + /// 安全专职人员附件路径 + /// + public string FullTimeManAttachUrl + { + get + { + return (string)ViewState["FullTimeManAttachUrl"]; + } + set + { + ViewState["FullTimeManAttachUrl"] = value; + } + } + + /// + /// 项目经理人员附件路径 + /// + public string PMManAttachUrl + { + get + { + return (string)ViewState["PMManAttachUrl"]; + } + set + { + ViewState["PMManAttachUrl"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlUnitId.DataTextField = "UnitName"; + this.ddlUnitId.DataValueField = "UnitId"; + this.ddlUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList(); + this.ddlUnitId.DataBind(); + + this.ddlYearId.DataTextField = "ConstText"; + ddlYearId.DataValueField = "ConstValue"; + ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008); + ddlYearId.DataBind(); + + this.ddlQuarter.DataTextField = "ConstText"; + ddlQuarter.DataValueField = "ConstValue"; + ddlQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011); + ddlQuarter.DataBind(); + + this.ddlUnitId.Readonly = true; + string unitId = Request.Params["UnitId"]; + string year = Request.QueryString["Year"]; + string quarter = Request.QueryString["Quarter"]; + this.SafetyQuarterlyReportId = Request.Params["SafetyQuarterlyReportId"]; + if (!string.IsNullOrEmpty(this.SafetyQuarterlyReportId)) + { + var safetyQuarterlyReport = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(this.SafetyQuarterlyReportId); + if (safetyQuarterlyReport != null) + { + this.btnCopy.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + if (safetyQuarterlyReport.HandleState == BLL.Const.HandleState_4) + { + this.btnUpdata.Hidden = false; + } + else + { + if (safetyQuarterlyReport.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + } + if (safetyQuarterlyReport.UpState == BLL.Const.UpState_3) //已上报 + { + this.btnSave.Hidden = true; + this.btnUpdata.Hidden = true; + } + #region 赋值 + if (!string.IsNullOrEmpty(safetyQuarterlyReport.UnitId)) + { + this.ddlUnitId.SelectedValue = safetyQuarterlyReport.UnitId; + } + this.ddlYearId.SelectedValue = safetyQuarterlyReport.YearId.ToString(); + this.ddlQuarter.SelectedValue = safetyQuarterlyReport.Quarters.ToString(); + if (safetyQuarterlyReport.TotalInWorkHours != null) + { + this.txtTotalInWorkHours.Text = Convert.ToString(safetyQuarterlyReport.TotalInWorkHours); + } + this.txtTotalInWorkHoursRemark.Text = safetyQuarterlyReport.TotalInWorkHoursRemark; + if (safetyQuarterlyReport.TotalOutWorkHours != null) + { + this.txtTotalOutWorkHours.Text = Convert.ToString(safetyQuarterlyReport.TotalOutWorkHours); + } + this.txtTotalOutWorkHoursRemark.Text = safetyQuarterlyReport.TotalOutWorkHoursRemark; + if (safetyQuarterlyReport.WorkHoursLossRate != null) + { + this.txtWorkHoursLossRate.Text = Convert.ToString(safetyQuarterlyReport.WorkHoursLossRate); + } + this.txtWorkHoursLossRateRemark.Text = safetyQuarterlyReport.WorkHoursLossRateRemark; + if (safetyQuarterlyReport.WorkHoursAccuracy != null) + { + this.txtWorkHoursAccuracy.Text = Convert.ToString(safetyQuarterlyReport.WorkHoursAccuracy); + } + this.txtWorkHoursAccuracyRemark.Text = safetyQuarterlyReport.WorkHoursAccuracyRemark; + if (safetyQuarterlyReport.MainBusinessIncome != null) + { + this.txtMainBusinessIncome.Text = Convert.ToString(safetyQuarterlyReport.MainBusinessIncome); + } + this.txtMainBusinessIncomeRemark.Text = safetyQuarterlyReport.MainBusinessIncomeRemark; + if (safetyQuarterlyReport.ConstructionRevenue != null) + { + this.txtConstructionRevenue.Text = Convert.ToString(safetyQuarterlyReport.ConstructionRevenue); + } + this.txtConstructionRevenueRemark.Text = safetyQuarterlyReport.ConstructionRevenueRemark; + if (safetyQuarterlyReport.UnitTimeIncome != null) + { + this.txtUnitTimeIncome.Text = Convert.ToString(safetyQuarterlyReport.UnitTimeIncome); + } + this.txtUnitTimeIncomeRemark.Text = safetyQuarterlyReport.UnitTimeIncomeRemark; + if (safetyQuarterlyReport.BillionsOutputMortality != null) + { + this.txtBillionsOutputMortality.Text = Convert.ToString(safetyQuarterlyReport.BillionsOutputMortality); + } + this.txtBillionsOutputMortalityRemark.Text = safetyQuarterlyReport.BillionsOutputMortalityRemark; + if (safetyQuarterlyReport.MajorFireAccident != null) + { + this.txtMajorFireAccident.Text = Convert.ToString(safetyQuarterlyReport.MajorFireAccident); + } + this.txtMajorFireAccidentRemark.Text = safetyQuarterlyReport.MajorFireAccidentRemark; + if (safetyQuarterlyReport.MajorEquipAccident != null) + { + this.txtMajorEquipAccident.Text = Convert.ToString(safetyQuarterlyReport.MajorEquipAccident); + } + this.txtMajorEquipAccidentRemark.Text = safetyQuarterlyReport.MajorEquipAccidentRemark; + if (safetyQuarterlyReport.AccidentFrequency != null) + { + this.txtAccidentFrequency.Text = Convert.ToString(safetyQuarterlyReport.AccidentFrequency); + } + this.txtAccidentFrequencyRemark.Text = safetyQuarterlyReport.AccidentFrequencyRemark; + if (safetyQuarterlyReport.SeriousInjuryAccident != null) + { + this.txtSeriousInjuryAccident.Text = Convert.ToString(safetyQuarterlyReport.SeriousInjuryAccident); + } + this.txtSeriousInjuryAccidentRemark.Text = safetyQuarterlyReport.SeriousInjuryAccidentRemark; + if (safetyQuarterlyReport.FireAccident != null) + { + this.txtFireAccident.Text = Convert.ToString(safetyQuarterlyReport.FireAccident); + } + this.txtFireAccidentRemark.Text = safetyQuarterlyReport.FireAccidentRemark; + if (safetyQuarterlyReport.EquipmentAccident != null) + { + this.txtEquipmentAccident.Text = Convert.ToString(safetyQuarterlyReport.EquipmentAccident); + } + this.txtEquipmentAccidentRemark.Text = safetyQuarterlyReport.EquipmentAccidentRemark; + if (safetyQuarterlyReport.PoisoningAndInjuries != null) + { + this.txtPoisoningAndInjuries.Text = Convert.ToString(safetyQuarterlyReport.PoisoningAndInjuries); + } + this.txtPoisoningAndInjuriesRemark.Text = safetyQuarterlyReport.PoisoningAndInjuriesRemark; + if (safetyQuarterlyReport.ProductionSafetyInTotal != null) + { + this.txtProductionSafetyInTotal.Text = Convert.ToString(safetyQuarterlyReport.ProductionSafetyInTotal); + } + this.txtProductionSafetyInTotalRemark.Text = safetyQuarterlyReport.ProductionSafetyInTotalRemark; + if (safetyQuarterlyReport.ProtectionInput != null) + { + this.txtProtectionInput.Text = Convert.ToString(safetyQuarterlyReport.ProtectionInput); + } + this.txtProtectionInputRemark.Text = safetyQuarterlyReport.ProtectionInputRemark; + if (safetyQuarterlyReport.LaboAndHealthIn != null) + { + this.txtLaboAndHealthIn.Text = Convert.ToString(safetyQuarterlyReport.LaboAndHealthIn); + } + this.txtLaboAndHealthInRemark.Text = safetyQuarterlyReport.LaborAndHealthInRemark; + if (safetyQuarterlyReport.TechnologyProgressIn != null) + { + this.txtTechnologyProgressIn.Text = Convert.ToString(safetyQuarterlyReport.TechnologyProgressIn); + } + this.txtTechnologyProgressInRemark.Text = safetyQuarterlyReport.TechnologyProgressInRemark; + if (safetyQuarterlyReport.EducationTrainIn != null) + { + this.txtEducationTrainIn.Text = Convert.ToString(safetyQuarterlyReport.EducationTrainIn); + } + this.txtEducationTrainInRemark.Text = safetyQuarterlyReport.EducationTrainInRemark; + if (safetyQuarterlyReport.ProjectCostRate != null) + { + this.txtProjectCostRate.Text = Convert.ToString(safetyQuarterlyReport.ProjectCostRate); + } + this.txtProjectCostRateRemark.Text = safetyQuarterlyReport.ProjectCostRateRemark; + if (safetyQuarterlyReport.ProductionInput != null) + { + this.txtProductionInput.Text = Convert.ToString(safetyQuarterlyReport.ProductionInput); + } + this.txtProductionInputRemark.Text = safetyQuarterlyReport.ProductionInputRemark; + if (safetyQuarterlyReport.Revenue != null) + { + this.txtRevenue.Text = Convert.ToString(safetyQuarterlyReport.Revenue); + } + this.txtRevenueRemark.Text = safetyQuarterlyReport.RevenueRemark; + if (safetyQuarterlyReport.FullTimeMan != null) + { + this.txtFullTimeMan.Text = Convert.ToString(safetyQuarterlyReport.FullTimeMan); + } + this.txtFullTimeManRemark.Text = safetyQuarterlyReport.FullTimeManRemark; + if (!string.IsNullOrEmpty(safetyQuarterlyReport.FullTimeManAttachUrl)) + { + this.FullTimeManAttachUrl = safetyQuarterlyReport.FullTimeManAttachUrl; + this.lbFullTimeManAttachUrl.Text = safetyQuarterlyReport.FullTimeManAttachUrl.Substring(safetyQuarterlyReport.FullTimeManAttachUrl.IndexOf("~") + 1); + } + if (safetyQuarterlyReport.PMMan != null) + { + this.txtPMMan.Text = Convert.ToString(safetyQuarterlyReport.PMMan); + } + this.txtPMManRemark.Text = safetyQuarterlyReport.PMManRemark; + if (!string.IsNullOrEmpty(safetyQuarterlyReport.PMManAttachUrl)) + { + this.PMManAttachUrl = safetyQuarterlyReport.PMManAttachUrl; + this.lbPMManAttachUrl.Text = safetyQuarterlyReport.PMManAttachUrl.Substring(safetyQuarterlyReport.PMManAttachUrl.IndexOf("~") + 1); + } + if (safetyQuarterlyReport.CorporateDirectorEdu != null) + { + this.txtCorporateDirectorEdu.Text = Convert.ToString(safetyQuarterlyReport.CorporateDirectorEdu); + } + this.txtCorporateDirectorEduRemark.Text = safetyQuarterlyReport.CorporateDirectorEduRemark; + if (safetyQuarterlyReport.ProjectLeaderEdu != null) + { + this.txtProjectLeaderEdu.Text = Convert.ToString(safetyQuarterlyReport.ProjectLeaderEdu); + } + this.txtProjectLeaderEduRemark.Text = safetyQuarterlyReport.ProjectLeaderEduRemark; + if (safetyQuarterlyReport.FullTimeEdu != null) + { + this.txtFullTimeEdu.Text = Convert.ToString(safetyQuarterlyReport.FullTimeEdu); + } + this.txtFullTimeEduRemark.Text = safetyQuarterlyReport.FullTimeEduRemark; + if (safetyQuarterlyReport.ThreeKidsEduRate != null) + { + this.txtThreeKidsEduRate.Text = Convert.ToString(safetyQuarterlyReport.ThreeKidsEduRate); + } + this.txtThreeKidsEduRateRemark.Text = safetyQuarterlyReport.ThreeKidsEduRateRemark; + if (safetyQuarterlyReport.UplinReportRate != null) + { + this.txtUplinReportRate.Text = Convert.ToString(safetyQuarterlyReport.UplinReportRate); + } + this.txtUplinReportRateRemark.Text = safetyQuarterlyReport.UplinReportRateRemark; + this.txtRemark.Text = safetyQuarterlyReport.Remarks; + if (safetyQuarterlyReport.KeyEquipmentTotal != null) + { + this.txtKeyEquipmentTotal.Text = Convert.ToString(safetyQuarterlyReport.KeyEquipmentTotal); + } + this.txtKeyEquipmentTotalRemark.Text = safetyQuarterlyReport.KeyEquipmentTotalRemark; + if (safetyQuarterlyReport.KeyEquipmentReportCount != null) + { + this.txtKeyEquipmentReportCount.Text = Convert.ToString(safetyQuarterlyReport.KeyEquipmentReportCount); + } + this.txtKeyEquipmentReportCountRemark.Text = safetyQuarterlyReport.KeyEquipmentReportCountRemark; + if (safetyQuarterlyReport.ChemicalAreaProjectCount != null) + { + this.txtChemicalAreaProjectCount.Text = Convert.ToString(safetyQuarterlyReport.ChemicalAreaProjectCount); + } + this.txtChemicalAreaProjectCountRemark.Text = safetyQuarterlyReport.ChemicalAreaProjectCountRemark; + if (safetyQuarterlyReport.HarmfulMediumCoverCount != null) + { + this.txtHarmfulMediumCoverCount.Text = Convert.ToString(safetyQuarterlyReport.HarmfulMediumCoverCount); + } + this.txtHarmfulMediumCoverCountRemark.Text = safetyQuarterlyReport.HarmfulMediumCoverCountRemark; + if (safetyQuarterlyReport.HarmfulMediumCoverRate != null) + { + this.txtHarmfulMediumCoverRate.Text = Convert.ToString(safetyQuarterlyReport.HarmfulMediumCoverRate); + } + this.txtHarmfulMediumCoverRateRemark.Text = safetyQuarterlyReport.HarmfulMediumCoverRateRemark; + #endregion + } + } + else + { + this.btnCopy.Hidden = false; + this.ddlUnitId.SelectedValue = unitId; + this.ddlYearId.SelectedValue = year; + //int quarters = Funs.GetNowQuarterlyByTime(Convert.ToDateTime(DateTime.Now)); + //if (quarters != null) + //{ + this.ddlQuarter.SelectedValue = quarter; + //} + //获取项目报告集合 + List safetyQuarterlyReports = (from x in Funs.DB.InformationProject_SafetyQuarterlyReport where x.YearId.ToString() == year && x.Quarters.ToString() == quarter && x.States == BLL.Const.State_2 select x).ToList(); + if (safetyQuarterlyReports.Count > 0) + { + decimal sumPersonWorkTimeTotal = 0; + sumPersonWorkTimeTotal = safetyQuarterlyReports.Sum(x => x.TotalInWorkHours ?? 0); + this.txtTotalInWorkHours.Text = sumPersonWorkTimeTotal.ToString(); + this.txtTotalOutWorkHours.Text = safetyQuarterlyReports.Sum(x => x.TotalOutWorkHours ?? 0).ToString(); + decimal totalOutWorkHours = Funs.GetNewDecimalOrZero(this.txtTotalOutWorkHours.Text.Trim()); + if (sumPersonWorkTimeTotal != 0) + { + this.txtWorkHoursLossRate.Text = decimal.Round((totalOutWorkHours * 1000000 / sumPersonWorkTimeTotal), 2).ToString(); + } + else + { + this.txtWorkHoursLossRate.Text = "0"; + } + this.txtMainBusinessIncome.Text = safetyQuarterlyReports.Sum(x => x.MainBusinessIncome ?? 0).ToString(); + this.txtConstructionRevenue.Text = safetyQuarterlyReports.Sum(x => x.ConstructionRevenue ?? 0).ToString(); + this.txtUnitTimeIncome.Text = safetyQuarterlyReports.Sum(x => x.UnitTimeIncome ?? 0).ToString(); + this.txtMajorFireAccident.Text = safetyQuarterlyReports.Sum(x => x.MajorFireAccident ?? 0).ToString(); + this.txtMajorEquipAccident.Text = safetyQuarterlyReports.Sum(x => x.MajorEquipAccident ?? 0).ToString(); + this.txtSeriousInjuryAccident.Text = safetyQuarterlyReports.Sum(x => x.SeriousInjuryAccident ?? 0).ToString(); + this.txtFireAccident.Text = safetyQuarterlyReports.Sum(x => x.FireAccident ?? 0).ToString(); + this.txtEquipmentAccident.Text = safetyQuarterlyReports.Sum(x => x.EquipmentAccident ?? 0).ToString(); + this.txtPoisoningAndInjuries.Text = safetyQuarterlyReports.Sum(x => x.PoisoningAndInjuries ?? 0).ToString(); + this.txtProductionSafetyInTotal.Text = safetyQuarterlyReports.Sum(x => x.ProductionSafetyInTotal ?? 0).ToString(); + this.txtProtectionInput.Text = safetyQuarterlyReports.Sum(x => x.ProtectionInput ?? 0).ToString(); + this.txtLaboAndHealthIn.Text = safetyQuarterlyReports.Sum(x => x.LaboAndHealthIn ?? 0).ToString(); + this.txtTechnologyProgressIn.Text = safetyQuarterlyReports.Sum(x => x.TechnologyProgressIn ?? 0).ToString(); + this.txtEducationTrainIn.Text = safetyQuarterlyReports.Sum(x => x.EducationTrainIn ?? 0).ToString(); + this.txtProductionInput.Text = safetyQuarterlyReports.Sum(x => x.ProductionInput ?? 0).ToString(); + this.txtFullTimeMan.Text = safetyQuarterlyReports.Sum(x => x.FullTimeMan ?? 0).ToString(); + this.txtPMMan.Text = safetyQuarterlyReports.Sum(x => x.PMMan ?? 0).ToString(); + this.txtCorporateDirectorEdu.Text = safetyQuarterlyReports.Sum(x => x.CorporateDirectorEdu ?? 0).ToString(); + this.txtProjectLeaderEdu.Text = safetyQuarterlyReports.Sum(x => x.ProjectLeaderEdu ?? 0).ToString(); + this.txtFullTimeEdu.Text = safetyQuarterlyReports.Sum(x => x.FullTimeEdu ?? 0).ToString(); + this.txtKeyEquipmentTotal.Text = safetyQuarterlyReports.Sum(x => x.KeyEquipmentTotal ?? 0).ToString(); + this.txtKeyEquipmentReportCount.Text = safetyQuarterlyReports.Sum(x => x.KeyEquipmentReportCount ?? 0).ToString(); + this.txtChemicalAreaProjectCount.Text = safetyQuarterlyReports.Sum(x => x.ChemicalAreaProjectCount ?? 0).ToString(); + this.txtHarmfulMediumCoverCount.Text = safetyQuarterlyReports.Sum(x => x.HarmfulMediumCoverCount ?? 0).ToString(); + } + } + var unit = BLL.UnitService.GetUnitByUnitId(this.ddlUnitId.SelectedValue); + if (unit != null) + { + if (!string.IsNullOrEmpty(unit.UnitTypeId)) + { + var unitType = BLL.UnitTypeService.GetUnitTypeById(unit.UnitTypeId); + if (unitType != null) + { + if (unitType.UnitTypeName.Contains("施工")) + { + this.txtConstructionRevenue.Hidden = true; + this.txtConstructionRevenueRemark.Hidden = true; + this.txtKeyEquipmentTotal.Hidden = false; + this.txtKeyEquipmentTotalRemark.Hidden = false; + this.txtKeyEquipmentReportCount.Hidden = false; + this.txtKeyEquipmentReportCountRemark.Hidden = false; + this.txtChemicalAreaProjectCount.Hidden = false; + this.txtChemicalAreaProjectCountRemark.Hidden = false; + this.txtHarmfulMediumCoverCount.Hidden = false; + this.txtHarmfulMediumCoverCountRemark.Hidden = false; + this.txtHarmfulMediumCoverRate.Hidden = false; + this.txtHarmfulMediumCoverRateRemark.Hidden = false; + } + else + { + this.txtConstructionRevenue.Hidden = false; + this.txtConstructionRevenueRemark.Hidden = false; + this.txtKeyEquipmentTotal.Hidden = true; + this.txtKeyEquipmentTotalRemark.Hidden = true; + this.txtKeyEquipmentReportCount.Hidden = true; + this.txtKeyEquipmentReportCountRemark.Hidden = true; + this.txtChemicalAreaProjectCount.Hidden = true; + this.txtChemicalAreaProjectCountRemark.Hidden = true; + this.txtHarmfulMediumCoverCount.Hidden = true; + this.txtHarmfulMediumCoverCountRemark.Hidden = true; + this.txtHarmfulMediumCoverRate.Hidden = true; + this.txtHarmfulMediumCoverRateRemark.Hidden = true; + } + } + } + } + } + } + #endregion + + #region 保存数据 + private void Save(string type) + { + Model.Information_SafetyQuarterlyReport safetyQuarterlyReport = new Model.Information_SafetyQuarterlyReport(); + if (this.ddlUnitId.SelectedValue != "null") + { + safetyQuarterlyReport.UnitId = this.ddlUnitId.SelectedValue; + } + else + { + ShowNotify("请选择单位!", MessageBoxIcon.Warning); + return; + } + if (this.ddlYearId.SelectedValue != BLL.Const._Null) + { + safetyQuarterlyReport.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + } + else + { + ShowNotify("请选择年度!", MessageBoxIcon.Warning); + return; + } + if (this.ddlQuarter.SelectedValue != BLL.Const._Null) + { + safetyQuarterlyReport.Quarters = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + } + else + { + ShowNotify("请选择季度!", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(this.txtTotalInWorkHours.Text)) + { + try + { + safetyQuarterlyReport.TotalInWorkHours = Convert.ToInt32(this.txtTotalInWorkHours.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【总投入工时数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.TotalInWorkHoursRemark = this.txtTotalInWorkHoursRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtTotalOutWorkHours.Text.Trim())) + { + try + { + safetyQuarterlyReport.TotalOutWorkHours = Convert.ToInt32(this.txtTotalOutWorkHours.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【总损失工时数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.TotalOutWorkHoursRemark = this.txtTotalOutWorkHoursRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtWorkHoursLossRate.Text.Trim())) + { + try + { + safetyQuarterlyReport.WorkHoursLossRate = Convert.ToDecimal(this.txtWorkHoursLossRate.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【百万工时损失率】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.WorkHoursLossRateRemark = this.txtWorkHoursLossRateRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtWorkHoursAccuracy.Text.Trim())) + { + try + { + safetyQuarterlyReport.WorkHoursAccuracy = Convert.ToDecimal(this.txtWorkHoursAccuracy.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【工时统计准确率】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.WorkHoursAccuracyRemark = this.txtWorkHoursAccuracyRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtMainBusinessIncome.Text.Trim())) + { + try + { + safetyQuarterlyReport.MainBusinessIncome = Convert.ToDecimal(this.txtMainBusinessIncome.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【主营业务收入/亿元】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.MainBusinessIncomeRemark = this.txtMainBusinessIncomeRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtConstructionRevenue.Text.Trim())) + { + try + { + safetyQuarterlyReport.ConstructionRevenue = Convert.ToDecimal(this.txtConstructionRevenue.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【施工收入/亿元】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.ConstructionRevenueRemark = this.txtConstructionRevenueRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtUnitTimeIncome.Text.Trim())) + { + try + { + safetyQuarterlyReport.UnitTimeIncome = Convert.ToDecimal(this.txtUnitTimeIncome.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【单位工时收入/元】必须是数字!", MessageBoxIcon.Warning); + } + } + safetyQuarterlyReport.UnitTimeIncomeRemark = this.txtUnitTimeIncomeRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtBillionsOutputMortality.Text.Trim())) + { + try + { + safetyQuarterlyReport.BillionsOutputMortality = Convert.ToDecimal(this.txtBillionsOutputMortality.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【百亿产值死亡率(%)】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.BillionsOutputMortalityRemark = this.txtBillionsOutputMortalityRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtMajorFireAccident.Text.Trim())) + { + try + { + safetyQuarterlyReport.MajorFireAccident = Convert.ToInt32(this.txtMajorFireAccident.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【重大火灾事故报告数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.MajorFireAccidentRemark = this.txtMajorFireAccidentRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtMajorEquipAccident.Text.Trim())) + { + try + { + safetyQuarterlyReport.MajorEquipAccident = Convert.ToInt32(this.txtMajorEquipAccident.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【重大机械设备事故报告数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.MajorEquipAccidentRemark = this.txtMajorEquipAccidentRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtAccidentFrequency.Text.Trim())) + { + try + { + safetyQuarterlyReport.AccidentFrequency = Convert.ToDecimal(this.txtAccidentFrequency.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【事故发生频率(占总收入之比)】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.AccidentFrequencyRemark = this.txtAccidentFrequencyRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtSeriousInjuryAccident.Text.Trim())) + { + try + { + safetyQuarterlyReport.SeriousInjuryAccident = Convert.ToInt32(this.txtSeriousInjuryAccident.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【重伤以上事故报告数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.SeriousInjuryAccidentRemark = this.txtSeriousInjuryAccidentRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtFireAccident.Text.Trim())) + { + try + { + safetyQuarterlyReport.FireAccident = Convert.ToInt32(this.txtFireAccident.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【火灾事故统计报告数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.FireAccidentRemark = this.txtFireAccidentRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtEquipmentAccident.Text.Trim())) + { + try + { + safetyQuarterlyReport.EquipmentAccident = Convert.ToInt32(this.txtEquipmentAccident.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【装备事故统计报告数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.EquipmentAccidentRemark = this.txtEquipmentAccidentRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtPoisoningAndInjuries.Text.Trim())) + { + try + { + safetyQuarterlyReport.PoisoningAndInjuries = Convert.ToInt32(this.txtPoisoningAndInjuries.Text); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【中毒及职业伤害报告数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.PoisoningAndInjuriesRemark = this.txtPoisoningAndInjuriesRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtProductionSafetyInTotal.Text.Trim())) + { + try + { + safetyQuarterlyReport.ProductionSafetyInTotal = Convert.ToInt32(this.txtProductionSafetyInTotal.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【安全生产投入总额/元】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.ProductionSafetyInTotalRemark = this.txtProductionSafetyInTotalRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtProtectionInput.Text.Trim())) + { + try + { + safetyQuarterlyReport.ProtectionInput = Convert.ToDecimal(this.txtProtectionInput.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【安全防护投入/元】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.ProtectionInputRemark = this.txtProtectionInputRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtLaboAndHealthIn.Text.Trim())) + { + try + { + safetyQuarterlyReport.LaboAndHealthIn = Convert.ToDecimal(this.txtLaboAndHealthIn.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【劳动保护及职业健康投入/元】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.LaborAndHealthInRemark = this.txtLaboAndHealthInRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtTechnologyProgressIn.Text.Trim())) + { + try + { + safetyQuarterlyReport.TechnologyProgressIn = Convert.ToDecimal(this.txtTechnologyProgressIn.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【安全技术进步投入/元】必须是数字!", MessageBoxIcon.Warning); + return; + } + + } + safetyQuarterlyReport.TechnologyProgressInRemark = this.txtTechnologyProgressInRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtEducationTrainIn.Text.Trim())) + { + try + { + safetyQuarterlyReport.EducationTrainIn = Convert.ToDecimal(this.txtEducationTrainIn.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【安全教育培训投入/元】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.EducationTrainInRemark = this.txtEducationTrainInRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtProjectCostRate.Text.Trim())) + { + try + { + safetyQuarterlyReport.ProjectCostRate = Convert.ToDecimal(this.txtProjectCostRate.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【工程造价占比(%)】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.ProjectCostRateRemark = this.txtProjectCostRateRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtProductionInput.Text.Trim())) + { + try + { + safetyQuarterlyReport.ProductionInput = Convert.ToDecimal(this.txtProductionInput.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【百万工时安全生产投入额/万元】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.ProductionInputRemark = this.txtProductionInputRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtRevenue.Text.Trim())) + { + try + { + safetyQuarterlyReport.Revenue = Convert.ToDecimal(this.txtRevenue.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【安全生产投入占施工收入之比(%)】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.RevenueRemark = this.txtRevenueRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtFullTimeMan.Text.Trim())) + { + try + { + safetyQuarterlyReport.FullTimeMan = Convert.ToInt32(this.txtFullTimeMan.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【安全专职人员总数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.FullTimeManRemark = this.txtFullTimeManRemark.Text; + safetyQuarterlyReport.FullTimeManAttachUrl = this.FullTimeManAttachUrl; + if (!string.IsNullOrEmpty(this.txtPMMan.Text.Trim())) + { + try + { + safetyQuarterlyReport.PMMan = Convert.ToInt32(this.txtPMMan.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【项目经理人员总数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.PMManRemark = this.txtPMManRemark.Text.Trim(); + safetyQuarterlyReport.PMManAttachUrl = this.PMManAttachUrl; + if (!string.IsNullOrEmpty(this.txtCorporateDirectorEdu.Text.Trim())) + { + try + { + safetyQuarterlyReport.CorporateDirectorEdu = Convert.ToInt32(this.txtCorporateDirectorEdu.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【企业负责人安全生产继续教育数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.CorporateDirectorEduRemark = this.txtCorporateDirectorEduRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtProjectLeaderEdu.Text.Trim())) + { + try + { + safetyQuarterlyReport.ProjectLeaderEdu = Convert.ToInt32(this.txtProjectLeaderEdu.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【项目负责人安全生产继续教育数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.ProjectLeaderEduRemark = this.txtProjectLeaderEduRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtFullTimeEdu.Text.Trim())) + { + try + { + safetyQuarterlyReport.FullTimeEdu = Convert.ToInt32(this.txtFullTimeEdu.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【安全专职人员安全生产继续教育数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.FullTimeEduRemark = this.txtFullTimeEduRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtThreeKidsEduRate.Text.Trim())) + { + try + { + safetyQuarterlyReport.ThreeKidsEduRate = Convert.ToDecimal(this.txtThreeKidsEduRate.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【安全生产三类人员继续教育覆盖率】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.ThreeKidsEduRateRemark = this.txtThreeKidsEduRateRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtUplinReportRate.Text.Trim())) + { + try + { + safetyQuarterlyReport.UplinReportRate = Convert.ToDecimal(this.txtUplinReportRate.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【上行报告(施工现场安全生产动态季报、专项活动总结上报、生产事故按时限上报)履行率】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.UplinReportRateRemark = this.txtUplinReportRateRemark.Text.Trim(); + safetyQuarterlyReport.Remarks = this.txtRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtKeyEquipmentTotal.Text.Trim())) + { + try + { + safetyQuarterlyReport.KeyEquipmentTotal = Convert.ToInt32(this.txtKeyEquipmentTotal.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【重点装备总数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.KeyEquipmentTotalRemark = this.txtKeyEquipmentTotalRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtKeyEquipmentReportCount.Text.Trim())) + { + try + { + safetyQuarterlyReport.KeyEquipmentReportCount = Convert.ToInt32(this.txtKeyEquipmentReportCount.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【重点装备安全控制检查报告数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.KeyEquipmentReportCountRemark = this.txtKeyEquipmentReportCountRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtChemicalAreaProjectCount.Text.Trim())) + { + try + { + safetyQuarterlyReport.ChemicalAreaProjectCount = Convert.ToInt32(this.txtChemicalAreaProjectCount.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【化工界区施工作业项目数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.ChemicalAreaProjectCountRemark = this.txtChemicalAreaProjectCountRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtHarmfulMediumCoverCount.Text.Trim())) + { + try + { + safetyQuarterlyReport.HarmfulMediumCoverCount = Convert.ToInt32(this.txtHarmfulMediumCoverCount.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【化工界区施工作业有害介质检测复测覆盖数】必须是整数!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.HarmfulMediumCoverCountRemark = this.txtHarmfulMediumCoverCountRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtHarmfulMediumCoverRate.Text.Trim())) + { + try + { + safetyQuarterlyReport.HarmfulMediumCoverRate = Convert.ToDecimal(this.txtHarmfulMediumCoverRate.Text.Trim()); + } + catch (Exception) + { + ShowNotify("输入的格式不正确,【施工作业安全技术交底覆盖率(%)】必须是数字!", MessageBoxIcon.Warning); + return; + } + } + safetyQuarterlyReport.HarmfulMediumCoverRateRemark = this.txtHarmfulMediumCoverRateRemark.Text.Trim(); + if (string.IsNullOrEmpty(this.SafetyQuarterlyReportId)) + { + var s = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportByUnitYearQuarters(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue)); + if (s != null) + { + ShowNotify("该单位的该年度的该季度安全生产数据季报已经存在,不能重复编制!", MessageBoxIcon.Warning); + return; + } + else + { + this.SafetyQuarterlyReportId = SQLHelper.GetNewID(typeof(Model.Information_SafetyQuarterlyReport)); + safetyQuarterlyReport.SafetyQuarterlyReportId = this.SafetyQuarterlyReportId; + safetyQuarterlyReport.CompileMan = this.CurrUser.PersonName; + safetyQuarterlyReport.UpState = BLL.Const.UpState_2; + safetyQuarterlyReport.HandleMan = this.CurrUser.PersonId; + safetyQuarterlyReport.HandleState = BLL.Const.HandleState_1; + BLL.SafetyQuarterlyReportService.AddSafetyQuarterlyReport(safetyQuarterlyReport); + BLL.LogService.AddSys_Log(this.CurrUser, (this.ddlYearId.SelectedText + "-" + this.ddlQuarter.SelectedText), safetyQuarterlyReport.SafetyQuarterlyReportId, BLL.Const.SafetyQuarterlyReportMenuId, BLL.Const.BtnAdd); + } + } + else + { + var oldReport = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(this.SafetyQuarterlyReportId); + if (oldReport != null) + { + safetyQuarterlyReport.HandleMan = oldReport.HandleMan; + safetyQuarterlyReport.HandleState = oldReport.HandleState; + } + safetyQuarterlyReport.SafetyQuarterlyReportId = this.SafetyQuarterlyReportId; + safetyQuarterlyReport.UpState = BLL.Const.UpState_2; + BLL.SafetyQuarterlyReportService.UpdateSafetyQuarterlyReport(safetyQuarterlyReport); + BLL.LogService.AddSys_Log(this.CurrUser, (this.ddlYearId.SelectedText + "-" + this.ddlQuarter.SelectedText), safetyQuarterlyReport.SafetyQuarterlyReportId, BLL.Const.SafetyQuarterlyReportMenuId, BLL.Const.BtnModify); + } + if (type == "updata") //保存并上报 + { + if (safetyQuarterlyReport.UpState == BLL.Const.UpState_2) + { + string code = CNCECHSSEWebService.UpSafetyQuarterlyReport(safetyQuarterlyReport.SafetyQuarterlyReportId, this.CurrUser); + if (code == "1") + { + ShowNotify("同步成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + return; + } + else + { + Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error); + } + } + else + { + ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning); + return; + } + } + if (type == "submit") + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=SafetyQuarterlyReport&Id={0}", safetyQuarterlyReport.SafetyQuarterlyReportId, "编辑 - "))); + } + if (type != "submit") + { + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Save("add"); + } + + protected void btnUpdata_Click(object sender, EventArgs e) + { + Save("updata"); + } + + /// + /// 提交按钮 + /// + /// + /// + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save("submit"); + } + #endregion + + #region 上传附件 + /// + /// 上传安全专职人员名单附件 + /// + /// + /// + protected void btnUpFullTimeManAttachUrl_Click(object sender, EventArgs e) + { + if (fuFullTimeManAttachUrl.HasFile) + { + this.lbFullTimeManAttachUrl.Text = fuFullTimeManAttachUrl.ShortFileName; + if (ValidateFileTypes(this.lbFullTimeManAttachUrl.Text)) + { + ShowNotify("无效的文件类型!", MessageBoxIcon.Warning); + return; + } + this.FullTimeManAttachUrl = BLL.UploadFileService.UploadAttachment(BLL.Funs.RootPath, this.fuFullTimeManAttachUrl, this.FullTimeManAttachUrl, UploadFileService.SafetyQuarterlyReportFilePath); + if (string.IsNullOrEmpty(this.FullTimeManAttachUrl)) + { + ShowNotify("文件名已经存在!", MessageBoxIcon.Warning); + return; + } + else + { + ShowNotify("文件上传成功!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("上传文件不存在!", MessageBoxIcon.Warning); + } + } + + /// + /// 删除安全专职人员名单附件 + /// + /// + /// + protected void btnDeleteFullTimeManAttachUrl_Click(object sender, EventArgs e) + { + this.fuFullTimeManAttachUrl.Reset(); + this.lbFullTimeManAttachUrl.Text = string.Empty; + this.FullTimeManAttachUrl = string.Empty; + } + + /// + /// 查看安全专职人员名单附件 + /// + /// + /// + protected void btnSeeFullTimeManAttachUrl_Click(object sender, EventArgs e) + { + string filePath = BLL.Funs.RootPath + this.FullTimeManAttachUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(filePath); + if (info.Exists) + { + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(filePath, 0, fileSize); + Response.Flush(); + Response.Close(); + this.SimpleForm1.Reset(); + } + else + { + ScriptManager.RegisterStartupScript(this, typeof(string), "_alert", "alert('模板不存在,请联系管理员!')", true); + } + } + + /// + /// 上传项目经理人员名单附件 + /// + /// + /// + protected void btnUpPMManAttachUrl_Click(object sender, EventArgs e) + { + if (fuPMManAttachUrl.HasFile) + { + this.lbPMManAttachUrl.Text = fuPMManAttachUrl.ShortFileName; + if (ValidateFileTypes(this.lbPMManAttachUrl.Text)) + { + ShowNotify("无效的文件类型!"); + return; + } + this.PMManAttachUrl = BLL.UploadFileService.UploadAttachment(BLL.Funs.RootPath, this.fuPMManAttachUrl, this.PMManAttachUrl, UploadFileService.SafetyQuarterlyReportFilePath); + if (string.IsNullOrEmpty(this.PMManAttachUrl)) + { + ShowNotify("文件名已经存在!"); + return; + } + else + { + ShowNotify("文件上传成功!"); + } + } + else + { + ShowNotify("上传文件不存在!"); + } + } + + /// + /// 删除项目经理人员名单附件 + /// + /// + /// + protected void btnDeletePMManAttachUrl_Click(object sender, EventArgs e) + { + this.fuPMManAttachUrl.Reset(); + this.lbPMManAttachUrl.Text = string.Empty; + this.PMManAttachUrl = string.Empty; + } + + /// + /// 查看项目经理人员名单附件 + /// + /// + /// + protected void btnSeePMManAttachUrl_Click(object sender, EventArgs e) + { + string filePath = BLL.Funs.RootPath + this.PMManAttachUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(filePath); + if (info.Exists) + { + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(filePath, 0, fileSize); + Response.Flush(); + Response.Close(); + this.SimpleForm1.Reset(); + } + else + { + ScriptManager.RegisterStartupScript(this, typeof(string), "_alert", "alert('附件不存在!')", true); + } + } + #endregion + + #region 关闭办理流程窗口 + /// + /// 关闭办理流程窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + Model.Information_SafetyQuarterlyReport report = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(this.SafetyQuarterlyReportId); + if (report.HandleMan == this.CurrUser.PersonId) + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + } + } + #endregion + + #region 复制上个季度数据 + /// + /// 复制上个季度数据 + /// + /// + /// + protected void btnCopy_Click(object sender, EventArgs e) + { + int lastYear = 0, lastQuarter = 0; + int year = Convert.ToInt32(this.ddlYearId.SelectedValue); + int quarter = Convert.ToInt32(this.ddlQuarter.SelectedValue); + if (quarter == 1) + { + lastYear = year - 1; + lastQuarter = 4; + } + else + { + lastYear = year; + lastQuarter = quarter - 1; + } + Model.Information_SafetyQuarterlyReport safetyQuarterlyReport = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportByUnitIdAndYearAndQuarters(this.ddlUnitId.SelectedValue, lastYear, lastQuarter); + if (safetyQuarterlyReport != null) + { + Model.Information_SafetyQuarterlyReport newSafetyQuarterlyReport = new Model.Information_SafetyQuarterlyReport(); + this.SafetyQuarterlyReportId = SQLHelper.GetNewID(typeof(Model.Information_SafetyQuarterlyReport)); + newSafetyQuarterlyReport.SafetyQuarterlyReportId = this.SafetyQuarterlyReportId; + newSafetyQuarterlyReport.UnitId = this.ddlUnitId.SelectedValue; + newSafetyQuarterlyReport.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); + newSafetyQuarterlyReport.Quarters = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + newSafetyQuarterlyReport.TotalInWorkHours = safetyQuarterlyReport.TotalInWorkHours; + newSafetyQuarterlyReport.TotalInWorkHoursRemark = safetyQuarterlyReport.TotalInWorkHoursRemark; + newSafetyQuarterlyReport.TotalOutWorkHours = safetyQuarterlyReport.TotalOutWorkHours; + newSafetyQuarterlyReport.TotalOutWorkHoursRemark = safetyQuarterlyReport.TotalOutWorkHoursRemark; + newSafetyQuarterlyReport.WorkHoursLossRate = safetyQuarterlyReport.WorkHoursLossRate; + newSafetyQuarterlyReport.WorkHoursLossRateRemark = safetyQuarterlyReport.WorkHoursLossRateRemark; + newSafetyQuarterlyReport.WorkHoursAccuracy = safetyQuarterlyReport.WorkHoursAccuracy; + newSafetyQuarterlyReport.WorkHoursAccuracyRemark = safetyQuarterlyReport.WorkHoursAccuracyRemark; + newSafetyQuarterlyReport.MainBusinessIncome = safetyQuarterlyReport.MainBusinessIncome; + newSafetyQuarterlyReport.MainBusinessIncomeRemark = safetyQuarterlyReport.MainBusinessIncomeRemark; + newSafetyQuarterlyReport.ConstructionRevenue = safetyQuarterlyReport.ConstructionRevenue; + newSafetyQuarterlyReport.ConstructionRevenueRemark = safetyQuarterlyReport.ConstructionRevenueRemark; + newSafetyQuarterlyReport.UnitTimeIncome = safetyQuarterlyReport.UnitTimeIncome; + newSafetyQuarterlyReport.UnitTimeIncomeRemark = safetyQuarterlyReport.UnitTimeIncomeRemark; + newSafetyQuarterlyReport.BillionsOutputMortality = safetyQuarterlyReport.BillionsOutputMortality; + newSafetyQuarterlyReport.BillionsOutputMortalityRemark = safetyQuarterlyReport.BillionsOutputMortalityRemark; + newSafetyQuarterlyReport.MajorFireAccident = safetyQuarterlyReport.MajorFireAccident; + newSafetyQuarterlyReport.MajorFireAccidentRemark = safetyQuarterlyReport.MajorFireAccidentRemark; + newSafetyQuarterlyReport.MajorEquipAccident = safetyQuarterlyReport.MajorEquipAccident; + newSafetyQuarterlyReport.MajorEquipAccidentRemark = safetyQuarterlyReport.MajorEquipAccidentRemark; + newSafetyQuarterlyReport.AccidentFrequency = safetyQuarterlyReport.AccidentFrequency; + newSafetyQuarterlyReport.AccidentFrequencyRemark = safetyQuarterlyReport.AccidentFrequencyRemark; + newSafetyQuarterlyReport.SeriousInjuryAccident = safetyQuarterlyReport.SeriousInjuryAccident; + newSafetyQuarterlyReport.SeriousInjuryAccidentRemark = safetyQuarterlyReport.SeriousInjuryAccidentRemark; + newSafetyQuarterlyReport.FireAccident = safetyQuarterlyReport.FireAccident; + newSafetyQuarterlyReport.FireAccidentRemark = safetyQuarterlyReport.FireAccidentRemark; + newSafetyQuarterlyReport.EquipmentAccident = safetyQuarterlyReport.EquipmentAccident; + newSafetyQuarterlyReport.EquipmentAccidentRemark = safetyQuarterlyReport.EquipmentAccidentRemark; + newSafetyQuarterlyReport.PoisoningAndInjuries = safetyQuarterlyReport.PoisoningAndInjuries; + newSafetyQuarterlyReport.PoisoningAndInjuriesRemark = safetyQuarterlyReport.PoisoningAndInjuriesRemark; + newSafetyQuarterlyReport.ProductionSafetyInTotal = safetyQuarterlyReport.ProductionSafetyInTotal; + newSafetyQuarterlyReport.ProductionSafetyInTotalRemark = safetyQuarterlyReport.ProductionSafetyInTotalRemark; + newSafetyQuarterlyReport.ProtectionInput = safetyQuarterlyReport.ProtectionInput; + newSafetyQuarterlyReport.ProtectionInputRemark = safetyQuarterlyReport.ProtectionInputRemark; + newSafetyQuarterlyReport.LaboAndHealthIn = safetyQuarterlyReport.LaboAndHealthIn; + newSafetyQuarterlyReport.LaborAndHealthInRemark = safetyQuarterlyReport.LaborAndHealthInRemark; + newSafetyQuarterlyReport.TechnologyProgressIn = safetyQuarterlyReport.TechnologyProgressIn; + newSafetyQuarterlyReport.TechnologyProgressInRemark = safetyQuarterlyReport.TechnologyProgressInRemark; + newSafetyQuarterlyReport.EducationTrainIn = safetyQuarterlyReport.EducationTrainIn; + newSafetyQuarterlyReport.EducationTrainInRemark = safetyQuarterlyReport.EducationTrainInRemark; + newSafetyQuarterlyReport.ProjectCostRate = safetyQuarterlyReport.ProjectCostRate; + newSafetyQuarterlyReport.ProjectCostRateRemark = safetyQuarterlyReport.ProjectCostRateRemark; + newSafetyQuarterlyReport.ProductionInput = safetyQuarterlyReport.ProductionInput; + newSafetyQuarterlyReport.ProductionInputRemark = safetyQuarterlyReport.ProductionInputRemark; + newSafetyQuarterlyReport.Revenue = safetyQuarterlyReport.Revenue; + newSafetyQuarterlyReport.RevenueRemark = safetyQuarterlyReport.RevenueRemark; + newSafetyQuarterlyReport.FullTimeMan = safetyQuarterlyReport.FullTimeMan; + newSafetyQuarterlyReport.FullTimeManRemark = safetyQuarterlyReport.FullTimeManRemark; + newSafetyQuarterlyReport.FullTimeManAttachUrl = safetyQuarterlyReport.FullTimeManAttachUrl; + newSafetyQuarterlyReport.PMMan = safetyQuarterlyReport.PMMan; + newSafetyQuarterlyReport.PMManRemark = safetyQuarterlyReport.PMManRemark; + newSafetyQuarterlyReport.PMManAttachUrl = safetyQuarterlyReport.PMManAttachUrl; + newSafetyQuarterlyReport.CorporateDirectorEdu = safetyQuarterlyReport.CorporateDirectorEdu; + newSafetyQuarterlyReport.CorporateDirectorEduRemark = safetyQuarterlyReport.CorporateDirectorEduRemark; + newSafetyQuarterlyReport.ProjectLeaderEdu = safetyQuarterlyReport.ProjectLeaderEdu; + newSafetyQuarterlyReport.ProjectLeaderEduRemark = safetyQuarterlyReport.ProjectLeaderEduRemark; + newSafetyQuarterlyReport.FullTimeEdu = safetyQuarterlyReport.FullTimeEdu; + newSafetyQuarterlyReport.FullTimeEduRemark = safetyQuarterlyReport.FullTimeEduRemark; + newSafetyQuarterlyReport.ThreeKidsEduRate = safetyQuarterlyReport.ThreeKidsEduRate; + newSafetyQuarterlyReport.ThreeKidsEduRateRemark = safetyQuarterlyReport.ThreeKidsEduRateRemark; + newSafetyQuarterlyReport.UplinReportRate = safetyQuarterlyReport.UplinReportRate; + newSafetyQuarterlyReport.UplinReportRateRemark = safetyQuarterlyReport.UplinReportRateRemark; + newSafetyQuarterlyReport.Remarks = safetyQuarterlyReport.Remarks; + newSafetyQuarterlyReport.FillingDate = DateTime.Now; + newSafetyQuarterlyReport.CompileMan = this.CurrUser.PersonName; + newSafetyQuarterlyReport.UpState = BLL.Const.UpState_2; + newSafetyQuarterlyReport.HandleMan = this.CurrUser.PersonId; + newSafetyQuarterlyReport.HandleState = BLL.Const.HandleState_1; + newSafetyQuarterlyReport.KeyEquipmentTotal = safetyQuarterlyReport.KeyEquipmentTotal; + newSafetyQuarterlyReport.KeyEquipmentTotalRemark = safetyQuarterlyReport.KeyEquipmentTotalRemark; + newSafetyQuarterlyReport.KeyEquipmentReportCount = safetyQuarterlyReport.KeyEquipmentReportCount; + newSafetyQuarterlyReport.KeyEquipmentReportCountRemark = safetyQuarterlyReport.KeyEquipmentReportCountRemark; + newSafetyQuarterlyReport.ChemicalAreaProjectCount = safetyQuarterlyReport.ChemicalAreaProjectCount; + newSafetyQuarterlyReport.ChemicalAreaProjectCountRemark = safetyQuarterlyReport.ChemicalAreaProjectCountRemark; + newSafetyQuarterlyReport.HarmfulMediumCoverCount = safetyQuarterlyReport.HarmfulMediumCoverCount; + newSafetyQuarterlyReport.HarmfulMediumCoverCountRemark = safetyQuarterlyReport.HarmfulMediumCoverCountRemark; + newSafetyQuarterlyReport.HarmfulMediumCoverRate = safetyQuarterlyReport.HarmfulMediumCoverRate; + newSafetyQuarterlyReport.HarmfulMediumCoverRateRemark = safetyQuarterlyReport.HarmfulMediumCoverRateRemark; + BLL.SafetyQuarterlyReportService.AddSafetyQuarterlyReport(newSafetyQuarterlyReport); + + GetValues(newSafetyQuarterlyReport.SafetyQuarterlyReportId); + } + } + + /// + /// 赋值 + /// + private void GetValues(string safetyQuarterlyReportId) + { + var safetyQuarterlyReport = BLL.SafetyQuarterlyReportService.GetSafetyQuarterlyReportById(safetyQuarterlyReportId); + if (safetyQuarterlyReport != null) + { + if (safetyQuarterlyReport.TotalInWorkHours != null) + { + this.txtTotalInWorkHours.Text = Convert.ToString(safetyQuarterlyReport.TotalInWorkHours); + } + this.txtTotalInWorkHoursRemark.Text = safetyQuarterlyReport.TotalInWorkHoursRemark; + if (safetyQuarterlyReport.TotalOutWorkHours != null) + { + this.txtTotalOutWorkHours.Text = Convert.ToString(safetyQuarterlyReport.TotalOutWorkHours); + } + this.txtTotalOutWorkHoursRemark.Text = safetyQuarterlyReport.TotalOutWorkHoursRemark; + if (safetyQuarterlyReport.WorkHoursLossRate != null) + { + this.txtWorkHoursLossRate.Text = Convert.ToString(safetyQuarterlyReport.WorkHoursLossRate); + } + this.txtWorkHoursLossRateRemark.Text = safetyQuarterlyReport.WorkHoursLossRateRemark; + if (safetyQuarterlyReport.WorkHoursAccuracy != null) + { + this.txtWorkHoursAccuracy.Text = Convert.ToString(safetyQuarterlyReport.WorkHoursAccuracy); + } + this.txtWorkHoursAccuracyRemark.Text = safetyQuarterlyReport.WorkHoursAccuracyRemark; + if (safetyQuarterlyReport.MainBusinessIncome != null) + { + this.txtMainBusinessIncome.Text = Convert.ToString(safetyQuarterlyReport.MainBusinessIncome); + } + this.txtMainBusinessIncomeRemark.Text = safetyQuarterlyReport.MainBusinessIncomeRemark; + if (safetyQuarterlyReport.ConstructionRevenue != null) + { + this.txtConstructionRevenue.Text = Convert.ToString(safetyQuarterlyReport.ConstructionRevenue); + } + this.txtConstructionRevenueRemark.Text = safetyQuarterlyReport.ConstructionRevenueRemark; + if (safetyQuarterlyReport.UnitTimeIncome != null) + { + this.txtUnitTimeIncome.Text = Convert.ToString(safetyQuarterlyReport.UnitTimeIncome); + } + this.txtUnitTimeIncomeRemark.Text = safetyQuarterlyReport.UnitTimeIncomeRemark; + if (safetyQuarterlyReport.BillionsOutputMortality != null) + { + this.txtBillionsOutputMortality.Text = Convert.ToString(safetyQuarterlyReport.BillionsOutputMortality); + } + this.txtBillionsOutputMortalityRemark.Text = safetyQuarterlyReport.BillionsOutputMortalityRemark; + if (safetyQuarterlyReport.MajorFireAccident != null) + { + this.txtMajorFireAccident.Text = Convert.ToString(safetyQuarterlyReport.MajorFireAccident); + } + this.txtMajorFireAccidentRemark.Text = safetyQuarterlyReport.MajorFireAccidentRemark; + if (safetyQuarterlyReport.MajorEquipAccident != null) + { + this.txtMajorEquipAccident.Text = Convert.ToString(safetyQuarterlyReport.MajorEquipAccident); + } + this.txtMajorEquipAccidentRemark.Text = safetyQuarterlyReport.MajorEquipAccidentRemark; + if (safetyQuarterlyReport.AccidentFrequency != null) + { + this.txtAccidentFrequency.Text = Convert.ToString(safetyQuarterlyReport.AccidentFrequency); + } + this.txtAccidentFrequencyRemark.Text = safetyQuarterlyReport.AccidentFrequencyRemark; + if (safetyQuarterlyReport.SeriousInjuryAccident != null) + { + this.txtSeriousInjuryAccident.Text = Convert.ToString(safetyQuarterlyReport.SeriousInjuryAccident); + } + this.txtSeriousInjuryAccidentRemark.Text = safetyQuarterlyReport.SeriousInjuryAccidentRemark; + if (safetyQuarterlyReport.FireAccident != null) + { + this.txtFireAccident.Text = Convert.ToString(safetyQuarterlyReport.FireAccident); + } + this.txtFireAccidentRemark.Text = safetyQuarterlyReport.FireAccidentRemark; + if (safetyQuarterlyReport.EquipmentAccident != null) + { + this.txtEquipmentAccident.Text = Convert.ToString(safetyQuarterlyReport.EquipmentAccident); + } + this.txtEquipmentAccidentRemark.Text = safetyQuarterlyReport.EquipmentAccidentRemark; + if (safetyQuarterlyReport.PoisoningAndInjuries != null) + { + this.txtPoisoningAndInjuries.Text = Convert.ToString(safetyQuarterlyReport.PoisoningAndInjuries); + } + this.txtPoisoningAndInjuriesRemark.Text = safetyQuarterlyReport.PoisoningAndInjuriesRemark; + if (safetyQuarterlyReport.ProductionSafetyInTotal != null) + { + this.txtProductionSafetyInTotal.Text = Convert.ToString(safetyQuarterlyReport.ProductionSafetyInTotal); + } + this.txtProductionSafetyInTotalRemark.Text = safetyQuarterlyReport.ProductionSafetyInTotalRemark; + if (safetyQuarterlyReport.ProtectionInput != null) + { + this.txtProtectionInput.Text = Convert.ToString(safetyQuarterlyReport.ProtectionInput); + } + this.txtProtectionInputRemark.Text = safetyQuarterlyReport.ProtectionInputRemark; + if (safetyQuarterlyReport.LaboAndHealthIn != null) + { + this.txtLaboAndHealthIn.Text = Convert.ToString(safetyQuarterlyReport.LaboAndHealthIn); + } + this.txtLaboAndHealthInRemark.Text = safetyQuarterlyReport.LaborAndHealthInRemark; + if (safetyQuarterlyReport.TechnologyProgressIn != null) + { + this.txtTechnologyProgressIn.Text = Convert.ToString(safetyQuarterlyReport.TechnologyProgressIn); + } + this.txtTechnologyProgressInRemark.Text = safetyQuarterlyReport.TechnologyProgressInRemark; + if (safetyQuarterlyReport.EducationTrainIn != null) + { + this.txtEducationTrainIn.Text = Convert.ToString(safetyQuarterlyReport.EducationTrainIn); + } + this.txtEducationTrainInRemark.Text = safetyQuarterlyReport.EducationTrainInRemark; + if (safetyQuarterlyReport.ProjectCostRate != null) + { + this.txtProjectCostRate.Text = Convert.ToString(safetyQuarterlyReport.ProjectCostRate); + } + this.txtProjectCostRateRemark.Text = safetyQuarterlyReport.ProjectCostRateRemark; + if (safetyQuarterlyReport.ProductionInput != null) + { + this.txtProductionInput.Text = Convert.ToString(safetyQuarterlyReport.ProductionInput); + } + this.txtProductionInputRemark.Text = safetyQuarterlyReport.ProductionInputRemark; + if (safetyQuarterlyReport.Revenue != null) + { + this.txtRevenue.Text = Convert.ToString(safetyQuarterlyReport.Revenue); + } + this.txtRevenueRemark.Text = safetyQuarterlyReport.RevenueRemark; + if (safetyQuarterlyReport.FullTimeMan != null) + { + this.txtFullTimeMan.Text = Convert.ToString(safetyQuarterlyReport.FullTimeMan); + } + this.txtFullTimeManRemark.Text = safetyQuarterlyReport.FullTimeManRemark; + if (!string.IsNullOrEmpty(safetyQuarterlyReport.FullTimeManAttachUrl)) + { + this.FullTimeManAttachUrl = safetyQuarterlyReport.FullTimeManAttachUrl; + this.lbFullTimeManAttachUrl.Text = safetyQuarterlyReport.FullTimeManAttachUrl.Substring(safetyQuarterlyReport.FullTimeManAttachUrl.IndexOf("~") + 1); + } + if (safetyQuarterlyReport.PMMan != null) + { + this.txtPMMan.Text = Convert.ToString(safetyQuarterlyReport.PMMan); + } + this.txtPMManRemark.Text = safetyQuarterlyReport.PMManRemark; + if (!string.IsNullOrEmpty(safetyQuarterlyReport.PMManAttachUrl)) + { + this.PMManAttachUrl = safetyQuarterlyReport.PMManAttachUrl; + this.lbPMManAttachUrl.Text = safetyQuarterlyReport.PMManAttachUrl.Substring(safetyQuarterlyReport.PMManAttachUrl.IndexOf("~") + 1); + } + if (safetyQuarterlyReport.CorporateDirectorEdu != null) + { + this.txtCorporateDirectorEdu.Text = Convert.ToString(safetyQuarterlyReport.CorporateDirectorEdu); + } + this.txtCorporateDirectorEduRemark.Text = safetyQuarterlyReport.CorporateDirectorEduRemark; + if (safetyQuarterlyReport.ProjectLeaderEdu != null) + { + this.txtProjectLeaderEdu.Text = Convert.ToString(safetyQuarterlyReport.ProjectLeaderEdu); + } + this.txtProjectLeaderEduRemark.Text = safetyQuarterlyReport.ProjectLeaderEduRemark; + if (safetyQuarterlyReport.FullTimeEdu != null) + { + this.txtFullTimeEdu.Text = Convert.ToString(safetyQuarterlyReport.FullTimeEdu); + } + this.txtFullTimeEduRemark.Text = safetyQuarterlyReport.FullTimeEduRemark; + if (safetyQuarterlyReport.ThreeKidsEduRate != null) + { + this.txtThreeKidsEduRate.Text = Convert.ToString(safetyQuarterlyReport.ThreeKidsEduRate); + } + this.txtThreeKidsEduRateRemark.Text = safetyQuarterlyReport.ThreeKidsEduRateRemark; + if (safetyQuarterlyReport.UplinReportRate != null) + { + this.txtUplinReportRate.Text = Convert.ToString(safetyQuarterlyReport.UplinReportRate); + } + this.txtUplinReportRateRemark.Text = safetyQuarterlyReport.UplinReportRateRemark; + this.txtRemark.Text = safetyQuarterlyReport.Remarks; + if (safetyQuarterlyReport.KeyEquipmentTotal != null) + { + this.txtKeyEquipmentTotal.Text = Convert.ToString(safetyQuarterlyReport.KeyEquipmentTotal); + } + this.txtKeyEquipmentTotalRemark.Text = safetyQuarterlyReport.KeyEquipmentTotalRemark; + if (safetyQuarterlyReport.KeyEquipmentReportCount != null) + { + this.txtKeyEquipmentReportCount.Text = Convert.ToString(safetyQuarterlyReport.KeyEquipmentReportCount); + } + this.txtKeyEquipmentReportCountRemark.Text = safetyQuarterlyReport.KeyEquipmentReportCountRemark; + if (safetyQuarterlyReport.ChemicalAreaProjectCount != null) + { + this.txtChemicalAreaProjectCount.Text = Convert.ToString(safetyQuarterlyReport.ChemicalAreaProjectCount); + } + this.txtChemicalAreaProjectCountRemark.Text = safetyQuarterlyReport.ChemicalAreaProjectCountRemark; + if (safetyQuarterlyReport.HarmfulMediumCoverCount != null) + { + this.txtHarmfulMediumCoverCount.Text = Convert.ToString(safetyQuarterlyReport.HarmfulMediumCoverCount); + } + this.txtHarmfulMediumCoverCountRemark.Text = safetyQuarterlyReport.HarmfulMediumCoverCountRemark; + if (safetyQuarterlyReport.HarmfulMediumCoverRate != null) + { + this.txtHarmfulMediumCoverRate.Text = Convert.ToString(safetyQuarterlyReport.HarmfulMediumCoverRate); + } + this.txtHarmfulMediumCoverRateRemark.Text = safetyQuarterlyReport.HarmfulMediumCoverRateRemark; + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.designer.cs new file mode 100644 index 00000000..1e738455 --- /dev/null +++ b/SGGL/FineUIPro.Web/ZHGL/Information/SafetyQuarterlyReportEdit.aspx.designer.cs @@ -0,0 +1,852 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.ZHGL.Information { + + + public partial class SafetyQuarterlyReportEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// ddlUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlUnitId; + + /// + /// ddlYearId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlYearId; + + /// + /// ddlQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlQuarter; + + /// + /// txtTotalInWorkHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalInWorkHours; + + /// + /// txtTotalInWorkHoursRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTotalInWorkHoursRemark; + + /// + /// txtTotalOutWorkHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTotalOutWorkHours; + + /// + /// txtTotalOutWorkHoursRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTotalOutWorkHoursRemark; + + /// + /// txtWorkHoursLossRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtWorkHoursLossRate; + + /// + /// txtWorkHoursLossRateRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkHoursLossRateRemark; + + /// + /// txtWorkHoursAccuracy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtWorkHoursAccuracy; + + /// + /// txtWorkHoursAccuracyRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWorkHoursAccuracyRemark; + + /// + /// txtMainBusinessIncome 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMainBusinessIncome; + + /// + /// txtMainBusinessIncomeRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMainBusinessIncomeRemark; + + /// + /// txtConstructionRevenue 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtConstructionRevenue; + + /// + /// txtConstructionRevenueRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtConstructionRevenueRemark; + + /// + /// txtUnitTimeIncome 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtUnitTimeIncome; + + /// + /// txtUnitTimeIncomeRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnitTimeIncomeRemark; + + /// + /// txtBillionsOutputMortality 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtBillionsOutputMortality; + + /// + /// txtBillionsOutputMortalityRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtBillionsOutputMortalityRemark; + + /// + /// txtMajorFireAccident 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMajorFireAccident; + + /// + /// txtMajorFireAccidentRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMajorFireAccidentRemark; + + /// + /// txtMajorEquipAccident 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtMajorEquipAccident; + + /// + /// txtMajorEquipAccidentRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMajorEquipAccidentRemark; + + /// + /// txtAccidentFrequency 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAccidentFrequency; + + /// + /// txtAccidentFrequencyRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAccidentFrequencyRemark; + + /// + /// txtSeriousInjuryAccident 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtSeriousInjuryAccident; + + /// + /// txtSeriousInjuryAccidentRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSeriousInjuryAccidentRemark; + + /// + /// txtFireAccident 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtFireAccident; + + /// + /// txtFireAccidentRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFireAccidentRemark; + + /// + /// txtEquipmentAccident 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtEquipmentAccident; + + /// + /// txtEquipmentAccidentRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentAccidentRemark; + + /// + /// txtPoisoningAndInjuries 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtPoisoningAndInjuries; + + /// + /// txtPoisoningAndInjuriesRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPoisoningAndInjuriesRemark; + + /// + /// txtProductionSafetyInTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtProductionSafetyInTotal; + + /// + /// txtProductionSafetyInTotalRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProductionSafetyInTotalRemark; + + /// + /// txtProtectionInput 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtProtectionInput; + + /// + /// txtProtectionInputRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProtectionInputRemark; + + /// + /// txtLaboAndHealthIn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtLaboAndHealthIn; + + /// + /// txtLaboAndHealthInRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtLaboAndHealthInRemark; + + /// + /// txtTechnologyProgressIn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtTechnologyProgressIn; + + /// + /// txtTechnologyProgressInRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTechnologyProgressInRemark; + + /// + /// txtEducationTrainIn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtEducationTrainIn; + + /// + /// txtEducationTrainInRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEducationTrainInRemark; + + /// + /// txtProjectCostRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtProjectCostRate; + + /// + /// txtProjectCostRateRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectCostRateRemark; + + /// + /// txtProductionInput 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtProductionInput; + + /// + /// txtProductionInputRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProductionInputRemark; + + /// + /// txtRevenue 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtRevenue; + + /// + /// txtRevenueRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRevenueRemark; + + /// + /// txtFullTimeMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtFullTimeMan; + + /// + /// txtFullTimeManRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFullTimeManRemark; + + /// + /// txtPMMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtPMMan; + + /// + /// txtPMManRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPMManRemark; + + /// + /// txtCorporateDirectorEdu 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtCorporateDirectorEdu; + + /// + /// txtCorporateDirectorEduRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCorporateDirectorEduRemark; + + /// + /// txtProjectLeaderEdu 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtProjectLeaderEdu; + + /// + /// txtProjectLeaderEduRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectLeaderEduRemark; + + /// + /// txtFullTimeEdu 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtFullTimeEdu; + + /// + /// txtFullTimeEduRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtFullTimeEduRemark; + + /// + /// txtThreeKidsEduRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtThreeKidsEduRate; + + /// + /// txtThreeKidsEduRateRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtThreeKidsEduRateRemark; + + /// + /// txtUplinReportRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtUplinReportRate; + + /// + /// txtUplinReportRateRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUplinReportRateRemark; + + /// + /// txtKeyEquipmentTotal 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtKeyEquipmentTotal; + + /// + /// txtKeyEquipmentTotalRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtKeyEquipmentTotalRemark; + + /// + /// txtKeyEquipmentReportCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtKeyEquipmentReportCount; + + /// + /// txtKeyEquipmentReportCountRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtKeyEquipmentReportCountRemark; + + /// + /// txtChemicalAreaProjectCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtChemicalAreaProjectCount; + + /// + /// txtChemicalAreaProjectCountRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtChemicalAreaProjectCountRemark; + + /// + /// txtHarmfulMediumCoverCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtHarmfulMediumCoverCount; + + /// + /// txtHarmfulMediumCoverCountRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHarmfulMediumCoverCountRemark; + + /// + /// txtHarmfulMediumCoverRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtHarmfulMediumCoverRate; + + /// + /// txtHarmfulMediumCoverRateRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHarmfulMediumCoverRateRemark; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// fuFullTimeManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuFullTimeManAttachUrl; + + /// + /// lbFullTimeManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbFullTimeManAttachUrl; + + /// + /// btnUpFullTimeManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpFullTimeManAttachUrl; + + /// + /// btnDeleteFullTimeManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDeleteFullTimeManAttachUrl; + + /// + /// btnSeeFullTimeManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSeeFullTimeManAttachUrl; + + /// + /// fuPMManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuPMManAttachUrl; + + /// + /// lbPMManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbPMManAttachUrl; + + /// + /// btnUpPMManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpPMManAttachUrl; + + /// + /// btnDeletePMManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDeletePMManAttachUrl; + + /// + /// btnSeePMManAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSeePMManAttachUrl; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnCopy; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnUpdata 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnUpdata; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index e9946239..94b6f58a 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -605,6 +605,36 @@ namespace Model partial void InsertInApproveManager_GeneralEquipmentOutItem(InApproveManager_GeneralEquipmentOutItem instance); partial void UpdateInApproveManager_GeneralEquipmentOutItem(InApproveManager_GeneralEquipmentOutItem instance); partial void DeleteInApproveManager_GeneralEquipmentOutItem(InApproveManager_GeneralEquipmentOutItem instance); + partial void InsertInformation_AccidentCauseReport(Information_AccidentCauseReport instance); + partial void UpdateInformation_AccidentCauseReport(Information_AccidentCauseReport instance); + partial void DeleteInformation_AccidentCauseReport(Information_AccidentCauseReport instance); + partial void InsertInformation_AccidentCauseReportItem(Information_AccidentCauseReportItem instance); + partial void UpdateInformation_AccidentCauseReportItem(Information_AccidentCauseReportItem instance); + partial void DeleteInformation_AccidentCauseReportItem(Information_AccidentCauseReportItem instance); + partial void InsertInformation_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport instance); + partial void UpdateInformation_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport instance); + partial void DeleteInformation_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport instance); + partial void InsertInformation_DrillConductedQuarterlyReportItem(Information_DrillConductedQuarterlyReportItem instance); + partial void UpdateInformation_DrillConductedQuarterlyReportItem(Information_DrillConductedQuarterlyReportItem instance); + partial void DeleteInformation_DrillConductedQuarterlyReportItem(Information_DrillConductedQuarterlyReportItem instance); + partial void InsertInformation_DrillPlanHalfYearReport(Information_DrillPlanHalfYearReport instance); + partial void UpdateInformation_DrillPlanHalfYearReport(Information_DrillPlanHalfYearReport instance); + partial void DeleteInformation_DrillPlanHalfYearReport(Information_DrillPlanHalfYearReport instance); + partial void InsertInformation_DrillPlanHalfYearReportItem(Information_DrillPlanHalfYearReportItem instance); + partial void UpdateInformation_DrillPlanHalfYearReportItem(Information_DrillPlanHalfYearReportItem instance); + partial void DeleteInformation_DrillPlanHalfYearReportItem(Information_DrillPlanHalfYearReportItem instance); + partial void InsertInformation_MillionsMonthlyReport(Information_MillionsMonthlyReport instance); + partial void UpdateInformation_MillionsMonthlyReport(Information_MillionsMonthlyReport instance); + partial void DeleteInformation_MillionsMonthlyReport(Information_MillionsMonthlyReport instance); + partial void InsertInformation_MillionsMonthlyReportItem(Information_MillionsMonthlyReportItem instance); + partial void UpdateInformation_MillionsMonthlyReportItem(Information_MillionsMonthlyReportItem instance); + partial void DeleteInformation_MillionsMonthlyReportItem(Information_MillionsMonthlyReportItem instance); + partial void InsertInformation_SafetyQuarterlyReport(Information_SafetyQuarterlyReport instance); + partial void UpdateInformation_SafetyQuarterlyReport(Information_SafetyQuarterlyReport instance); + partial void DeleteInformation_SafetyQuarterlyReport(Information_SafetyQuarterlyReport instance); + partial void InsertInformation_UrgeReport(Information_UrgeReport instance); + partial void UpdateInformation_UrgeReport(Information_UrgeReport instance); + partial void DeleteInformation_UrgeReport(Information_UrgeReport instance); partial void InsertInformationProject_AccidentCauseReport(InformationProject_AccidentCauseReport instance); partial void UpdateInformationProject_AccidentCauseReport(InformationProject_AccidentCauseReport instance); partial void DeleteInformationProject_AccidentCauseReport(InformationProject_AccidentCauseReport instance); @@ -3024,6 +3054,86 @@ namespace Model } } + public System.Data.Linq.Table Information_AccidentCauseReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_AccidentCauseReportItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_DrillConductedQuarterlyReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_DrillConductedQuarterlyReportItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_DrillPlanHalfYearReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_DrillPlanHalfYearReportItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_MillionsMonthlyReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_MillionsMonthlyReportItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_SafetyQuarterlyReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Information_UrgeReport + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table InformationProject_AccidentCauseReport { get @@ -5232,6 +5342,22 @@ namespace Model } } + public System.Data.Linq.Table View_DataIn_AccidentCauseReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_DataIn_MillionsMonthlyReport + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_DayRportView { get @@ -5424,6 +5550,62 @@ namespace Model } } + public System.Data.Linq.Table View_Information_AccidentCauseReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_Information_DrillConductedQuarterlyReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_Information_DrillConductedQuarterlyReportItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_Information_DrillPlanHalfYearReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_Information_DrillPlanHalfYearReportItem + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_Information_MillionsMonthlyReport + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table View_Information_SafetyQuarterlyReport + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_InformationProject_ConstructionStandardIdentify { get @@ -26960,6 +27142,18 @@ namespace Model private EntitySet _InApproveManager_GeneralEquipmentOut; + private EntitySet _Information_AccidentCauseReport; + + private EntitySet _Information_DrillConductedQuarterlyReport; + + private EntitySet _Information_DrillPlanHalfYearReport; + + private EntitySet _Information_MillionsMonthlyReport; + + private EntitySet _Information_SafetyQuarterlyReport; + + private EntitySet _Information_UrgeReport; + private EntitySet _InformationProject_AccidentCauseReport; private EntitySet _InformationProject_DrillConductedQuarterlyReport; @@ -27159,6 +27353,12 @@ namespace Model this._InApproveManager_EquipmentQualityIn = new EntitySet(new Action(this.attach_InApproveManager_EquipmentQualityIn), new Action(this.detach_InApproveManager_EquipmentQualityIn)); this._InApproveManager_GeneralEquipmentIn = new EntitySet(new Action(this.attach_InApproveManager_GeneralEquipmentIn), new Action(this.detach_InApproveManager_GeneralEquipmentIn)); this._InApproveManager_GeneralEquipmentOut = new EntitySet(new Action(this.attach_InApproveManager_GeneralEquipmentOut), new Action(this.detach_InApproveManager_GeneralEquipmentOut)); + this._Information_AccidentCauseReport = new EntitySet(new Action(this.attach_Information_AccidentCauseReport), new Action(this.detach_Information_AccidentCauseReport)); + this._Information_DrillConductedQuarterlyReport = new EntitySet(new Action(this.attach_Information_DrillConductedQuarterlyReport), new Action(this.detach_Information_DrillConductedQuarterlyReport)); + this._Information_DrillPlanHalfYearReport = new EntitySet(new Action(this.attach_Information_DrillPlanHalfYearReport), new Action(this.detach_Information_DrillPlanHalfYearReport)); + this._Information_MillionsMonthlyReport = new EntitySet(new Action(this.attach_Information_MillionsMonthlyReport), new Action(this.detach_Information_MillionsMonthlyReport)); + this._Information_SafetyQuarterlyReport = new EntitySet(new Action(this.attach_Information_SafetyQuarterlyReport), new Action(this.detach_Information_SafetyQuarterlyReport)); + this._Information_UrgeReport = new EntitySet(new Action(this.attach_Information_UrgeReport), new Action(this.detach_Information_UrgeReport)); this._InformationProject_AccidentCauseReport = new EntitySet(new Action(this.attach_InformationProject_AccidentCauseReport), new Action(this.detach_InformationProject_AccidentCauseReport)); this._InformationProject_DrillConductedQuarterlyReport = new EntitySet(new Action(this.attach_InformationProject_DrillConductedQuarterlyReport), new Action(this.detach_InformationProject_DrillConductedQuarterlyReport)); this._InformationProject_DrillPlanHalfYearReport = new EntitySet(new Action(this.attach_InformationProject_DrillPlanHalfYearReport), new Action(this.detach_InformationProject_DrillPlanHalfYearReport)); @@ -28226,6 +28426,84 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_AccidentCauseReport_Base_Unit", Storage="_Information_AccidentCauseReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_AccidentCauseReport + { + get + { + return this._Information_AccidentCauseReport; + } + set + { + this._Information_AccidentCauseReport.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillConductedQuarterlyReport_Base_Unit", Storage="_Information_DrillConductedQuarterlyReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_DrillConductedQuarterlyReport + { + get + { + return this._Information_DrillConductedQuarterlyReport; + } + set + { + this._Information_DrillConductedQuarterlyReport.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillPlanHalfYearReport_Base_Unit", Storage="_Information_DrillPlanHalfYearReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_DrillPlanHalfYearReport + { + get + { + return this._Information_DrillPlanHalfYearReport; + } + set + { + this._Information_DrillPlanHalfYearReport.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_MillionsMonthlyReport_Base_Unit", Storage="_Information_MillionsMonthlyReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_MillionsMonthlyReport + { + get + { + return this._Information_MillionsMonthlyReport; + } + set + { + this._Information_MillionsMonthlyReport.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyQuarterlyReport_Base_Unit", Storage="_Information_SafetyQuarterlyReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_SafetyQuarterlyReport + { + get + { + return this._Information_SafetyQuarterlyReport; + } + set + { + this._Information_SafetyQuarterlyReport.Assign(value); + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_UrgeReport_Base_Unit", Storage="_Information_UrgeReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] + public EntitySet Information_UrgeReport + { + get + { + return this._Information_UrgeReport; + } + set + { + this._Information_UrgeReport.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_InformationProject_AccidentCauseReport_Base_Unit", Storage="_InformationProject_AccidentCauseReport", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")] public EntitySet InformationProject_AccidentCauseReport { @@ -29401,6 +29679,78 @@ namespace Model entity.Base_Unit = null; } + private void attach_Information_AccidentCauseReport(Information_AccidentCauseReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_AccidentCauseReport(Information_AccidentCauseReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_Information_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_DrillConductedQuarterlyReport(Information_DrillConductedQuarterlyReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_Information_DrillPlanHalfYearReport(Information_DrillPlanHalfYearReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_DrillPlanHalfYearReport(Information_DrillPlanHalfYearReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_Information_MillionsMonthlyReport(Information_MillionsMonthlyReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_MillionsMonthlyReport(Information_MillionsMonthlyReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_Information_SafetyQuarterlyReport(Information_SafetyQuarterlyReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_SafetyQuarterlyReport(Information_SafetyQuarterlyReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + + private void attach_Information_UrgeReport(Information_UrgeReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = this; + } + + private void detach_Information_UrgeReport(Information_UrgeReport entity) + { + this.SendPropertyChanging(); + entity.Base_Unit = null; + } + private void attach_InformationProject_AccidentCauseReport(InformationProject_AccidentCauseReport entity) { this.SendPropertyChanging(); @@ -72793,7 +73143,7 @@ namespace Model OnCreated(); } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] public string MaterialCode { get @@ -72897,7 +73247,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(3000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialDef", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string MaterialDef { get @@ -77281,7 +77631,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(15)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialCode", DbType="NVarChar(50)")] public string MaterialCode { get @@ -81629,7 +81979,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")] public string CanWelderCode { get @@ -91120,6 +91470,6934 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_AccidentCauseReport")] + public partial class Information_AccidentCauseReport : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _AccidentCauseReportId; + + private string _UnitId; + + private string _AccidentCauseReportCode; + + private System.Nullable _Year; + + private System.Nullable _Month; + + private System.Nullable _DeathAccident; + + private System.Nullable _DeathToll; + + private System.Nullable _InjuredAccident; + + private System.Nullable _InjuredToll; + + private System.Nullable _MinorWoundAccident; + + private System.Nullable _MinorWoundToll; + + private System.Nullable _AverageTotalHours; + + private System.Nullable _AverageManHours; + + private System.Nullable _TotalLossMan; + + private System.Nullable _LastMonthLossHoursTotal; + + private System.Nullable _KnockOffTotal; + + private System.Nullable _DirectLoss; + + private System.Nullable _IndirectLosses; + + private System.Nullable _TotalLoss; + + private System.Nullable _TotalLossTime; + + private string _FillCompanyPersonCharge; + + private string _TabPeople; + + private string _AuditPerson; + + private System.Nullable _FillingDate; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private EntityRef _Base_Unit; + + private EntitySet _Information_AccidentCauseReportItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnAccidentCauseReportIdChanging(string value); + partial void OnAccidentCauseReportIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnAccidentCauseReportCodeChanging(string value); + partial void OnAccidentCauseReportCodeChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnMonthChanging(System.Nullable value); + partial void OnMonthChanged(); + partial void OnDeathAccidentChanging(System.Nullable value); + partial void OnDeathAccidentChanged(); + partial void OnDeathTollChanging(System.Nullable value); + partial void OnDeathTollChanged(); + partial void OnInjuredAccidentChanging(System.Nullable value); + partial void OnInjuredAccidentChanged(); + partial void OnInjuredTollChanging(System.Nullable value); + partial void OnInjuredTollChanged(); + partial void OnMinorWoundAccidentChanging(System.Nullable value); + partial void OnMinorWoundAccidentChanged(); + partial void OnMinorWoundTollChanging(System.Nullable value); + partial void OnMinorWoundTollChanged(); + partial void OnAverageTotalHoursChanging(System.Nullable value); + partial void OnAverageTotalHoursChanged(); + partial void OnAverageManHoursChanging(System.Nullable value); + partial void OnAverageManHoursChanged(); + partial void OnTotalLossManChanging(System.Nullable value); + partial void OnTotalLossManChanged(); + partial void OnLastMonthLossHoursTotalChanging(System.Nullable value); + partial void OnLastMonthLossHoursTotalChanged(); + partial void OnKnockOffTotalChanging(System.Nullable value); + partial void OnKnockOffTotalChanged(); + partial void OnDirectLossChanging(System.Nullable value); + partial void OnDirectLossChanged(); + partial void OnIndirectLossesChanging(System.Nullable value); + partial void OnIndirectLossesChanged(); + partial void OnTotalLossChanging(System.Nullable value); + partial void OnTotalLossChanged(); + partial void OnTotalLossTimeChanging(System.Nullable value); + partial void OnTotalLossTimeChanged(); + partial void OnFillCompanyPersonChargeChanging(string value); + partial void OnFillCompanyPersonChargeChanged(); + partial void OnTabPeopleChanging(string value); + partial void OnTabPeopleChanged(); + partial void OnAuditPersonChanging(string value); + partial void OnAuditPersonChanged(); + partial void OnFillingDateChanging(System.Nullable value); + partial void OnFillingDateChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnHandleManChanging(string value); + partial void OnHandleManChanged(); + #endregion + + public Information_AccidentCauseReport() + { + this._Base_Unit = default(EntityRef); + this._Information_AccidentCauseReportItem = new EntitySet(new Action(this.attach_Information_AccidentCauseReportItem), new Action(this.detach_Information_AccidentCauseReportItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentCauseReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string AccidentCauseReportId + { + get + { + return this._AccidentCauseReportId; + } + set + { + if ((this._AccidentCauseReportId != value)) + { + this.OnAccidentCauseReportIdChanging(value); + this.SendPropertyChanging(); + this._AccidentCauseReportId = value; + this.SendPropertyChanged("AccidentCauseReportId"); + this.OnAccidentCauseReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentCauseReportCode", DbType="NVarChar(50)")] + public string AccidentCauseReportCode + { + get + { + return this._AccidentCauseReportCode; + } + set + { + if ((this._AccidentCauseReportCode != value)) + { + this.OnAccidentCauseReportCodeChanging(value); + this.SendPropertyChanging(); + this._AccidentCauseReportCode = value; + this.SendPropertyChanged("AccidentCauseReportCode"); + this.OnAccidentCauseReportCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")] + public System.Nullable Month + { + get + { + return this._Month; + } + set + { + if ((this._Month != value)) + { + this.OnMonthChanging(value); + this.SendPropertyChanging(); + this._Month = value; + this.SendPropertyChanged("Month"); + this.OnMonthChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathAccident", DbType="Int")] + public System.Nullable DeathAccident + { + get + { + return this._DeathAccident; + } + set + { + if ((this._DeathAccident != value)) + { + this.OnDeathAccidentChanging(value); + this.SendPropertyChanging(); + this._DeathAccident = value; + this.SendPropertyChanged("DeathAccident"); + this.OnDeathAccidentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathToll", DbType="Int")] + public System.Nullable DeathToll + { + get + { + return this._DeathToll; + } + set + { + if ((this._DeathToll != value)) + { + this.OnDeathTollChanging(value); + this.SendPropertyChanging(); + this._DeathToll = value; + this.SendPropertyChanged("DeathToll"); + this.OnDeathTollChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InjuredAccident", DbType="Int")] + public System.Nullable InjuredAccident + { + get + { + return this._InjuredAccident; + } + set + { + if ((this._InjuredAccident != value)) + { + this.OnInjuredAccidentChanging(value); + this.SendPropertyChanging(); + this._InjuredAccident = value; + this.SendPropertyChanged("InjuredAccident"); + this.OnInjuredAccidentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InjuredToll", DbType="Int")] + public System.Nullable InjuredToll + { + get + { + return this._InjuredToll; + } + set + { + if ((this._InjuredToll != value)) + { + this.OnInjuredTollChanging(value); + this.SendPropertyChanging(); + this._InjuredToll = value; + this.SendPropertyChanged("InjuredToll"); + this.OnInjuredTollChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorWoundAccident", DbType="Int")] + public System.Nullable MinorWoundAccident + { + get + { + return this._MinorWoundAccident; + } + set + { + if ((this._MinorWoundAccident != value)) + { + this.OnMinorWoundAccidentChanging(value); + this.SendPropertyChanging(); + this._MinorWoundAccident = value; + this.SendPropertyChanged("MinorWoundAccident"); + this.OnMinorWoundAccidentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorWoundToll", DbType="Int")] + public System.Nullable MinorWoundToll + { + get + { + return this._MinorWoundToll; + } + set + { + if ((this._MinorWoundToll != value)) + { + this.OnMinorWoundTollChanging(value); + this.SendPropertyChanging(); + this._MinorWoundToll = value; + this.SendPropertyChanged("MinorWoundToll"); + this.OnMinorWoundTollChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AverageTotalHours", DbType="Decimal(19,2)")] + public System.Nullable AverageTotalHours + { + get + { + return this._AverageTotalHours; + } + set + { + if ((this._AverageTotalHours != value)) + { + this.OnAverageTotalHoursChanging(value); + this.SendPropertyChanging(); + this._AverageTotalHours = value; + this.SendPropertyChanged("AverageTotalHours"); + this.OnAverageTotalHoursChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AverageManHours", DbType="Int")] + public System.Nullable AverageManHours + { + get + { + return this._AverageManHours; + } + set + { + if ((this._AverageManHours != value)) + { + this.OnAverageManHoursChanging(value); + this.SendPropertyChanging(); + this._AverageManHours = value; + this.SendPropertyChanged("AverageManHours"); + this.OnAverageManHoursChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLossMan", DbType="Int")] + public System.Nullable TotalLossMan + { + get + { + return this._TotalLossMan; + } + set + { + if ((this._TotalLossMan != value)) + { + this.OnTotalLossManChanging(value); + this.SendPropertyChanging(); + this._TotalLossMan = value; + this.SendPropertyChanged("TotalLossMan"); + this.OnTotalLossManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastMonthLossHoursTotal", DbType="Int")] + public System.Nullable LastMonthLossHoursTotal + { + get + { + return this._LastMonthLossHoursTotal; + } + set + { + if ((this._LastMonthLossHoursTotal != value)) + { + this.OnLastMonthLossHoursTotalChanging(value); + this.SendPropertyChanging(); + this._LastMonthLossHoursTotal = value; + this.SendPropertyChanged("LastMonthLossHoursTotal"); + this.OnLastMonthLossHoursTotalChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KnockOffTotal", DbType="Int")] + public System.Nullable KnockOffTotal + { + get + { + return this._KnockOffTotal; + } + set + { + if ((this._KnockOffTotal != value)) + { + this.OnKnockOffTotalChanging(value); + this.SendPropertyChanging(); + this._KnockOffTotal = value; + this.SendPropertyChanged("KnockOffTotal"); + this.OnKnockOffTotalChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DirectLoss", DbType="Int")] + public System.Nullable DirectLoss + { + get + { + return this._DirectLoss; + } + set + { + if ((this._DirectLoss != value)) + { + this.OnDirectLossChanging(value); + this.SendPropertyChanging(); + this._DirectLoss = value; + this.SendPropertyChanged("DirectLoss"); + this.OnDirectLossChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IndirectLosses", DbType="Int")] + public System.Nullable IndirectLosses + { + get + { + return this._IndirectLosses; + } + set + { + if ((this._IndirectLosses != value)) + { + this.OnIndirectLossesChanging(value); + this.SendPropertyChanging(); + this._IndirectLosses = value; + this.SendPropertyChanged("IndirectLosses"); + this.OnIndirectLossesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLoss", DbType="Int")] + public System.Nullable TotalLoss + { + get + { + return this._TotalLoss; + } + set + { + if ((this._TotalLoss != value)) + { + this.OnTotalLossChanging(value); + this.SendPropertyChanging(); + this._TotalLoss = value; + this.SendPropertyChanged("TotalLoss"); + this.OnTotalLossChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLossTime", DbType="Int")] + public System.Nullable TotalLossTime + { + get + { + return this._TotalLossTime; + } + set + { + if ((this._TotalLossTime != value)) + { + this.OnTotalLossTimeChanging(value); + this.SendPropertyChanging(); + this._TotalLossTime = value; + this.SendPropertyChanged("TotalLossTime"); + this.OnTotalLossTimeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillCompanyPersonCharge", DbType="NVarChar(50)")] + public string FillCompanyPersonCharge + { + get + { + return this._FillCompanyPersonCharge; + } + set + { + if ((this._FillCompanyPersonCharge != value)) + { + this.OnFillCompanyPersonChargeChanging(value); + this.SendPropertyChanging(); + this._FillCompanyPersonCharge = value; + this.SendPropertyChanged("FillCompanyPersonCharge"); + this.OnFillCompanyPersonChargeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TabPeople", DbType="NVarChar(50)")] + public string TabPeople + { + get + { + return this._TabPeople; + } + set + { + if ((this._TabPeople != value)) + { + this.OnTabPeopleChanging(value); + this.SendPropertyChanging(); + this._TabPeople = value; + this.SendPropertyChanged("TabPeople"); + this.OnTabPeopleChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditPerson", DbType="NVarChar(50)")] + public string AuditPerson + { + get + { + return this._AuditPerson; + } + set + { + if ((this._AuditPerson != value)) + { + this.OnAuditPersonChanging(value); + this.SendPropertyChanging(); + this._AuditPerson = value; + this.SendPropertyChanged("AuditPerson"); + this.OnAuditPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this.OnFillingDateChanging(value); + this.SendPropertyChanging(); + this._FillingDate = value; + this.SendPropertyChanged("FillingDate"); + this.OnFillingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this.OnHandleManChanging(value); + this.SendPropertyChanging(); + this._HandleMan = value; + this.SendPropertyChanged("HandleMan"); + this.OnHandleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_AccidentCauseReport_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.Information_AccidentCauseReport.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_AccidentCauseReport.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_AccidentCauseReportItem_Information_AccidentCauseReport", Storage="_Information_AccidentCauseReportItem", ThisKey="AccidentCauseReportId", OtherKey="AccidentCauseReportId", DeleteRule="NO ACTION")] + public EntitySet Information_AccidentCauseReportItem + { + get + { + return this._Information_AccidentCauseReportItem; + } + set + { + this._Information_AccidentCauseReportItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Information_AccidentCauseReportItem(Information_AccidentCauseReportItem entity) + { + this.SendPropertyChanging(); + entity.Information_AccidentCauseReport = this; + } + + private void detach_Information_AccidentCauseReportItem(Information_AccidentCauseReportItem entity) + { + this.SendPropertyChanging(); + entity.Information_AccidentCauseReport = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_AccidentCauseReportItem")] + public partial class Information_AccidentCauseReportItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _AccidentCauseReportItemId; + + private string _AccidentCauseReportId; + + private string _AccidentType; + + private System.Nullable _TotalDeath; + + private System.Nullable _TotalInjuries; + + private System.Nullable _TotalMinorInjuries; + + private System.Nullable _Death1; + + private System.Nullable _Injuries1; + + private System.Nullable _MinorInjuries1; + + private System.Nullable _Death2; + + private System.Nullable _Injuries2; + + private System.Nullable _MinorInjuries2; + + private System.Nullable _Death3; + + private System.Nullable _Injuries3; + + private System.Nullable _MinorInjuries3; + + private System.Nullable _Death4; + + private System.Nullable _Injuries4; + + private System.Nullable _MinorInjuries4; + + private System.Nullable _Death5; + + private System.Nullable _Injuries5; + + private System.Nullable _MinorInjuries5; + + private System.Nullable _Death6; + + private System.Nullable _Injuries6; + + private System.Nullable _MinorInjuries6; + + private System.Nullable _Death7; + + private System.Nullable _Injuries7; + + private System.Nullable _MinorInjuries7; + + private System.Nullable _Death8; + + private System.Nullable _Injuries8; + + private System.Nullable _MinorInjuries8; + + private System.Nullable _Death9; + + private System.Nullable _Injuries9; + + private System.Nullable _MinorInjuries9; + + private System.Nullable _Death10; + + private System.Nullable _Injuries10; + + private System.Nullable _MinorInjuries10; + + private System.Nullable _Death11; + + private System.Nullable _Injuries11; + + private System.Nullable _MinorInjuries11; + + private EntityRef _Information_AccidentCauseReport; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnAccidentCauseReportItemIdChanging(string value); + partial void OnAccidentCauseReportItemIdChanged(); + partial void OnAccidentCauseReportIdChanging(string value); + partial void OnAccidentCauseReportIdChanged(); + partial void OnAccidentTypeChanging(string value); + partial void OnAccidentTypeChanged(); + partial void OnTotalDeathChanging(System.Nullable value); + partial void OnTotalDeathChanged(); + partial void OnTotalInjuriesChanging(System.Nullable value); + partial void OnTotalInjuriesChanged(); + partial void OnTotalMinorInjuriesChanging(System.Nullable value); + partial void OnTotalMinorInjuriesChanged(); + partial void OnDeath1Changing(System.Nullable value); + partial void OnDeath1Changed(); + partial void OnInjuries1Changing(System.Nullable value); + partial void OnInjuries1Changed(); + partial void OnMinorInjuries1Changing(System.Nullable value); + partial void OnMinorInjuries1Changed(); + partial void OnDeath2Changing(System.Nullable value); + partial void OnDeath2Changed(); + partial void OnInjuries2Changing(System.Nullable value); + partial void OnInjuries2Changed(); + partial void OnMinorInjuries2Changing(System.Nullable value); + partial void OnMinorInjuries2Changed(); + partial void OnDeath3Changing(System.Nullable value); + partial void OnDeath3Changed(); + partial void OnInjuries3Changing(System.Nullable value); + partial void OnInjuries3Changed(); + partial void OnMinorInjuries3Changing(System.Nullable value); + partial void OnMinorInjuries3Changed(); + partial void OnDeath4Changing(System.Nullable value); + partial void OnDeath4Changed(); + partial void OnInjuries4Changing(System.Nullable value); + partial void OnInjuries4Changed(); + partial void OnMinorInjuries4Changing(System.Nullable value); + partial void OnMinorInjuries4Changed(); + partial void OnDeath5Changing(System.Nullable value); + partial void OnDeath5Changed(); + partial void OnInjuries5Changing(System.Nullable value); + partial void OnInjuries5Changed(); + partial void OnMinorInjuries5Changing(System.Nullable value); + partial void OnMinorInjuries5Changed(); + partial void OnDeath6Changing(System.Nullable value); + partial void OnDeath6Changed(); + partial void OnInjuries6Changing(System.Nullable value); + partial void OnInjuries6Changed(); + partial void OnMinorInjuries6Changing(System.Nullable value); + partial void OnMinorInjuries6Changed(); + partial void OnDeath7Changing(System.Nullable value); + partial void OnDeath7Changed(); + partial void OnInjuries7Changing(System.Nullable value); + partial void OnInjuries7Changed(); + partial void OnMinorInjuries7Changing(System.Nullable value); + partial void OnMinorInjuries7Changed(); + partial void OnDeath8Changing(System.Nullable value); + partial void OnDeath8Changed(); + partial void OnInjuries8Changing(System.Nullable value); + partial void OnInjuries8Changed(); + partial void OnMinorInjuries8Changing(System.Nullable value); + partial void OnMinorInjuries8Changed(); + partial void OnDeath9Changing(System.Nullable value); + partial void OnDeath9Changed(); + partial void OnInjuries9Changing(System.Nullable value); + partial void OnInjuries9Changed(); + partial void OnMinorInjuries9Changing(System.Nullable value); + partial void OnMinorInjuries9Changed(); + partial void OnDeath10Changing(System.Nullable value); + partial void OnDeath10Changed(); + partial void OnInjuries10Changing(System.Nullable value); + partial void OnInjuries10Changed(); + partial void OnMinorInjuries10Changing(System.Nullable value); + partial void OnMinorInjuries10Changed(); + partial void OnDeath11Changing(System.Nullable value); + partial void OnDeath11Changed(); + partial void OnInjuries11Changing(System.Nullable value); + partial void OnInjuries11Changed(); + partial void OnMinorInjuries11Changing(System.Nullable value); + partial void OnMinorInjuries11Changed(); + #endregion + + public Information_AccidentCauseReportItem() + { + this._Information_AccidentCauseReport = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentCauseReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string AccidentCauseReportItemId + { + get + { + return this._AccidentCauseReportItemId; + } + set + { + if ((this._AccidentCauseReportItemId != value)) + { + this.OnAccidentCauseReportItemIdChanging(value); + this.SendPropertyChanging(); + this._AccidentCauseReportItemId = value; + this.SendPropertyChanged("AccidentCauseReportItemId"); + this.OnAccidentCauseReportItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentCauseReportId", DbType="NVarChar(50)")] + public string AccidentCauseReportId + { + get + { + return this._AccidentCauseReportId; + } + set + { + if ((this._AccidentCauseReportId != value)) + { + if (this._Information_AccidentCauseReport.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnAccidentCauseReportIdChanging(value); + this.SendPropertyChanging(); + this._AccidentCauseReportId = value; + this.SendPropertyChanged("AccidentCauseReportId"); + this.OnAccidentCauseReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentType", DbType="NVarChar(20)")] + public string AccidentType + { + get + { + return this._AccidentType; + } + set + { + if ((this._AccidentType != value)) + { + this.OnAccidentTypeChanging(value); + this.SendPropertyChanging(); + this._AccidentType = value; + this.SendPropertyChanged("AccidentType"); + this.OnAccidentTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalDeath", DbType="Int")] + public System.Nullable TotalDeath + { + get + { + return this._TotalDeath; + } + set + { + if ((this._TotalDeath != value)) + { + this.OnTotalDeathChanging(value); + this.SendPropertyChanging(); + this._TotalDeath = value; + this.SendPropertyChanged("TotalDeath"); + this.OnTotalDeathChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalInjuries", DbType="Int")] + public System.Nullable TotalInjuries + { + get + { + return this._TotalInjuries; + } + set + { + if ((this._TotalInjuries != value)) + { + this.OnTotalInjuriesChanging(value); + this.SendPropertyChanging(); + this._TotalInjuries = value; + this.SendPropertyChanged("TotalInjuries"); + this.OnTotalInjuriesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalMinorInjuries", DbType="Int")] + public System.Nullable TotalMinorInjuries + { + get + { + return this._TotalMinorInjuries; + } + set + { + if ((this._TotalMinorInjuries != value)) + { + this.OnTotalMinorInjuriesChanging(value); + this.SendPropertyChanging(); + this._TotalMinorInjuries = value; + this.SendPropertyChanged("TotalMinorInjuries"); + this.OnTotalMinorInjuriesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death1", DbType="Int")] + public System.Nullable Death1 + { + get + { + return this._Death1; + } + set + { + if ((this._Death1 != value)) + { + this.OnDeath1Changing(value); + this.SendPropertyChanging(); + this._Death1 = value; + this.SendPropertyChanged("Death1"); + this.OnDeath1Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries1", DbType="Int")] + public System.Nullable Injuries1 + { + get + { + return this._Injuries1; + } + set + { + if ((this._Injuries1 != value)) + { + this.OnInjuries1Changing(value); + this.SendPropertyChanging(); + this._Injuries1 = value; + this.SendPropertyChanged("Injuries1"); + this.OnInjuries1Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries1", DbType="Int")] + public System.Nullable MinorInjuries1 + { + get + { + return this._MinorInjuries1; + } + set + { + if ((this._MinorInjuries1 != value)) + { + this.OnMinorInjuries1Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries1 = value; + this.SendPropertyChanged("MinorInjuries1"); + this.OnMinorInjuries1Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death2", DbType="Int")] + public System.Nullable Death2 + { + get + { + return this._Death2; + } + set + { + if ((this._Death2 != value)) + { + this.OnDeath2Changing(value); + this.SendPropertyChanging(); + this._Death2 = value; + this.SendPropertyChanged("Death2"); + this.OnDeath2Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries2", DbType="Int")] + public System.Nullable Injuries2 + { + get + { + return this._Injuries2; + } + set + { + if ((this._Injuries2 != value)) + { + this.OnInjuries2Changing(value); + this.SendPropertyChanging(); + this._Injuries2 = value; + this.SendPropertyChanged("Injuries2"); + this.OnInjuries2Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries2", DbType="Int")] + public System.Nullable MinorInjuries2 + { + get + { + return this._MinorInjuries2; + } + set + { + if ((this._MinorInjuries2 != value)) + { + this.OnMinorInjuries2Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries2 = value; + this.SendPropertyChanged("MinorInjuries2"); + this.OnMinorInjuries2Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death3", DbType="Int")] + public System.Nullable Death3 + { + get + { + return this._Death3; + } + set + { + if ((this._Death3 != value)) + { + this.OnDeath3Changing(value); + this.SendPropertyChanging(); + this._Death3 = value; + this.SendPropertyChanged("Death3"); + this.OnDeath3Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries3", DbType="Int")] + public System.Nullable Injuries3 + { + get + { + return this._Injuries3; + } + set + { + if ((this._Injuries3 != value)) + { + this.OnInjuries3Changing(value); + this.SendPropertyChanging(); + this._Injuries3 = value; + this.SendPropertyChanged("Injuries3"); + this.OnInjuries3Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries3", DbType="Int")] + public System.Nullable MinorInjuries3 + { + get + { + return this._MinorInjuries3; + } + set + { + if ((this._MinorInjuries3 != value)) + { + this.OnMinorInjuries3Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries3 = value; + this.SendPropertyChanged("MinorInjuries3"); + this.OnMinorInjuries3Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death4", DbType="Int")] + public System.Nullable Death4 + { + get + { + return this._Death4; + } + set + { + if ((this._Death4 != value)) + { + this.OnDeath4Changing(value); + this.SendPropertyChanging(); + this._Death4 = value; + this.SendPropertyChanged("Death4"); + this.OnDeath4Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries4", DbType="Int")] + public System.Nullable Injuries4 + { + get + { + return this._Injuries4; + } + set + { + if ((this._Injuries4 != value)) + { + this.OnInjuries4Changing(value); + this.SendPropertyChanging(); + this._Injuries4 = value; + this.SendPropertyChanged("Injuries4"); + this.OnInjuries4Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries4", DbType="Int")] + public System.Nullable MinorInjuries4 + { + get + { + return this._MinorInjuries4; + } + set + { + if ((this._MinorInjuries4 != value)) + { + this.OnMinorInjuries4Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries4 = value; + this.SendPropertyChanged("MinorInjuries4"); + this.OnMinorInjuries4Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death5", DbType="Int")] + public System.Nullable Death5 + { + get + { + return this._Death5; + } + set + { + if ((this._Death5 != value)) + { + this.OnDeath5Changing(value); + this.SendPropertyChanging(); + this._Death5 = value; + this.SendPropertyChanged("Death5"); + this.OnDeath5Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries5", DbType="Int")] + public System.Nullable Injuries5 + { + get + { + return this._Injuries5; + } + set + { + if ((this._Injuries5 != value)) + { + this.OnInjuries5Changing(value); + this.SendPropertyChanging(); + this._Injuries5 = value; + this.SendPropertyChanged("Injuries5"); + this.OnInjuries5Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries5", DbType="Int")] + public System.Nullable MinorInjuries5 + { + get + { + return this._MinorInjuries5; + } + set + { + if ((this._MinorInjuries5 != value)) + { + this.OnMinorInjuries5Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries5 = value; + this.SendPropertyChanged("MinorInjuries5"); + this.OnMinorInjuries5Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death6", DbType="Int")] + public System.Nullable Death6 + { + get + { + return this._Death6; + } + set + { + if ((this._Death6 != value)) + { + this.OnDeath6Changing(value); + this.SendPropertyChanging(); + this._Death6 = value; + this.SendPropertyChanged("Death6"); + this.OnDeath6Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries6", DbType="Int")] + public System.Nullable Injuries6 + { + get + { + return this._Injuries6; + } + set + { + if ((this._Injuries6 != value)) + { + this.OnInjuries6Changing(value); + this.SendPropertyChanging(); + this._Injuries6 = value; + this.SendPropertyChanged("Injuries6"); + this.OnInjuries6Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries6", DbType="Int")] + public System.Nullable MinorInjuries6 + { + get + { + return this._MinorInjuries6; + } + set + { + if ((this._MinorInjuries6 != value)) + { + this.OnMinorInjuries6Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries6 = value; + this.SendPropertyChanged("MinorInjuries6"); + this.OnMinorInjuries6Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death7", DbType="Int")] + public System.Nullable Death7 + { + get + { + return this._Death7; + } + set + { + if ((this._Death7 != value)) + { + this.OnDeath7Changing(value); + this.SendPropertyChanging(); + this._Death7 = value; + this.SendPropertyChanged("Death7"); + this.OnDeath7Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries7", DbType="Int")] + public System.Nullable Injuries7 + { + get + { + return this._Injuries7; + } + set + { + if ((this._Injuries7 != value)) + { + this.OnInjuries7Changing(value); + this.SendPropertyChanging(); + this._Injuries7 = value; + this.SendPropertyChanged("Injuries7"); + this.OnInjuries7Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries7", DbType="Int")] + public System.Nullable MinorInjuries7 + { + get + { + return this._MinorInjuries7; + } + set + { + if ((this._MinorInjuries7 != value)) + { + this.OnMinorInjuries7Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries7 = value; + this.SendPropertyChanged("MinorInjuries7"); + this.OnMinorInjuries7Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death8", DbType="Int")] + public System.Nullable Death8 + { + get + { + return this._Death8; + } + set + { + if ((this._Death8 != value)) + { + this.OnDeath8Changing(value); + this.SendPropertyChanging(); + this._Death8 = value; + this.SendPropertyChanged("Death8"); + this.OnDeath8Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries8", DbType="Int")] + public System.Nullable Injuries8 + { + get + { + return this._Injuries8; + } + set + { + if ((this._Injuries8 != value)) + { + this.OnInjuries8Changing(value); + this.SendPropertyChanging(); + this._Injuries8 = value; + this.SendPropertyChanged("Injuries8"); + this.OnInjuries8Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries8", DbType="Int")] + public System.Nullable MinorInjuries8 + { + get + { + return this._MinorInjuries8; + } + set + { + if ((this._MinorInjuries8 != value)) + { + this.OnMinorInjuries8Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries8 = value; + this.SendPropertyChanged("MinorInjuries8"); + this.OnMinorInjuries8Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death9", DbType="Int")] + public System.Nullable Death9 + { + get + { + return this._Death9; + } + set + { + if ((this._Death9 != value)) + { + this.OnDeath9Changing(value); + this.SendPropertyChanging(); + this._Death9 = value; + this.SendPropertyChanged("Death9"); + this.OnDeath9Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries9", DbType="Int")] + public System.Nullable Injuries9 + { + get + { + return this._Injuries9; + } + set + { + if ((this._Injuries9 != value)) + { + this.OnInjuries9Changing(value); + this.SendPropertyChanging(); + this._Injuries9 = value; + this.SendPropertyChanged("Injuries9"); + this.OnInjuries9Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries9", DbType="Int")] + public System.Nullable MinorInjuries9 + { + get + { + return this._MinorInjuries9; + } + set + { + if ((this._MinorInjuries9 != value)) + { + this.OnMinorInjuries9Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries9 = value; + this.SendPropertyChanged("MinorInjuries9"); + this.OnMinorInjuries9Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death10", DbType="Int")] + public System.Nullable Death10 + { + get + { + return this._Death10; + } + set + { + if ((this._Death10 != value)) + { + this.OnDeath10Changing(value); + this.SendPropertyChanging(); + this._Death10 = value; + this.SendPropertyChanged("Death10"); + this.OnDeath10Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries10", DbType="Int")] + public System.Nullable Injuries10 + { + get + { + return this._Injuries10; + } + set + { + if ((this._Injuries10 != value)) + { + this.OnInjuries10Changing(value); + this.SendPropertyChanging(); + this._Injuries10 = value; + this.SendPropertyChanged("Injuries10"); + this.OnInjuries10Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries10", DbType="Int")] + public System.Nullable MinorInjuries10 + { + get + { + return this._MinorInjuries10; + } + set + { + if ((this._MinorInjuries10 != value)) + { + this.OnMinorInjuries10Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries10 = value; + this.SendPropertyChanged("MinorInjuries10"); + this.OnMinorInjuries10Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death11", DbType="Int")] + public System.Nullable Death11 + { + get + { + return this._Death11; + } + set + { + if ((this._Death11 != value)) + { + this.OnDeath11Changing(value); + this.SendPropertyChanging(); + this._Death11 = value; + this.SendPropertyChanged("Death11"); + this.OnDeath11Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries11", DbType="Int")] + public System.Nullable Injuries11 + { + get + { + return this._Injuries11; + } + set + { + if ((this._Injuries11 != value)) + { + this.OnInjuries11Changing(value); + this.SendPropertyChanging(); + this._Injuries11 = value; + this.SendPropertyChanged("Injuries11"); + this.OnInjuries11Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries11", DbType="Int")] + public System.Nullable MinorInjuries11 + { + get + { + return this._MinorInjuries11; + } + set + { + if ((this._MinorInjuries11 != value)) + { + this.OnMinorInjuries11Changing(value); + this.SendPropertyChanging(); + this._MinorInjuries11 = value; + this.SendPropertyChanged("MinorInjuries11"); + this.OnMinorInjuries11Changed(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_AccidentCauseReportItem_Information_AccidentCauseReport", Storage="_Information_AccidentCauseReport", ThisKey="AccidentCauseReportId", OtherKey="AccidentCauseReportId", IsForeignKey=true)] + public Information_AccidentCauseReport Information_AccidentCauseReport + { + get + { + return this._Information_AccidentCauseReport.Entity; + } + set + { + Information_AccidentCauseReport previousValue = this._Information_AccidentCauseReport.Entity; + if (((previousValue != value) + || (this._Information_AccidentCauseReport.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Information_AccidentCauseReport.Entity = null; + previousValue.Information_AccidentCauseReportItem.Remove(this); + } + this._Information_AccidentCauseReport.Entity = value; + if ((value != null)) + { + value.Information_AccidentCauseReportItem.Add(this); + this._AccidentCauseReportId = value.AccidentCauseReportId; + } + else + { + this._AccidentCauseReportId = default(string); + } + this.SendPropertyChanged("Information_AccidentCauseReport"); + } + } + } + + 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.Information_DrillConductedQuarterlyReport")] + public partial class Information_DrillConductedQuarterlyReport : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DrillConductedQuarterlyReportId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _Quarter; + + private System.Nullable _YearId; + + private string _CompileMan; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private EntityRef _Base_Unit; + + private EntitySet _Information_DrillConductedQuarterlyReportItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDrillConductedQuarterlyReportIdChanging(string value); + partial void OnDrillConductedQuarterlyReportIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnReportDateChanging(System.Nullable value); + partial void OnReportDateChanged(); + partial void OnQuarterChanging(System.Nullable value); + partial void OnQuarterChanged(); + partial void OnYearIdChanging(System.Nullable value); + partial void OnYearIdChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnHandleManChanging(string value); + partial void OnHandleManChanged(); + #endregion + + public Information_DrillConductedQuarterlyReport() + { + this._Base_Unit = default(EntityRef); + this._Information_DrillConductedQuarterlyReportItem = new EntitySet(new Action(this.attach_Information_DrillConductedQuarterlyReportItem), new Action(this.detach_Information_DrillConductedQuarterlyReportItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillConductedQuarterlyReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DrillConductedQuarterlyReportId + { + get + { + return this._DrillConductedQuarterlyReportId; + } + set + { + if ((this._DrillConductedQuarterlyReportId != value)) + { + this.OnDrillConductedQuarterlyReportIdChanging(value); + this.SendPropertyChanging(); + this._DrillConductedQuarterlyReportId = value; + this.SendPropertyChanged("DrillConductedQuarterlyReportId"); + this.OnDrillConductedQuarterlyReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable 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="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this.OnQuarterChanging(value); + this.SendPropertyChanging(); + this._Quarter = value; + this.SendPropertyChanged("Quarter"); + this.OnQuarterChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this.OnYearIdChanging(value); + this.SendPropertyChanging(); + this._YearId = value; + this.SendPropertyChanged("YearId"); + this.OnYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this.OnHandleManChanging(value); + this.SendPropertyChanging(); + this._HandleMan = value; + this.SendPropertyChanged("HandleMan"); + this.OnHandleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillConductedQuarterlyReport_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.Information_DrillConductedQuarterlyReport.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_DrillConductedQuarterlyReport.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillConductedQuarterlyReportItem_Information_DrillConductedQuarte" + + "rlyReport", Storage="_Information_DrillConductedQuarterlyReportItem", ThisKey="DrillConductedQuarterlyReportId", OtherKey="DrillConductedQuarterlyReportId", DeleteRule="NO ACTION")] + public EntitySet Information_DrillConductedQuarterlyReportItem + { + get + { + return this._Information_DrillConductedQuarterlyReportItem; + } + set + { + this._Information_DrillConductedQuarterlyReportItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Information_DrillConductedQuarterlyReportItem(Information_DrillConductedQuarterlyReportItem entity) + { + this.SendPropertyChanging(); + entity.Information_DrillConductedQuarterlyReport = this; + } + + private void detach_Information_DrillConductedQuarterlyReportItem(Information_DrillConductedQuarterlyReportItem entity) + { + this.SendPropertyChanging(); + entity.Information_DrillConductedQuarterlyReport = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_DrillConductedQuarterlyReportItem")] + public partial class Information_DrillConductedQuarterlyReportItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DrillConductedQuarterlyReportItemId; + + private string _DrillConductedQuarterlyReportId; + + private string _IndustryType; + + private System.Nullable _TotalConductCount; + + private System.Nullable _TotalPeopleCount; + + private System.Nullable _TotalInvestment; + + private System.Nullable _HQConductCount; + + private System.Nullable _HQPeopleCount; + + private System.Nullable _HQInvestment; + + private System.Nullable _BasicConductCount; + + private System.Nullable _BasicPeopleCount; + + private System.Nullable _BasicInvestment; + + private System.Nullable _ComprehensivePractice; + + private System.Nullable _CPScene; + + private System.Nullable _CPDesktop; + + private System.Nullable _SpecialDrill; + + private System.Nullable _SDScene; + + private System.Nullable _SDDesktop; + + private System.Nullable _SortIndex; + + private EntityRef _Information_DrillConductedQuarterlyReport; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDrillConductedQuarterlyReportItemIdChanging(string value); + partial void OnDrillConductedQuarterlyReportItemIdChanged(); + partial void OnDrillConductedQuarterlyReportIdChanging(string value); + partial void OnDrillConductedQuarterlyReportIdChanged(); + partial void OnIndustryTypeChanging(string value); + partial void OnIndustryTypeChanged(); + partial void OnTotalConductCountChanging(System.Nullable value); + partial void OnTotalConductCountChanged(); + partial void OnTotalPeopleCountChanging(System.Nullable value); + partial void OnTotalPeopleCountChanged(); + partial void OnTotalInvestmentChanging(System.Nullable value); + partial void OnTotalInvestmentChanged(); + partial void OnHQConductCountChanging(System.Nullable value); + partial void OnHQConductCountChanged(); + partial void OnHQPeopleCountChanging(System.Nullable value); + partial void OnHQPeopleCountChanged(); + partial void OnHQInvestmentChanging(System.Nullable value); + partial void OnHQInvestmentChanged(); + partial void OnBasicConductCountChanging(System.Nullable value); + partial void OnBasicConductCountChanged(); + partial void OnBasicPeopleCountChanging(System.Nullable value); + partial void OnBasicPeopleCountChanged(); + partial void OnBasicInvestmentChanging(System.Nullable value); + partial void OnBasicInvestmentChanged(); + partial void OnComprehensivePracticeChanging(System.Nullable value); + partial void OnComprehensivePracticeChanged(); + partial void OnCPSceneChanging(System.Nullable value); + partial void OnCPSceneChanged(); + partial void OnCPDesktopChanging(System.Nullable value); + partial void OnCPDesktopChanged(); + partial void OnSpecialDrillChanging(System.Nullable value); + partial void OnSpecialDrillChanged(); + partial void OnSDSceneChanging(System.Nullable value); + partial void OnSDSceneChanged(); + partial void OnSDDesktopChanging(System.Nullable value); + partial void OnSDDesktopChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + #endregion + + public Information_DrillConductedQuarterlyReportItem() + { + this._Information_DrillConductedQuarterlyReport = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillConductedQuarterlyReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DrillConductedQuarterlyReportItemId + { + get + { + return this._DrillConductedQuarterlyReportItemId; + } + set + { + if ((this._DrillConductedQuarterlyReportItemId != value)) + { + this.OnDrillConductedQuarterlyReportItemIdChanging(value); + this.SendPropertyChanging(); + this._DrillConductedQuarterlyReportItemId = value; + this.SendPropertyChanged("DrillConductedQuarterlyReportItemId"); + this.OnDrillConductedQuarterlyReportItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillConductedQuarterlyReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DrillConductedQuarterlyReportId + { + get + { + return this._DrillConductedQuarterlyReportId; + } + set + { + if ((this._DrillConductedQuarterlyReportId != value)) + { + if (this._Information_DrillConductedQuarterlyReport.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnDrillConductedQuarterlyReportIdChanging(value); + this.SendPropertyChanging(); + this._DrillConductedQuarterlyReportId = value; + this.SendPropertyChanged("DrillConductedQuarterlyReportId"); + this.OnDrillConductedQuarterlyReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IndustryType", DbType="NVarChar(50)")] + public string IndustryType + { + get + { + return this._IndustryType; + } + set + { + if ((this._IndustryType != value)) + { + this.OnIndustryTypeChanging(value); + this.SendPropertyChanging(); + this._IndustryType = value; + this.SendPropertyChanged("IndustryType"); + this.OnIndustryTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalConductCount", DbType="Int")] + public System.Nullable TotalConductCount + { + get + { + return this._TotalConductCount; + } + set + { + if ((this._TotalConductCount != value)) + { + this.OnTotalConductCountChanging(value); + this.SendPropertyChanging(); + this._TotalConductCount = value; + this.SendPropertyChanged("TotalConductCount"); + this.OnTotalConductCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalPeopleCount", DbType="Int")] + public System.Nullable TotalPeopleCount + { + get + { + return this._TotalPeopleCount; + } + set + { + if ((this._TotalPeopleCount != value)) + { + this.OnTotalPeopleCountChanging(value); + this.SendPropertyChanging(); + this._TotalPeopleCount = value; + this.SendPropertyChanged("TotalPeopleCount"); + this.OnTotalPeopleCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalInvestment", DbType="Money")] + public System.Nullable TotalInvestment + { + get + { + return this._TotalInvestment; + } + set + { + if ((this._TotalInvestment != value)) + { + this.OnTotalInvestmentChanging(value); + this.SendPropertyChanging(); + this._TotalInvestment = value; + this.SendPropertyChanged("TotalInvestment"); + this.OnTotalInvestmentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HQConductCount", DbType="Int")] + public System.Nullable HQConductCount + { + get + { + return this._HQConductCount; + } + set + { + if ((this._HQConductCount != value)) + { + this.OnHQConductCountChanging(value); + this.SendPropertyChanging(); + this._HQConductCount = value; + this.SendPropertyChanged("HQConductCount"); + this.OnHQConductCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HQPeopleCount", DbType="Int")] + public System.Nullable HQPeopleCount + { + get + { + return this._HQPeopleCount; + } + set + { + if ((this._HQPeopleCount != value)) + { + this.OnHQPeopleCountChanging(value); + this.SendPropertyChanging(); + this._HQPeopleCount = value; + this.SendPropertyChanged("HQPeopleCount"); + this.OnHQPeopleCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HQInvestment", DbType="Money")] + public System.Nullable HQInvestment + { + get + { + return this._HQInvestment; + } + set + { + if ((this._HQInvestment != value)) + { + this.OnHQInvestmentChanging(value); + this.SendPropertyChanging(); + this._HQInvestment = value; + this.SendPropertyChanged("HQInvestment"); + this.OnHQInvestmentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BasicConductCount", DbType="Int")] + public System.Nullable BasicConductCount + { + get + { + return this._BasicConductCount; + } + set + { + if ((this._BasicConductCount != value)) + { + this.OnBasicConductCountChanging(value); + this.SendPropertyChanging(); + this._BasicConductCount = value; + this.SendPropertyChanged("BasicConductCount"); + this.OnBasicConductCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BasicPeopleCount", DbType="Int")] + public System.Nullable BasicPeopleCount + { + get + { + return this._BasicPeopleCount; + } + set + { + if ((this._BasicPeopleCount != value)) + { + this.OnBasicPeopleCountChanging(value); + this.SendPropertyChanging(); + this._BasicPeopleCount = value; + this.SendPropertyChanged("BasicPeopleCount"); + this.OnBasicPeopleCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BasicInvestment", DbType="Money")] + public System.Nullable BasicInvestment + { + get + { + return this._BasicInvestment; + } + set + { + if ((this._BasicInvestment != value)) + { + this.OnBasicInvestmentChanging(value); + this.SendPropertyChanging(); + this._BasicInvestment = value; + this.SendPropertyChanged("BasicInvestment"); + this.OnBasicInvestmentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComprehensivePractice", DbType="Int")] + public System.Nullable ComprehensivePractice + { + get + { + return this._ComprehensivePractice; + } + set + { + if ((this._ComprehensivePractice != value)) + { + this.OnComprehensivePracticeChanging(value); + this.SendPropertyChanging(); + this._ComprehensivePractice = value; + this.SendPropertyChanged("ComprehensivePractice"); + this.OnComprehensivePracticeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CPScene", DbType="Int")] + public System.Nullable CPScene + { + get + { + return this._CPScene; + } + set + { + if ((this._CPScene != value)) + { + this.OnCPSceneChanging(value); + this.SendPropertyChanging(); + this._CPScene = value; + this.SendPropertyChanged("CPScene"); + this.OnCPSceneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CPDesktop", DbType="Int")] + public System.Nullable CPDesktop + { + get + { + return this._CPDesktop; + } + set + { + if ((this._CPDesktop != value)) + { + this.OnCPDesktopChanging(value); + this.SendPropertyChanging(); + this._CPDesktop = value; + this.SendPropertyChanged("CPDesktop"); + this.OnCPDesktopChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialDrill", DbType="Int")] + public System.Nullable SpecialDrill + { + get + { + return this._SpecialDrill; + } + set + { + if ((this._SpecialDrill != value)) + { + this.OnSpecialDrillChanging(value); + this.SendPropertyChanging(); + this._SpecialDrill = value; + this.SendPropertyChanged("SpecialDrill"); + this.OnSpecialDrillChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SDScene", DbType="Int")] + public System.Nullable SDScene + { + get + { + return this._SDScene; + } + set + { + if ((this._SDScene != value)) + { + this.OnSDSceneChanging(value); + this.SendPropertyChanging(); + this._SDScene = value; + this.SendPropertyChanged("SDScene"); + this.OnSDSceneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SDDesktop", DbType="Int")] + public System.Nullable SDDesktop + { + get + { + return this._SDDesktop; + } + set + { + if ((this._SDDesktop != value)) + { + this.OnSDDesktopChanging(value); + this.SendPropertyChanging(); + this._SDDesktop = value; + this.SendPropertyChanged("SDDesktop"); + this.OnSDDesktopChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillConductedQuarterlyReportItem_Information_DrillConductedQuarte" + + "rlyReport", Storage="_Information_DrillConductedQuarterlyReport", ThisKey="DrillConductedQuarterlyReportId", OtherKey="DrillConductedQuarterlyReportId", IsForeignKey=true)] + public Information_DrillConductedQuarterlyReport Information_DrillConductedQuarterlyReport + { + get + { + return this._Information_DrillConductedQuarterlyReport.Entity; + } + set + { + Information_DrillConductedQuarterlyReport previousValue = this._Information_DrillConductedQuarterlyReport.Entity; + if (((previousValue != value) + || (this._Information_DrillConductedQuarterlyReport.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Information_DrillConductedQuarterlyReport.Entity = null; + previousValue.Information_DrillConductedQuarterlyReportItem.Remove(this); + } + this._Information_DrillConductedQuarterlyReport.Entity = value; + if ((value != null)) + { + value.Information_DrillConductedQuarterlyReportItem.Add(this); + this._DrillConductedQuarterlyReportId = value.DrillConductedQuarterlyReportId; + } + else + { + this._DrillConductedQuarterlyReportId = default(string); + } + this.SendPropertyChanged("Information_DrillConductedQuarterlyReport"); + } + } + } + + 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.Information_DrillPlanHalfYearReport")] + public partial class Information_DrillPlanHalfYearReport : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DrillPlanHalfYearReportId; + + private string _UnitId; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private System.Nullable _YearId; + + private System.Nullable _HalfYearId; + + private string _Telephone; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private EntityRef _Base_Unit; + + private EntitySet _Information_DrillPlanHalfYearReportItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDrillPlanHalfYearReportIdChanging(string value); + partial void OnDrillPlanHalfYearReportIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnYearIdChanging(System.Nullable value); + partial void OnYearIdChanged(); + partial void OnHalfYearIdChanging(System.Nullable value); + partial void OnHalfYearIdChanged(); + partial void OnTelephoneChanging(string value); + partial void OnTelephoneChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnHandleManChanging(string value); + partial void OnHandleManChanged(); + #endregion + + public Information_DrillPlanHalfYearReport() + { + this._Base_Unit = default(EntityRef); + this._Information_DrillPlanHalfYearReportItem = new EntitySet(new Action(this.attach_Information_DrillPlanHalfYearReportItem), new Action(this.detach_Information_DrillPlanHalfYearReportItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanHalfYearReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DrillPlanHalfYearReportId + { + get + { + return this._DrillPlanHalfYearReportId; + } + set + { + if ((this._DrillPlanHalfYearReportId != value)) + { + this.OnDrillPlanHalfYearReportIdChanging(value); + this.SendPropertyChanging(); + this._DrillPlanHalfYearReportId = value; + this.SendPropertyChanged("DrillPlanHalfYearReportId"); + this.OnDrillPlanHalfYearReportIdChanged(); + } + } + } + + [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="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + 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.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this.OnYearIdChanging(value); + this.SendPropertyChanging(); + this._YearId = value; + this.SendPropertyChanged("YearId"); + this.OnYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HalfYearId", DbType="Int")] + public System.Nullable HalfYearId + { + get + { + return this._HalfYearId; + } + set + { + if ((this._HalfYearId != value)) + { + this.OnHalfYearIdChanging(value); + this.SendPropertyChanging(); + this._HalfYearId = value; + this.SendPropertyChanged("HalfYearId"); + this.OnHalfYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Telephone", DbType="NVarChar(50)")] + public string Telephone + { + get + { + return this._Telephone; + } + set + { + if ((this._Telephone != value)) + { + this.OnTelephoneChanging(value); + this.SendPropertyChanging(); + this._Telephone = value; + this.SendPropertyChanged("Telephone"); + this.OnTelephoneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this.OnHandleManChanging(value); + this.SendPropertyChanging(); + this._HandleMan = value; + this.SendPropertyChanged("HandleMan"); + this.OnHandleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillPlanHalfYearReport_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.Information_DrillPlanHalfYearReport.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_DrillPlanHalfYearReport.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillPlanHalfYearReportItem_Information_DrillPlanHalfYearReport", Storage="_Information_DrillPlanHalfYearReportItem", ThisKey="DrillPlanHalfYearReportId", OtherKey="DrillPlanHalfYearReportId", DeleteRule="NO ACTION")] + public EntitySet Information_DrillPlanHalfYearReportItem + { + get + { + return this._Information_DrillPlanHalfYearReportItem; + } + set + { + this._Information_DrillPlanHalfYearReportItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Information_DrillPlanHalfYearReportItem(Information_DrillPlanHalfYearReportItem entity) + { + this.SendPropertyChanging(); + entity.Information_DrillPlanHalfYearReport = this; + } + + private void detach_Information_DrillPlanHalfYearReportItem(Information_DrillPlanHalfYearReportItem entity) + { + this.SendPropertyChanging(); + entity.Information_DrillPlanHalfYearReport = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_DrillPlanHalfYearReportItem")] + public partial class Information_DrillPlanHalfYearReportItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DrillPlanHalfYearReportItemId; + + private string _DrillPlanHalfYearReportId; + + private string _DrillPlanName; + + private string _OrganizationUnit; + + private string _DrillPlanDate; + + private string _AccidentScene; + + private string _ExerciseWay; + + private System.Nullable _SortIndex; + + private EntityRef _Information_DrillPlanHalfYearReport; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDrillPlanHalfYearReportItemIdChanging(string value); + partial void OnDrillPlanHalfYearReportItemIdChanged(); + partial void OnDrillPlanHalfYearReportIdChanging(string value); + partial void OnDrillPlanHalfYearReportIdChanged(); + partial void OnDrillPlanNameChanging(string value); + partial void OnDrillPlanNameChanged(); + partial void OnOrganizationUnitChanging(string value); + partial void OnOrganizationUnitChanged(); + partial void OnDrillPlanDateChanging(string value); + partial void OnDrillPlanDateChanged(); + partial void OnAccidentSceneChanging(string value); + partial void OnAccidentSceneChanged(); + partial void OnExerciseWayChanging(string value); + partial void OnExerciseWayChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + #endregion + + public Information_DrillPlanHalfYearReportItem() + { + this._Information_DrillPlanHalfYearReport = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanHalfYearReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DrillPlanHalfYearReportItemId + { + get + { + return this._DrillPlanHalfYearReportItemId; + } + set + { + if ((this._DrillPlanHalfYearReportItemId != value)) + { + this.OnDrillPlanHalfYearReportItemIdChanging(value); + this.SendPropertyChanging(); + this._DrillPlanHalfYearReportItemId = value; + this.SendPropertyChanged("DrillPlanHalfYearReportItemId"); + this.OnDrillPlanHalfYearReportItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanHalfYearReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DrillPlanHalfYearReportId + { + get + { + return this._DrillPlanHalfYearReportId; + } + set + { + if ((this._DrillPlanHalfYearReportId != value)) + { + if (this._Information_DrillPlanHalfYearReport.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnDrillPlanHalfYearReportIdChanging(value); + this.SendPropertyChanging(); + this._DrillPlanHalfYearReportId = value; + this.SendPropertyChanged("DrillPlanHalfYearReportId"); + this.OnDrillPlanHalfYearReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanName", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string DrillPlanName + { + get + { + return this._DrillPlanName; + } + set + { + if ((this._DrillPlanName != value)) + { + this.OnDrillPlanNameChanging(value); + this.SendPropertyChanging(); + this._DrillPlanName = value; + this.SendPropertyChanged("DrillPlanName"); + this.OnDrillPlanNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrganizationUnit", DbType="NVarChar(100)")] + public string OrganizationUnit + { + get + { + return this._OrganizationUnit; + } + set + { + if ((this._OrganizationUnit != value)) + { + this.OnOrganizationUnitChanging(value); + this.SendPropertyChanging(); + this._OrganizationUnit = value; + this.SendPropertyChanged("OrganizationUnit"); + this.OnOrganizationUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanDate", DbType="NVarChar(50)")] + public string DrillPlanDate + { + get + { + return this._DrillPlanDate; + } + set + { + if ((this._DrillPlanDate != value)) + { + this.OnDrillPlanDateChanging(value); + this.SendPropertyChanging(); + this._DrillPlanDate = value; + this.SendPropertyChanged("DrillPlanDate"); + this.OnDrillPlanDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentScene", DbType="NVarChar(1000)")] + public string AccidentScene + { + get + { + return this._AccidentScene; + } + set + { + if ((this._AccidentScene != value)) + { + this.OnAccidentSceneChanging(value); + this.SendPropertyChanging(); + this._AccidentScene = value; + this.SendPropertyChanged("AccidentScene"); + this.OnAccidentSceneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExerciseWay", DbType="NVarChar(50)")] + public string ExerciseWay + { + get + { + return this._ExerciseWay; + } + set + { + if ((this._ExerciseWay != value)) + { + this.OnExerciseWayChanging(value); + this.SendPropertyChanging(); + this._ExerciseWay = value; + this.SendPropertyChanged("ExerciseWay"); + this.OnExerciseWayChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_DrillPlanHalfYearReportItem_Information_DrillPlanHalfYearReport", Storage="_Information_DrillPlanHalfYearReport", ThisKey="DrillPlanHalfYearReportId", OtherKey="DrillPlanHalfYearReportId", IsForeignKey=true)] + public Information_DrillPlanHalfYearReport Information_DrillPlanHalfYearReport + { + get + { + return this._Information_DrillPlanHalfYearReport.Entity; + } + set + { + Information_DrillPlanHalfYearReport previousValue = this._Information_DrillPlanHalfYearReport.Entity; + if (((previousValue != value) + || (this._Information_DrillPlanHalfYearReport.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Information_DrillPlanHalfYearReport.Entity = null; + previousValue.Information_DrillPlanHalfYearReportItem.Remove(this); + } + this._Information_DrillPlanHalfYearReport.Entity = value; + if ((value != null)) + { + value.Information_DrillPlanHalfYearReportItem.Add(this); + this._DrillPlanHalfYearReportId = value.DrillPlanHalfYearReportId; + } + else + { + this._DrillPlanHalfYearReportId = default(string); + } + this.SendPropertyChanged("Information_DrillPlanHalfYearReport"); + } + } + } + + 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.Information_MillionsMonthlyReport")] + public partial class Information_MillionsMonthlyReport : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _MillionsMonthlyReportId; + + private string _UnitId; + + private System.Nullable _Year; + + private System.Nullable _Month; + + private string _FillingMan; + + private System.Nullable _FillingDate; + + private string _DutyPerson; + + private System.Nullable _RecordableIncidentRate; + + private System.Nullable _LostTimeRate; + + private System.Nullable _LostTimeInjuryRate; + + private System.Nullable _DeathAccidentFrequency; + + private System.Nullable _AccidentMortality; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private EntityRef _Base_Unit; + + private EntitySet _Information_MillionsMonthlyReportItem; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnMillionsMonthlyReportIdChanging(string value); + partial void OnMillionsMonthlyReportIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnYearChanging(System.Nullable value); + partial void OnYearChanged(); + partial void OnMonthChanging(System.Nullable value); + partial void OnMonthChanged(); + partial void OnFillingManChanging(string value); + partial void OnFillingManChanged(); + partial void OnFillingDateChanging(System.Nullable value); + partial void OnFillingDateChanged(); + partial void OnDutyPersonChanging(string value); + partial void OnDutyPersonChanged(); + partial void OnRecordableIncidentRateChanging(System.Nullable value); + partial void OnRecordableIncidentRateChanged(); + partial void OnLostTimeRateChanging(System.Nullable value); + partial void OnLostTimeRateChanged(); + partial void OnLostTimeInjuryRateChanging(System.Nullable value); + partial void OnLostTimeInjuryRateChanged(); + partial void OnDeathAccidentFrequencyChanging(System.Nullable value); + partial void OnDeathAccidentFrequencyChanged(); + partial void OnAccidentMortalityChanging(System.Nullable value); + partial void OnAccidentMortalityChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnHandleManChanging(string value); + partial void OnHandleManChanged(); + #endregion + + public Information_MillionsMonthlyReport() + { + this._Base_Unit = default(EntityRef); + this._Information_MillionsMonthlyReportItem = new EntitySet(new Action(this.attach_Information_MillionsMonthlyReportItem), new Action(this.detach_Information_MillionsMonthlyReportItem)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MillionsMonthlyReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string MillionsMonthlyReportId + { + get + { + return this._MillionsMonthlyReportId; + } + set + { + if ((this._MillionsMonthlyReportId != value)) + { + this.OnMillionsMonthlyReportIdChanging(value); + this.SendPropertyChanging(); + this._MillionsMonthlyReportId = value; + this.SendPropertyChanged("MillionsMonthlyReportId"); + this.OnMillionsMonthlyReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this.OnYearChanging(value); + this.SendPropertyChanging(); + this._Year = value; + this.SendPropertyChanged("Year"); + this.OnYearChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")] + public System.Nullable Month + { + get + { + return this._Month; + } + set + { + if ((this._Month != value)) + { + this.OnMonthChanging(value); + this.SendPropertyChanging(); + this._Month = value; + this.SendPropertyChanged("Month"); + this.OnMonthChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingMan", DbType="NVarChar(50)")] + public string FillingMan + { + get + { + return this._FillingMan; + } + set + { + if ((this._FillingMan != value)) + { + this.OnFillingManChanging(value); + this.SendPropertyChanging(); + this._FillingMan = value; + this.SendPropertyChanged("FillingMan"); + this.OnFillingManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this.OnFillingDateChanging(value); + this.SendPropertyChanging(); + this._FillingDate = value; + this.SendPropertyChanged("FillingDate"); + this.OnFillingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyPerson", DbType="NVarChar(50)")] + public string DutyPerson + { + get + { + return this._DutyPerson; + } + set + { + if ((this._DutyPerson != value)) + { + this.OnDutyPersonChanging(value); + this.SendPropertyChanging(); + this._DutyPerson = value; + this.SendPropertyChanged("DutyPerson"); + this.OnDutyPersonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordableIncidentRate", DbType="Decimal(18,4)")] + public System.Nullable RecordableIncidentRate + { + get + { + return this._RecordableIncidentRate; + } + set + { + if ((this._RecordableIncidentRate != value)) + { + this.OnRecordableIncidentRateChanging(value); + this.SendPropertyChanging(); + this._RecordableIncidentRate = value; + this.SendPropertyChanged("RecordableIncidentRate"); + this.OnRecordableIncidentRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LostTimeRate", DbType="Decimal(18,4)")] + public System.Nullable LostTimeRate + { + get + { + return this._LostTimeRate; + } + set + { + if ((this._LostTimeRate != value)) + { + this.OnLostTimeRateChanging(value); + this.SendPropertyChanging(); + this._LostTimeRate = value; + this.SendPropertyChanged("LostTimeRate"); + this.OnLostTimeRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LostTimeInjuryRate", DbType="Decimal(18,4)")] + public System.Nullable LostTimeInjuryRate + { + get + { + return this._LostTimeInjuryRate; + } + set + { + if ((this._LostTimeInjuryRate != value)) + { + this.OnLostTimeInjuryRateChanging(value); + this.SendPropertyChanging(); + this._LostTimeInjuryRate = value; + this.SendPropertyChanged("LostTimeInjuryRate"); + this.OnLostTimeInjuryRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathAccidentFrequency", DbType="Decimal(18,4)")] + public System.Nullable DeathAccidentFrequency + { + get + { + return this._DeathAccidentFrequency; + } + set + { + if ((this._DeathAccidentFrequency != value)) + { + this.OnDeathAccidentFrequencyChanging(value); + this.SendPropertyChanging(); + this._DeathAccidentFrequency = value; + this.SendPropertyChanged("DeathAccidentFrequency"); + this.OnDeathAccidentFrequencyChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentMortality", DbType="Decimal(18,4)")] + public System.Nullable AccidentMortality + { + get + { + return this._AccidentMortality; + } + set + { + if ((this._AccidentMortality != value)) + { + this.OnAccidentMortalityChanging(value); + this.SendPropertyChanging(); + this._AccidentMortality = value; + this.SendPropertyChanged("AccidentMortality"); + this.OnAccidentMortalityChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this.OnHandleManChanging(value); + this.SendPropertyChanging(); + this._HandleMan = value; + this.SendPropertyChanged("HandleMan"); + this.OnHandleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_MillionsMonthlyReport_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.Information_MillionsMonthlyReport.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_MillionsMonthlyReport.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_MillionsMonthlyReportItem_Information_MillionsMonthlyReport", Storage="_Information_MillionsMonthlyReportItem", ThisKey="MillionsMonthlyReportId", OtherKey="MillionsMonthlyReportId", DeleteRule="NO ACTION")] + public EntitySet Information_MillionsMonthlyReportItem + { + get + { + return this._Information_MillionsMonthlyReportItem; + } + set + { + this._Information_MillionsMonthlyReportItem.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Information_MillionsMonthlyReportItem(Information_MillionsMonthlyReportItem entity) + { + this.SendPropertyChanging(); + entity.Information_MillionsMonthlyReport = this; + } + + private void detach_Information_MillionsMonthlyReportItem(Information_MillionsMonthlyReportItem entity) + { + this.SendPropertyChanging(); + entity.Information_MillionsMonthlyReport = null; + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Information_MillionsMonthlyReportItem")] + public partial class Information_MillionsMonthlyReportItem : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _MillionsMonthlyReportItemId; + + private string _MillionsMonthlyReportId; + + private System.Nullable _SortIndex; + + private string _Affiliation; + + private string _Name; + + private System.Nullable _PostPersonNum; + + private System.Nullable _SnapPersonNum; + + private System.Nullable _ContractorNum; + + private System.Nullable _SumPersonNum; + + private System.Nullable _TotalWorkNum; + + private System.Nullable _SeriousInjuriesNum; + + private System.Nullable _SeriousInjuriesPersonNum; + + private System.Nullable _SeriousInjuriesLossHour; + + private System.Nullable _MinorAccidentNum; + + private System.Nullable _MinorAccidentPersonNum; + + private System.Nullable _MinorAccidentLossHour; + + private System.Nullable _OtherAccidentNum; + + private System.Nullable _OtherAccidentPersonNum; + + private System.Nullable _OtherAccidentLossHour; + + private System.Nullable _RestrictedWorkPersonNum; + + private System.Nullable _RestrictedWorkLossHour; + + private System.Nullable _MedicalTreatmentPersonNum; + + private System.Nullable _MedicalTreatmentLossHour; + + private System.Nullable _FireNum; + + private System.Nullable _ExplosionNum; + + private System.Nullable _TrafficNum; + + private System.Nullable _EquipmentNum; + + private System.Nullable _QualityNum; + + private System.Nullable _OtherNum; + + private System.Nullable _FirstAidDressingsNum; + + private System.Nullable _AttemptedEventNum; + + private System.Nullable _LossDayNum; + + private EntityRef _Information_MillionsMonthlyReport; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnMillionsMonthlyReportItemIdChanging(string value); + partial void OnMillionsMonthlyReportItemIdChanged(); + partial void OnMillionsMonthlyReportIdChanging(string value); + partial void OnMillionsMonthlyReportIdChanged(); + partial void OnSortIndexChanging(System.Nullable value); + partial void OnSortIndexChanged(); + partial void OnAffiliationChanging(string value); + partial void OnAffiliationChanged(); + partial void OnNameChanging(string value); + partial void OnNameChanged(); + partial void OnPostPersonNumChanging(System.Nullable value); + partial void OnPostPersonNumChanged(); + partial void OnSnapPersonNumChanging(System.Nullable value); + partial void OnSnapPersonNumChanged(); + partial void OnContractorNumChanging(System.Nullable value); + partial void OnContractorNumChanged(); + partial void OnSumPersonNumChanging(System.Nullable value); + partial void OnSumPersonNumChanged(); + partial void OnTotalWorkNumChanging(System.Nullable value); + partial void OnTotalWorkNumChanged(); + partial void OnSeriousInjuriesNumChanging(System.Nullable value); + partial void OnSeriousInjuriesNumChanged(); + partial void OnSeriousInjuriesPersonNumChanging(System.Nullable value); + partial void OnSeriousInjuriesPersonNumChanged(); + partial void OnSeriousInjuriesLossHourChanging(System.Nullable value); + partial void OnSeriousInjuriesLossHourChanged(); + partial void OnMinorAccidentNumChanging(System.Nullable value); + partial void OnMinorAccidentNumChanged(); + partial void OnMinorAccidentPersonNumChanging(System.Nullable value); + partial void OnMinorAccidentPersonNumChanged(); + partial void OnMinorAccidentLossHourChanging(System.Nullable value); + partial void OnMinorAccidentLossHourChanged(); + partial void OnOtherAccidentNumChanging(System.Nullable value); + partial void OnOtherAccidentNumChanged(); + partial void OnOtherAccidentPersonNumChanging(System.Nullable value); + partial void OnOtherAccidentPersonNumChanged(); + partial void OnOtherAccidentLossHourChanging(System.Nullable value); + partial void OnOtherAccidentLossHourChanged(); + partial void OnRestrictedWorkPersonNumChanging(System.Nullable value); + partial void OnRestrictedWorkPersonNumChanged(); + partial void OnRestrictedWorkLossHourChanging(System.Nullable value); + partial void OnRestrictedWorkLossHourChanged(); + partial void OnMedicalTreatmentPersonNumChanging(System.Nullable value); + partial void OnMedicalTreatmentPersonNumChanged(); + partial void OnMedicalTreatmentLossHourChanging(System.Nullable value); + partial void OnMedicalTreatmentLossHourChanged(); + partial void OnFireNumChanging(System.Nullable value); + partial void OnFireNumChanged(); + partial void OnExplosionNumChanging(System.Nullable value); + partial void OnExplosionNumChanged(); + partial void OnTrafficNumChanging(System.Nullable value); + partial void OnTrafficNumChanged(); + partial void OnEquipmentNumChanging(System.Nullable value); + partial void OnEquipmentNumChanged(); + partial void OnQualityNumChanging(System.Nullable value); + partial void OnQualityNumChanged(); + partial void OnOtherNumChanging(System.Nullable value); + partial void OnOtherNumChanged(); + partial void OnFirstAidDressingsNumChanging(System.Nullable value); + partial void OnFirstAidDressingsNumChanged(); + partial void OnAttemptedEventNumChanging(System.Nullable value); + partial void OnAttemptedEventNumChanged(); + partial void OnLossDayNumChanging(System.Nullable value); + partial void OnLossDayNumChanged(); + #endregion + + public Information_MillionsMonthlyReportItem() + { + this._Information_MillionsMonthlyReport = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MillionsMonthlyReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string MillionsMonthlyReportItemId + { + get + { + return this._MillionsMonthlyReportItemId; + } + set + { + if ((this._MillionsMonthlyReportItemId != value)) + { + this.OnMillionsMonthlyReportItemIdChanging(value); + this.SendPropertyChanging(); + this._MillionsMonthlyReportItemId = value; + this.SendPropertyChanged("MillionsMonthlyReportItemId"); + this.OnMillionsMonthlyReportItemIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MillionsMonthlyReportId", DbType="NVarChar(50)")] + public string MillionsMonthlyReportId + { + get + { + return this._MillionsMonthlyReportId; + } + set + { + if ((this._MillionsMonthlyReportId != value)) + { + if (this._Information_MillionsMonthlyReport.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnMillionsMonthlyReportIdChanging(value); + this.SendPropertyChanging(); + this._MillionsMonthlyReportId = value; + this.SendPropertyChanged("MillionsMonthlyReportId"); + this.OnMillionsMonthlyReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this.OnSortIndexChanging(value); + this.SendPropertyChanging(); + this._SortIndex = value; + this.SendPropertyChanged("SortIndex"); + this.OnSortIndexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Affiliation", DbType="NVarChar(500)")] + public string Affiliation + { + get + { + return this._Affiliation; + } + set + { + if ((this._Affiliation != value)) + { + this.OnAffiliationChanging(value); + this.SendPropertyChanging(); + this._Affiliation = value; + this.SendPropertyChanged("Affiliation"); + this.OnAffiliationChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(500)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this.OnNameChanging(value); + this.SendPropertyChanging(); + this._Name = value; + this.SendPropertyChanged("Name"); + this.OnNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostPersonNum", DbType="Int")] + public System.Nullable PostPersonNum + { + get + { + return this._PostPersonNum; + } + set + { + if ((this._PostPersonNum != value)) + { + this.OnPostPersonNumChanging(value); + this.SendPropertyChanging(); + this._PostPersonNum = value; + this.SendPropertyChanged("PostPersonNum"); + this.OnPostPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SnapPersonNum", DbType="Int")] + public System.Nullable SnapPersonNum + { + get + { + return this._SnapPersonNum; + } + set + { + if ((this._SnapPersonNum != value)) + { + this.OnSnapPersonNumChanging(value); + this.SendPropertyChanging(); + this._SnapPersonNum = value; + this.SendPropertyChanged("SnapPersonNum"); + this.OnSnapPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorNum", DbType="Int")] + public System.Nullable ContractorNum + { + get + { + return this._ContractorNum; + } + set + { + if ((this._ContractorNum != value)) + { + this.OnContractorNumChanging(value); + this.SendPropertyChanging(); + this._ContractorNum = value; + this.SendPropertyChanged("ContractorNum"); + this.OnContractorNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SumPersonNum", DbType="Int")] + public System.Nullable SumPersonNum + { + get + { + return this._SumPersonNum; + } + set + { + if ((this._SumPersonNum != value)) + { + this.OnSumPersonNumChanging(value); + this.SendPropertyChanging(); + this._SumPersonNum = value; + this.SendPropertyChanged("SumPersonNum"); + this.OnSumPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalWorkNum", DbType="Decimal(18,4)")] + public System.Nullable TotalWorkNum + { + get + { + return this._TotalWorkNum; + } + set + { + if ((this._TotalWorkNum != value)) + { + this.OnTotalWorkNumChanging(value); + this.SendPropertyChanging(); + this._TotalWorkNum = value; + this.SendPropertyChanged("TotalWorkNum"); + this.OnTotalWorkNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuriesNum", DbType="Int")] + public System.Nullable SeriousInjuriesNum + { + get + { + return this._SeriousInjuriesNum; + } + set + { + if ((this._SeriousInjuriesNum != value)) + { + this.OnSeriousInjuriesNumChanging(value); + this.SendPropertyChanging(); + this._SeriousInjuriesNum = value; + this.SendPropertyChanged("SeriousInjuriesNum"); + this.OnSeriousInjuriesNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuriesPersonNum", DbType="Int")] + public System.Nullable SeriousInjuriesPersonNum + { + get + { + return this._SeriousInjuriesPersonNum; + } + set + { + if ((this._SeriousInjuriesPersonNum != value)) + { + this.OnSeriousInjuriesPersonNumChanging(value); + this.SendPropertyChanging(); + this._SeriousInjuriesPersonNum = value; + this.SendPropertyChanged("SeriousInjuriesPersonNum"); + this.OnSeriousInjuriesPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuriesLossHour", DbType="Int")] + public System.Nullable SeriousInjuriesLossHour + { + get + { + return this._SeriousInjuriesLossHour; + } + set + { + if ((this._SeriousInjuriesLossHour != value)) + { + this.OnSeriousInjuriesLossHourChanging(value); + this.SendPropertyChanging(); + this._SeriousInjuriesLossHour = value; + this.SendPropertyChanged("SeriousInjuriesLossHour"); + this.OnSeriousInjuriesLossHourChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorAccidentNum", DbType="Int")] + public System.Nullable MinorAccidentNum + { + get + { + return this._MinorAccidentNum; + } + set + { + if ((this._MinorAccidentNum != value)) + { + this.OnMinorAccidentNumChanging(value); + this.SendPropertyChanging(); + this._MinorAccidentNum = value; + this.SendPropertyChanged("MinorAccidentNum"); + this.OnMinorAccidentNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorAccidentPersonNum", DbType="Int")] + public System.Nullable MinorAccidentPersonNum + { + get + { + return this._MinorAccidentPersonNum; + } + set + { + if ((this._MinorAccidentPersonNum != value)) + { + this.OnMinorAccidentPersonNumChanging(value); + this.SendPropertyChanging(); + this._MinorAccidentPersonNum = value; + this.SendPropertyChanged("MinorAccidentPersonNum"); + this.OnMinorAccidentPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorAccidentLossHour", DbType="Int")] + public System.Nullable MinorAccidentLossHour + { + get + { + return this._MinorAccidentLossHour; + } + set + { + if ((this._MinorAccidentLossHour != value)) + { + this.OnMinorAccidentLossHourChanging(value); + this.SendPropertyChanging(); + this._MinorAccidentLossHour = value; + this.SendPropertyChanged("MinorAccidentLossHour"); + this.OnMinorAccidentLossHourChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherAccidentNum", DbType="Int")] + public System.Nullable OtherAccidentNum + { + get + { + return this._OtherAccidentNum; + } + set + { + if ((this._OtherAccidentNum != value)) + { + this.OnOtherAccidentNumChanging(value); + this.SendPropertyChanging(); + this._OtherAccidentNum = value; + this.SendPropertyChanged("OtherAccidentNum"); + this.OnOtherAccidentNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherAccidentPersonNum", DbType="Int")] + public System.Nullable OtherAccidentPersonNum + { + get + { + return this._OtherAccidentPersonNum; + } + set + { + if ((this._OtherAccidentPersonNum != value)) + { + this.OnOtherAccidentPersonNumChanging(value); + this.SendPropertyChanging(); + this._OtherAccidentPersonNum = value; + this.SendPropertyChanged("OtherAccidentPersonNum"); + this.OnOtherAccidentPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherAccidentLossHour", DbType="Int")] + public System.Nullable OtherAccidentLossHour + { + get + { + return this._OtherAccidentLossHour; + } + set + { + if ((this._OtherAccidentLossHour != value)) + { + this.OnOtherAccidentLossHourChanging(value); + this.SendPropertyChanging(); + this._OtherAccidentLossHour = value; + this.SendPropertyChanged("OtherAccidentLossHour"); + this.OnOtherAccidentLossHourChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RestrictedWorkPersonNum", DbType="Int")] + public System.Nullable RestrictedWorkPersonNum + { + get + { + return this._RestrictedWorkPersonNum; + } + set + { + if ((this._RestrictedWorkPersonNum != value)) + { + this.OnRestrictedWorkPersonNumChanging(value); + this.SendPropertyChanging(); + this._RestrictedWorkPersonNum = value; + this.SendPropertyChanged("RestrictedWorkPersonNum"); + this.OnRestrictedWorkPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RestrictedWorkLossHour", DbType="Int")] + public System.Nullable RestrictedWorkLossHour + { + get + { + return this._RestrictedWorkLossHour; + } + set + { + if ((this._RestrictedWorkLossHour != value)) + { + this.OnRestrictedWorkLossHourChanging(value); + this.SendPropertyChanging(); + this._RestrictedWorkLossHour = value; + this.SendPropertyChanged("RestrictedWorkLossHour"); + this.OnRestrictedWorkLossHourChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MedicalTreatmentPersonNum", DbType="Int")] + public System.Nullable MedicalTreatmentPersonNum + { + get + { + return this._MedicalTreatmentPersonNum; + } + set + { + if ((this._MedicalTreatmentPersonNum != value)) + { + this.OnMedicalTreatmentPersonNumChanging(value); + this.SendPropertyChanging(); + this._MedicalTreatmentPersonNum = value; + this.SendPropertyChanged("MedicalTreatmentPersonNum"); + this.OnMedicalTreatmentPersonNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MedicalTreatmentLossHour", DbType="Int")] + public System.Nullable MedicalTreatmentLossHour + { + get + { + return this._MedicalTreatmentLossHour; + } + set + { + if ((this._MedicalTreatmentLossHour != value)) + { + this.OnMedicalTreatmentLossHourChanging(value); + this.SendPropertyChanging(); + this._MedicalTreatmentLossHour = value; + this.SendPropertyChanged("MedicalTreatmentLossHour"); + this.OnMedicalTreatmentLossHourChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireNum", DbType="Int")] + public System.Nullable FireNum + { + get + { + return this._FireNum; + } + set + { + if ((this._FireNum != value)) + { + this.OnFireNumChanging(value); + this.SendPropertyChanging(); + this._FireNum = value; + this.SendPropertyChanged("FireNum"); + this.OnFireNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExplosionNum", DbType="Int")] + public System.Nullable ExplosionNum + { + get + { + return this._ExplosionNum; + } + set + { + if ((this._ExplosionNum != value)) + { + this.OnExplosionNumChanging(value); + this.SendPropertyChanging(); + this._ExplosionNum = value; + this.SendPropertyChanged("ExplosionNum"); + this.OnExplosionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrafficNum", DbType="Int")] + public System.Nullable TrafficNum + { + get + { + return this._TrafficNum; + } + set + { + if ((this._TrafficNum != value)) + { + this.OnTrafficNumChanging(value); + this.SendPropertyChanging(); + this._TrafficNum = value; + this.SendPropertyChanged("TrafficNum"); + this.OnTrafficNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentNum", DbType="Int")] + public System.Nullable EquipmentNum + { + get + { + return this._EquipmentNum; + } + set + { + if ((this._EquipmentNum != value)) + { + this.OnEquipmentNumChanging(value); + this.SendPropertyChanging(); + this._EquipmentNum = value; + this.SendPropertyChanged("EquipmentNum"); + this.OnEquipmentNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityNum", DbType="Int")] + public System.Nullable QualityNum + { + get + { + return this._QualityNum; + } + set + { + if ((this._QualityNum != value)) + { + this.OnQualityNumChanging(value); + this.SendPropertyChanging(); + this._QualityNum = value; + this.SendPropertyChanged("QualityNum"); + this.OnQualityNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherNum", DbType="Int")] + public System.Nullable OtherNum + { + get + { + return this._OtherNum; + } + set + { + if ((this._OtherNum != value)) + { + this.OnOtherNumChanging(value); + this.SendPropertyChanging(); + this._OtherNum = value; + this.SendPropertyChanged("OtherNum"); + this.OnOtherNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FirstAidDressingsNum", DbType="Int")] + public System.Nullable FirstAidDressingsNum + { + get + { + return this._FirstAidDressingsNum; + } + set + { + if ((this._FirstAidDressingsNum != value)) + { + this.OnFirstAidDressingsNumChanging(value); + this.SendPropertyChanging(); + this._FirstAidDressingsNum = value; + this.SendPropertyChanged("FirstAidDressingsNum"); + this.OnFirstAidDressingsNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttemptedEventNum", DbType="Int")] + public System.Nullable AttemptedEventNum + { + get + { + return this._AttemptedEventNum; + } + set + { + if ((this._AttemptedEventNum != value)) + { + this.OnAttemptedEventNumChanging(value); + this.SendPropertyChanging(); + this._AttemptedEventNum = value; + this.SendPropertyChanged("AttemptedEventNum"); + this.OnAttemptedEventNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LossDayNum", DbType="Int")] + public System.Nullable LossDayNum + { + get + { + return this._LossDayNum; + } + set + { + if ((this._LossDayNum != value)) + { + this.OnLossDayNumChanging(value); + this.SendPropertyChanging(); + this._LossDayNum = value; + this.SendPropertyChanged("LossDayNum"); + this.OnLossDayNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_MillionsMonthlyReportItem_Information_MillionsMonthlyReport", Storage="_Information_MillionsMonthlyReport", ThisKey="MillionsMonthlyReportId", OtherKey="MillionsMonthlyReportId", IsForeignKey=true)] + public Information_MillionsMonthlyReport Information_MillionsMonthlyReport + { + get + { + return this._Information_MillionsMonthlyReport.Entity; + } + set + { + Information_MillionsMonthlyReport previousValue = this._Information_MillionsMonthlyReport.Entity; + if (((previousValue != value) + || (this._Information_MillionsMonthlyReport.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Information_MillionsMonthlyReport.Entity = null; + previousValue.Information_MillionsMonthlyReportItem.Remove(this); + } + this._Information_MillionsMonthlyReport.Entity = value; + if ((value != null)) + { + value.Information_MillionsMonthlyReportItem.Add(this); + this._MillionsMonthlyReportId = value.MillionsMonthlyReportId; + } + else + { + this._MillionsMonthlyReportId = default(string); + } + this.SendPropertyChanged("Information_MillionsMonthlyReport"); + } + } + } + + 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.Information_SafetyQuarterlyReport")] + public partial class Information_SafetyQuarterlyReport : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SafetyQuarterlyReportId; + + private string _UnitId; + + private System.Nullable _YearId; + + private System.Nullable _Quarters; + + private System.Nullable _TotalInWorkHours; + + private string _TotalInWorkHoursRemark; + + private System.Nullable _TotalOutWorkHours; + + private string _TotalOutWorkHoursRemark; + + private System.Nullable _WorkHoursLossRate; + + private string _WorkHoursLossRateRemark; + + private System.Nullable _WorkHoursAccuracy; + + private string _WorkHoursAccuracyRemark; + + private System.Nullable _MainBusinessIncome; + + private string _MainBusinessIncomeRemark; + + private System.Nullable _ConstructionRevenue; + + private string _ConstructionRevenueRemark; + + private System.Nullable _UnitTimeIncome; + + private string _UnitTimeIncomeRemark; + + private System.Nullable _BillionsOutputMortality; + + private string _BillionsOutputMortalityRemark; + + private System.Nullable _MajorFireAccident; + + private string _MajorFireAccidentRemark; + + private System.Nullable _MajorEquipAccident; + + private string _MajorEquipAccidentRemark; + + private System.Nullable _AccidentFrequency; + + private string _AccidentFrequencyRemark; + + private System.Nullable _SeriousInjuryAccident; + + private string _SeriousInjuryAccidentRemark; + + private System.Nullable _FireAccident; + + private string _FireAccidentRemark; + + private System.Nullable _EquipmentAccident; + + private string _EquipmentAccidentRemark; + + private System.Nullable _PoisoningAndInjuries; + + private string _PoisoningAndInjuriesRemark; + + private System.Nullable _ProductionSafetyInTotal; + + private string _ProductionSafetyInTotalRemark; + + private System.Nullable _ProtectionInput; + + private string _ProtectionInputRemark; + + private System.Nullable _LaboAndHealthIn; + + private string _LaborAndHealthInRemark; + + private System.Nullable _TechnologyProgressIn; + + private string _TechnologyProgressInRemark; + + private System.Nullable _EducationTrainIn; + + private string _EducationTrainInRemark; + + private System.Nullable _ProjectCostRate; + + private string _ProjectCostRateRemark; + + private System.Nullable _ProductionInput; + + private string _ProductionInputRemark; + + private System.Nullable _Revenue; + + private string _RevenueRemark; + + private System.Nullable _FullTimeMan; + + private string _FullTimeManRemark; + + private string _FullTimeManAttachUrl; + + private System.Nullable _PMMan; + + private string _PMManRemark; + + private string _PMManAttachUrl; + + private System.Nullable _CorporateDirectorEdu; + + private string _CorporateDirectorEduRemark; + + private System.Nullable _ProjectLeaderEdu; + + private string _ProjectLeaderEduRemark; + + private System.Nullable _FullTimeEdu; + + private string _FullTimeEduRemark; + + private System.Nullable _ThreeKidsEduRate; + + private string _ThreeKidsEduRateRemark; + + private System.Nullable _UplinReportRate; + + private string _UplinReportRateRemark; + + private string _Remarks; + + private System.Nullable _FillingDate; + + private string _CompileMan; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private System.Nullable _KeyEquipmentTotal; + + private string _KeyEquipmentTotalRemark; + + private System.Nullable _KeyEquipmentReportCount; + + private string _KeyEquipmentReportCountRemark; + + private System.Nullable _ChemicalAreaProjectCount; + + private string _ChemicalAreaProjectCountRemark; + + private System.Nullable _HarmfulMediumCoverCount; + + private string _HarmfulMediumCoverCountRemark; + + private System.Nullable _HarmfulMediumCoverRate; + + private string _HarmfulMediumCoverRateRemark; + + private EntityRef _Base_Unit; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSafetyQuarterlyReportIdChanging(string value); + partial void OnSafetyQuarterlyReportIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnYearIdChanging(System.Nullable value); + partial void OnYearIdChanged(); + partial void OnQuartersChanging(System.Nullable value); + partial void OnQuartersChanged(); + partial void OnTotalInWorkHoursChanging(System.Nullable value); + partial void OnTotalInWorkHoursChanged(); + partial void OnTotalInWorkHoursRemarkChanging(string value); + partial void OnTotalInWorkHoursRemarkChanged(); + partial void OnTotalOutWorkHoursChanging(System.Nullable value); + partial void OnTotalOutWorkHoursChanged(); + partial void OnTotalOutWorkHoursRemarkChanging(string value); + partial void OnTotalOutWorkHoursRemarkChanged(); + partial void OnWorkHoursLossRateChanging(System.Nullable value); + partial void OnWorkHoursLossRateChanged(); + partial void OnWorkHoursLossRateRemarkChanging(string value); + partial void OnWorkHoursLossRateRemarkChanged(); + partial void OnWorkHoursAccuracyChanging(System.Nullable value); + partial void OnWorkHoursAccuracyChanged(); + partial void OnWorkHoursAccuracyRemarkChanging(string value); + partial void OnWorkHoursAccuracyRemarkChanged(); + partial void OnMainBusinessIncomeChanging(System.Nullable value); + partial void OnMainBusinessIncomeChanged(); + partial void OnMainBusinessIncomeRemarkChanging(string value); + partial void OnMainBusinessIncomeRemarkChanged(); + partial void OnConstructionRevenueChanging(System.Nullable value); + partial void OnConstructionRevenueChanged(); + partial void OnConstructionRevenueRemarkChanging(string value); + partial void OnConstructionRevenueRemarkChanged(); + partial void OnUnitTimeIncomeChanging(System.Nullable value); + partial void OnUnitTimeIncomeChanged(); + partial void OnUnitTimeIncomeRemarkChanging(string value); + partial void OnUnitTimeIncomeRemarkChanged(); + partial void OnBillionsOutputMortalityChanging(System.Nullable value); + partial void OnBillionsOutputMortalityChanged(); + partial void OnBillionsOutputMortalityRemarkChanging(string value); + partial void OnBillionsOutputMortalityRemarkChanged(); + partial void OnMajorFireAccidentChanging(System.Nullable value); + partial void OnMajorFireAccidentChanged(); + partial void OnMajorFireAccidentRemarkChanging(string value); + partial void OnMajorFireAccidentRemarkChanged(); + partial void OnMajorEquipAccidentChanging(System.Nullable value); + partial void OnMajorEquipAccidentChanged(); + partial void OnMajorEquipAccidentRemarkChanging(string value); + partial void OnMajorEquipAccidentRemarkChanged(); + partial void OnAccidentFrequencyChanging(System.Nullable value); + partial void OnAccidentFrequencyChanged(); + partial void OnAccidentFrequencyRemarkChanging(string value); + partial void OnAccidentFrequencyRemarkChanged(); + partial void OnSeriousInjuryAccidentChanging(System.Nullable value); + partial void OnSeriousInjuryAccidentChanged(); + partial void OnSeriousInjuryAccidentRemarkChanging(string value); + partial void OnSeriousInjuryAccidentRemarkChanged(); + partial void OnFireAccidentChanging(System.Nullable value); + partial void OnFireAccidentChanged(); + partial void OnFireAccidentRemarkChanging(string value); + partial void OnFireAccidentRemarkChanged(); + partial void OnEquipmentAccidentChanging(System.Nullable value); + partial void OnEquipmentAccidentChanged(); + partial void OnEquipmentAccidentRemarkChanging(string value); + partial void OnEquipmentAccidentRemarkChanged(); + partial void OnPoisoningAndInjuriesChanging(System.Nullable value); + partial void OnPoisoningAndInjuriesChanged(); + partial void OnPoisoningAndInjuriesRemarkChanging(string value); + partial void OnPoisoningAndInjuriesRemarkChanged(); + partial void OnProductionSafetyInTotalChanging(System.Nullable value); + partial void OnProductionSafetyInTotalChanged(); + partial void OnProductionSafetyInTotalRemarkChanging(string value); + partial void OnProductionSafetyInTotalRemarkChanged(); + partial void OnProtectionInputChanging(System.Nullable value); + partial void OnProtectionInputChanged(); + partial void OnProtectionInputRemarkChanging(string value); + partial void OnProtectionInputRemarkChanged(); + partial void OnLaboAndHealthInChanging(System.Nullable value); + partial void OnLaboAndHealthInChanged(); + partial void OnLaborAndHealthInRemarkChanging(string value); + partial void OnLaborAndHealthInRemarkChanged(); + partial void OnTechnologyProgressInChanging(System.Nullable value); + partial void OnTechnologyProgressInChanged(); + partial void OnTechnologyProgressInRemarkChanging(string value); + partial void OnTechnologyProgressInRemarkChanged(); + partial void OnEducationTrainInChanging(System.Nullable value); + partial void OnEducationTrainInChanged(); + partial void OnEducationTrainInRemarkChanging(string value); + partial void OnEducationTrainInRemarkChanged(); + partial void OnProjectCostRateChanging(System.Nullable value); + partial void OnProjectCostRateChanged(); + partial void OnProjectCostRateRemarkChanging(string value); + partial void OnProjectCostRateRemarkChanged(); + partial void OnProductionInputChanging(System.Nullable value); + partial void OnProductionInputChanged(); + partial void OnProductionInputRemarkChanging(string value); + partial void OnProductionInputRemarkChanged(); + partial void OnRevenueChanging(System.Nullable value); + partial void OnRevenueChanged(); + partial void OnRevenueRemarkChanging(string value); + partial void OnRevenueRemarkChanged(); + partial void OnFullTimeManChanging(System.Nullable value); + partial void OnFullTimeManChanged(); + partial void OnFullTimeManRemarkChanging(string value); + partial void OnFullTimeManRemarkChanged(); + partial void OnFullTimeManAttachUrlChanging(string value); + partial void OnFullTimeManAttachUrlChanged(); + partial void OnPMManChanging(System.Nullable value); + partial void OnPMManChanged(); + partial void OnPMManRemarkChanging(string value); + partial void OnPMManRemarkChanged(); + partial void OnPMManAttachUrlChanging(string value); + partial void OnPMManAttachUrlChanged(); + partial void OnCorporateDirectorEduChanging(System.Nullable value); + partial void OnCorporateDirectorEduChanged(); + partial void OnCorporateDirectorEduRemarkChanging(string value); + partial void OnCorporateDirectorEduRemarkChanged(); + partial void OnProjectLeaderEduChanging(System.Nullable value); + partial void OnProjectLeaderEduChanged(); + partial void OnProjectLeaderEduRemarkChanging(string value); + partial void OnProjectLeaderEduRemarkChanged(); + partial void OnFullTimeEduChanging(System.Nullable value); + partial void OnFullTimeEduChanged(); + partial void OnFullTimeEduRemarkChanging(string value); + partial void OnFullTimeEduRemarkChanged(); + partial void OnThreeKidsEduRateChanging(System.Nullable value); + partial void OnThreeKidsEduRateChanged(); + partial void OnThreeKidsEduRateRemarkChanging(string value); + partial void OnThreeKidsEduRateRemarkChanged(); + partial void OnUplinReportRateChanging(System.Nullable value); + partial void OnUplinReportRateChanged(); + partial void OnUplinReportRateRemarkChanging(string value); + partial void OnUplinReportRateRemarkChanged(); + partial void OnRemarksChanging(string value); + partial void OnRemarksChanged(); + partial void OnFillingDateChanging(System.Nullable value); + partial void OnFillingDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + partial void OnUpStateChanging(string value); + partial void OnUpStateChanged(); + partial void OnHandleStateChanging(string value); + partial void OnHandleStateChanged(); + partial void OnHandleManChanging(string value); + partial void OnHandleManChanged(); + partial void OnKeyEquipmentTotalChanging(System.Nullable value); + partial void OnKeyEquipmentTotalChanged(); + partial void OnKeyEquipmentTotalRemarkChanging(string value); + partial void OnKeyEquipmentTotalRemarkChanged(); + partial void OnKeyEquipmentReportCountChanging(System.Nullable value); + partial void OnKeyEquipmentReportCountChanged(); + partial void OnKeyEquipmentReportCountRemarkChanging(string value); + partial void OnKeyEquipmentReportCountRemarkChanged(); + partial void OnChemicalAreaProjectCountChanging(System.Nullable value); + partial void OnChemicalAreaProjectCountChanged(); + partial void OnChemicalAreaProjectCountRemarkChanging(string value); + partial void OnChemicalAreaProjectCountRemarkChanged(); + partial void OnHarmfulMediumCoverCountChanging(System.Nullable value); + partial void OnHarmfulMediumCoverCountChanged(); + partial void OnHarmfulMediumCoverCountRemarkChanging(string value); + partial void OnHarmfulMediumCoverCountRemarkChanged(); + partial void OnHarmfulMediumCoverRateChanging(System.Nullable value); + partial void OnHarmfulMediumCoverRateChanged(); + partial void OnHarmfulMediumCoverRateRemarkChanging(string value); + partial void OnHarmfulMediumCoverRateRemarkChanged(); + #endregion + + public Information_SafetyQuarterlyReport() + { + this._Base_Unit = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyQuarterlyReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SafetyQuarterlyReportId + { + get + { + return this._SafetyQuarterlyReportId; + } + set + { + if ((this._SafetyQuarterlyReportId != value)) + { + this.OnSafetyQuarterlyReportIdChanging(value); + this.SendPropertyChanging(); + this._SafetyQuarterlyReportId = value; + this.SendPropertyChanged("SafetyQuarterlyReportId"); + this.OnSafetyQuarterlyReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this.OnYearIdChanging(value); + this.SendPropertyChanging(); + this._YearId = value; + this.SendPropertyChanged("YearId"); + this.OnYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="Int")] + public System.Nullable Quarters + { + get + { + return this._Quarters; + } + set + { + if ((this._Quarters != value)) + { + this.OnQuartersChanging(value); + this.SendPropertyChanging(); + this._Quarters = value; + this.SendPropertyChanged("Quarters"); + this.OnQuartersChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalInWorkHours", DbType="Int")] + public System.Nullable TotalInWorkHours + { + get + { + return this._TotalInWorkHours; + } + set + { + if ((this._TotalInWorkHours != value)) + { + this.OnTotalInWorkHoursChanging(value); + this.SendPropertyChanging(); + this._TotalInWorkHours = value; + this.SendPropertyChanged("TotalInWorkHours"); + this.OnTotalInWorkHoursChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalInWorkHoursRemark", DbType="NVarChar(500)")] + public string TotalInWorkHoursRemark + { + get + { + return this._TotalInWorkHoursRemark; + } + set + { + if ((this._TotalInWorkHoursRemark != value)) + { + this.OnTotalInWorkHoursRemarkChanging(value); + this.SendPropertyChanging(); + this._TotalInWorkHoursRemark = value; + this.SendPropertyChanged("TotalInWorkHoursRemark"); + this.OnTotalInWorkHoursRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalOutWorkHours", DbType="Int")] + public System.Nullable TotalOutWorkHours + { + get + { + return this._TotalOutWorkHours; + } + set + { + if ((this._TotalOutWorkHours != value)) + { + this.OnTotalOutWorkHoursChanging(value); + this.SendPropertyChanging(); + this._TotalOutWorkHours = value; + this.SendPropertyChanged("TotalOutWorkHours"); + this.OnTotalOutWorkHoursChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalOutWorkHoursRemark", DbType="NVarChar(500)")] + public string TotalOutWorkHoursRemark + { + get + { + return this._TotalOutWorkHoursRemark; + } + set + { + if ((this._TotalOutWorkHoursRemark != value)) + { + this.OnTotalOutWorkHoursRemarkChanging(value); + this.SendPropertyChanging(); + this._TotalOutWorkHoursRemark = value; + this.SendPropertyChanged("TotalOutWorkHoursRemark"); + this.OnTotalOutWorkHoursRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHoursLossRate", DbType="Decimal(18,2)")] + public System.Nullable WorkHoursLossRate + { + get + { + return this._WorkHoursLossRate; + } + set + { + if ((this._WorkHoursLossRate != value)) + { + this.OnWorkHoursLossRateChanging(value); + this.SendPropertyChanging(); + this._WorkHoursLossRate = value; + this.SendPropertyChanged("WorkHoursLossRate"); + this.OnWorkHoursLossRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHoursLossRateRemark", DbType="NVarChar(500)")] + public string WorkHoursLossRateRemark + { + get + { + return this._WorkHoursLossRateRemark; + } + set + { + if ((this._WorkHoursLossRateRemark != value)) + { + this.OnWorkHoursLossRateRemarkChanging(value); + this.SendPropertyChanging(); + this._WorkHoursLossRateRemark = value; + this.SendPropertyChanged("WorkHoursLossRateRemark"); + this.OnWorkHoursLossRateRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHoursAccuracy", DbType="Decimal(18,2)")] + public System.Nullable WorkHoursAccuracy + { + get + { + return this._WorkHoursAccuracy; + } + set + { + if ((this._WorkHoursAccuracy != value)) + { + this.OnWorkHoursAccuracyChanging(value); + this.SendPropertyChanging(); + this._WorkHoursAccuracy = value; + this.SendPropertyChanged("WorkHoursAccuracy"); + this.OnWorkHoursAccuracyChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHoursAccuracyRemark", DbType="NVarChar(500)")] + public string WorkHoursAccuracyRemark + { + get + { + return this._WorkHoursAccuracyRemark; + } + set + { + if ((this._WorkHoursAccuracyRemark != value)) + { + this.OnWorkHoursAccuracyRemarkChanging(value); + this.SendPropertyChanging(); + this._WorkHoursAccuracyRemark = value; + this.SendPropertyChanged("WorkHoursAccuracyRemark"); + this.OnWorkHoursAccuracyRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainBusinessIncome", DbType="Money")] + public System.Nullable MainBusinessIncome + { + get + { + return this._MainBusinessIncome; + } + set + { + if ((this._MainBusinessIncome != value)) + { + this.OnMainBusinessIncomeChanging(value); + this.SendPropertyChanging(); + this._MainBusinessIncome = value; + this.SendPropertyChanged("MainBusinessIncome"); + this.OnMainBusinessIncomeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainBusinessIncomeRemark", DbType="NVarChar(500)")] + public string MainBusinessIncomeRemark + { + get + { + return this._MainBusinessIncomeRemark; + } + set + { + if ((this._MainBusinessIncomeRemark != value)) + { + this.OnMainBusinessIncomeRemarkChanging(value); + this.SendPropertyChanging(); + this._MainBusinessIncomeRemark = value; + this.SendPropertyChanged("MainBusinessIncomeRemark"); + this.OnMainBusinessIncomeRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionRevenue", DbType="Money")] + public System.Nullable ConstructionRevenue + { + get + { + return this._ConstructionRevenue; + } + set + { + if ((this._ConstructionRevenue != value)) + { + this.OnConstructionRevenueChanging(value); + this.SendPropertyChanging(); + this._ConstructionRevenue = value; + this.SendPropertyChanged("ConstructionRevenue"); + this.OnConstructionRevenueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionRevenueRemark", DbType="NVarChar(500)")] + public string ConstructionRevenueRemark + { + get + { + return this._ConstructionRevenueRemark; + } + set + { + if ((this._ConstructionRevenueRemark != value)) + { + this.OnConstructionRevenueRemarkChanging(value); + this.SendPropertyChanging(); + this._ConstructionRevenueRemark = value; + this.SendPropertyChanged("ConstructionRevenueRemark"); + this.OnConstructionRevenueRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitTimeIncome", DbType="Money")] + public System.Nullable UnitTimeIncome + { + get + { + return this._UnitTimeIncome; + } + set + { + if ((this._UnitTimeIncome != value)) + { + this.OnUnitTimeIncomeChanging(value); + this.SendPropertyChanging(); + this._UnitTimeIncome = value; + this.SendPropertyChanged("UnitTimeIncome"); + this.OnUnitTimeIncomeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitTimeIncomeRemark", DbType="NVarChar(500)")] + public string UnitTimeIncomeRemark + { + get + { + return this._UnitTimeIncomeRemark; + } + set + { + if ((this._UnitTimeIncomeRemark != value)) + { + this.OnUnitTimeIncomeRemarkChanging(value); + this.SendPropertyChanging(); + this._UnitTimeIncomeRemark = value; + this.SendPropertyChanged("UnitTimeIncomeRemark"); + this.OnUnitTimeIncomeRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BillionsOutputMortality", DbType="Decimal(18,2)")] + public System.Nullable BillionsOutputMortality + { + get + { + return this._BillionsOutputMortality; + } + set + { + if ((this._BillionsOutputMortality != value)) + { + this.OnBillionsOutputMortalityChanging(value); + this.SendPropertyChanging(); + this._BillionsOutputMortality = value; + this.SendPropertyChanged("BillionsOutputMortality"); + this.OnBillionsOutputMortalityChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BillionsOutputMortalityRemark", DbType="NVarChar(500)")] + public string BillionsOutputMortalityRemark + { + get + { + return this._BillionsOutputMortalityRemark; + } + set + { + if ((this._BillionsOutputMortalityRemark != value)) + { + this.OnBillionsOutputMortalityRemarkChanging(value); + this.SendPropertyChanging(); + this._BillionsOutputMortalityRemark = value; + this.SendPropertyChanged("BillionsOutputMortalityRemark"); + this.OnBillionsOutputMortalityRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MajorFireAccident", DbType="Int")] + public System.Nullable MajorFireAccident + { + get + { + return this._MajorFireAccident; + } + set + { + if ((this._MajorFireAccident != value)) + { + this.OnMajorFireAccidentChanging(value); + this.SendPropertyChanging(); + this._MajorFireAccident = value; + this.SendPropertyChanged("MajorFireAccident"); + this.OnMajorFireAccidentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MajorFireAccidentRemark", DbType="NVarChar(500)")] + public string MajorFireAccidentRemark + { + get + { + return this._MajorFireAccidentRemark; + } + set + { + if ((this._MajorFireAccidentRemark != value)) + { + this.OnMajorFireAccidentRemarkChanging(value); + this.SendPropertyChanging(); + this._MajorFireAccidentRemark = value; + this.SendPropertyChanged("MajorFireAccidentRemark"); + this.OnMajorFireAccidentRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MajorEquipAccident", DbType="Int")] + public System.Nullable MajorEquipAccident + { + get + { + return this._MajorEquipAccident; + } + set + { + if ((this._MajorEquipAccident != value)) + { + this.OnMajorEquipAccidentChanging(value); + this.SendPropertyChanging(); + this._MajorEquipAccident = value; + this.SendPropertyChanged("MajorEquipAccident"); + this.OnMajorEquipAccidentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MajorEquipAccidentRemark", DbType="NVarChar(500)")] + public string MajorEquipAccidentRemark + { + get + { + return this._MajorEquipAccidentRemark; + } + set + { + if ((this._MajorEquipAccidentRemark != value)) + { + this.OnMajorEquipAccidentRemarkChanging(value); + this.SendPropertyChanging(); + this._MajorEquipAccidentRemark = value; + this.SendPropertyChanged("MajorEquipAccidentRemark"); + this.OnMajorEquipAccidentRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentFrequency", DbType="Decimal(18,2)")] + public System.Nullable AccidentFrequency + { + get + { + return this._AccidentFrequency; + } + set + { + if ((this._AccidentFrequency != value)) + { + this.OnAccidentFrequencyChanging(value); + this.SendPropertyChanging(); + this._AccidentFrequency = value; + this.SendPropertyChanged("AccidentFrequency"); + this.OnAccidentFrequencyChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentFrequencyRemark", DbType="NVarChar(500)")] + public string AccidentFrequencyRemark + { + get + { + return this._AccidentFrequencyRemark; + } + set + { + if ((this._AccidentFrequencyRemark != value)) + { + this.OnAccidentFrequencyRemarkChanging(value); + this.SendPropertyChanging(); + this._AccidentFrequencyRemark = value; + this.SendPropertyChanged("AccidentFrequencyRemark"); + this.OnAccidentFrequencyRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuryAccident", DbType="Int")] + public System.Nullable SeriousInjuryAccident + { + get + { + return this._SeriousInjuryAccident; + } + set + { + if ((this._SeriousInjuryAccident != value)) + { + this.OnSeriousInjuryAccidentChanging(value); + this.SendPropertyChanging(); + this._SeriousInjuryAccident = value; + this.SendPropertyChanged("SeriousInjuryAccident"); + this.OnSeriousInjuryAccidentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuryAccidentRemark", DbType="NVarChar(500)")] + public string SeriousInjuryAccidentRemark + { + get + { + return this._SeriousInjuryAccidentRemark; + } + set + { + if ((this._SeriousInjuryAccidentRemark != value)) + { + this.OnSeriousInjuryAccidentRemarkChanging(value); + this.SendPropertyChanging(); + this._SeriousInjuryAccidentRemark = value; + this.SendPropertyChanged("SeriousInjuryAccidentRemark"); + this.OnSeriousInjuryAccidentRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireAccident", DbType="Int")] + public System.Nullable FireAccident + { + get + { + return this._FireAccident; + } + set + { + if ((this._FireAccident != value)) + { + this.OnFireAccidentChanging(value); + this.SendPropertyChanging(); + this._FireAccident = value; + this.SendPropertyChanged("FireAccident"); + this.OnFireAccidentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireAccidentRemark", DbType="NVarChar(500)")] + public string FireAccidentRemark + { + get + { + return this._FireAccidentRemark; + } + set + { + if ((this._FireAccidentRemark != value)) + { + this.OnFireAccidentRemarkChanging(value); + this.SendPropertyChanging(); + this._FireAccidentRemark = value; + this.SendPropertyChanged("FireAccidentRemark"); + this.OnFireAccidentRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentAccident", DbType="Int")] + public System.Nullable EquipmentAccident + { + get + { + return this._EquipmentAccident; + } + set + { + if ((this._EquipmentAccident != value)) + { + this.OnEquipmentAccidentChanging(value); + this.SendPropertyChanging(); + this._EquipmentAccident = value; + this.SendPropertyChanged("EquipmentAccident"); + this.OnEquipmentAccidentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentAccidentRemark", DbType="NVarChar(500)")] + public string EquipmentAccidentRemark + { + get + { + return this._EquipmentAccidentRemark; + } + set + { + if ((this._EquipmentAccidentRemark != value)) + { + this.OnEquipmentAccidentRemarkChanging(value); + this.SendPropertyChanging(); + this._EquipmentAccidentRemark = value; + this.SendPropertyChanged("EquipmentAccidentRemark"); + this.OnEquipmentAccidentRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PoisoningAndInjuries", DbType="Int")] + public System.Nullable PoisoningAndInjuries + { + get + { + return this._PoisoningAndInjuries; + } + set + { + if ((this._PoisoningAndInjuries != value)) + { + this.OnPoisoningAndInjuriesChanging(value); + this.SendPropertyChanging(); + this._PoisoningAndInjuries = value; + this.SendPropertyChanged("PoisoningAndInjuries"); + this.OnPoisoningAndInjuriesChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PoisoningAndInjuriesRemark", DbType="NVarChar(500)")] + public string PoisoningAndInjuriesRemark + { + get + { + return this._PoisoningAndInjuriesRemark; + } + set + { + if ((this._PoisoningAndInjuriesRemark != value)) + { + this.OnPoisoningAndInjuriesRemarkChanging(value); + this.SendPropertyChanging(); + this._PoisoningAndInjuriesRemark = value; + this.SendPropertyChanged("PoisoningAndInjuriesRemark"); + this.OnPoisoningAndInjuriesRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductionSafetyInTotal", DbType="Int")] + public System.Nullable ProductionSafetyInTotal + { + get + { + return this._ProductionSafetyInTotal; + } + set + { + if ((this._ProductionSafetyInTotal != value)) + { + this.OnProductionSafetyInTotalChanging(value); + this.SendPropertyChanging(); + this._ProductionSafetyInTotal = value; + this.SendPropertyChanged("ProductionSafetyInTotal"); + this.OnProductionSafetyInTotalChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductionSafetyInTotalRemark", DbType="NVarChar(500)")] + public string ProductionSafetyInTotalRemark + { + get + { + return this._ProductionSafetyInTotalRemark; + } + set + { + if ((this._ProductionSafetyInTotalRemark != value)) + { + this.OnProductionSafetyInTotalRemarkChanging(value); + this.SendPropertyChanging(); + this._ProductionSafetyInTotalRemark = value; + this.SendPropertyChanged("ProductionSafetyInTotalRemark"); + this.OnProductionSafetyInTotalRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProtectionInput", DbType="Money")] + public System.Nullable ProtectionInput + { + get + { + return this._ProtectionInput; + } + set + { + if ((this._ProtectionInput != value)) + { + this.OnProtectionInputChanging(value); + this.SendPropertyChanging(); + this._ProtectionInput = value; + this.SendPropertyChanged("ProtectionInput"); + this.OnProtectionInputChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProtectionInputRemark", DbType="NVarChar(500)")] + public string ProtectionInputRemark + { + get + { + return this._ProtectionInputRemark; + } + set + { + if ((this._ProtectionInputRemark != value)) + { + this.OnProtectionInputRemarkChanging(value); + this.SendPropertyChanging(); + this._ProtectionInputRemark = value; + this.SendPropertyChanged("ProtectionInputRemark"); + this.OnProtectionInputRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LaboAndHealthIn", DbType="Money")] + public System.Nullable LaboAndHealthIn + { + get + { + return this._LaboAndHealthIn; + } + set + { + if ((this._LaboAndHealthIn != value)) + { + this.OnLaboAndHealthInChanging(value); + this.SendPropertyChanging(); + this._LaboAndHealthIn = value; + this.SendPropertyChanged("LaboAndHealthIn"); + this.OnLaboAndHealthInChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LaborAndHealthInRemark", DbType="NVarChar(500)")] + public string LaborAndHealthInRemark + { + get + { + return this._LaborAndHealthInRemark; + } + set + { + if ((this._LaborAndHealthInRemark != value)) + { + this.OnLaborAndHealthInRemarkChanging(value); + this.SendPropertyChanging(); + this._LaborAndHealthInRemark = value; + this.SendPropertyChanged("LaborAndHealthInRemark"); + this.OnLaborAndHealthInRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TechnologyProgressIn", DbType="Money")] + public System.Nullable TechnologyProgressIn + { + get + { + return this._TechnologyProgressIn; + } + set + { + if ((this._TechnologyProgressIn != value)) + { + this.OnTechnologyProgressInChanging(value); + this.SendPropertyChanging(); + this._TechnologyProgressIn = value; + this.SendPropertyChanged("TechnologyProgressIn"); + this.OnTechnologyProgressInChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TechnologyProgressInRemark", DbType="NVarChar(500)")] + public string TechnologyProgressInRemark + { + get + { + return this._TechnologyProgressInRemark; + } + set + { + if ((this._TechnologyProgressInRemark != value)) + { + this.OnTechnologyProgressInRemarkChanging(value); + this.SendPropertyChanging(); + this._TechnologyProgressInRemark = value; + this.SendPropertyChanged("TechnologyProgressInRemark"); + this.OnTechnologyProgressInRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EducationTrainIn", DbType="Money")] + public System.Nullable EducationTrainIn + { + get + { + return this._EducationTrainIn; + } + set + { + if ((this._EducationTrainIn != value)) + { + this.OnEducationTrainInChanging(value); + this.SendPropertyChanging(); + this._EducationTrainIn = value; + this.SendPropertyChanged("EducationTrainIn"); + this.OnEducationTrainInChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EducationTrainInRemark", DbType="NVarChar(500)")] + public string EducationTrainInRemark + { + get + { + return this._EducationTrainInRemark; + } + set + { + if ((this._EducationTrainInRemark != value)) + { + this.OnEducationTrainInRemarkChanging(value); + this.SendPropertyChanging(); + this._EducationTrainInRemark = value; + this.SendPropertyChanged("EducationTrainInRemark"); + this.OnEducationTrainInRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCostRate", DbType="Decimal(18,2)")] + public System.Nullable ProjectCostRate + { + get + { + return this._ProjectCostRate; + } + set + { + if ((this._ProjectCostRate != value)) + { + this.OnProjectCostRateChanging(value); + this.SendPropertyChanging(); + this._ProjectCostRate = value; + this.SendPropertyChanged("ProjectCostRate"); + this.OnProjectCostRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCostRateRemark", DbType="NVarChar(500)")] + public string ProjectCostRateRemark + { + get + { + return this._ProjectCostRateRemark; + } + set + { + if ((this._ProjectCostRateRemark != value)) + { + this.OnProjectCostRateRemarkChanging(value); + this.SendPropertyChanging(); + this._ProjectCostRateRemark = value; + this.SendPropertyChanged("ProjectCostRateRemark"); + this.OnProjectCostRateRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductionInput", DbType="Money")] + public System.Nullable ProductionInput + { + get + { + return this._ProductionInput; + } + set + { + if ((this._ProductionInput != value)) + { + this.OnProductionInputChanging(value); + this.SendPropertyChanging(); + this._ProductionInput = value; + this.SendPropertyChanged("ProductionInput"); + this.OnProductionInputChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductionInputRemark", DbType="NVarChar(500)")] + public string ProductionInputRemark + { + get + { + return this._ProductionInputRemark; + } + set + { + if ((this._ProductionInputRemark != value)) + { + this.OnProductionInputRemarkChanging(value); + this.SendPropertyChanging(); + this._ProductionInputRemark = value; + this.SendPropertyChanged("ProductionInputRemark"); + this.OnProductionInputRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Revenue", DbType="Decimal(18,2)")] + public System.Nullable Revenue + { + get + { + return this._Revenue; + } + set + { + if ((this._Revenue != value)) + { + this.OnRevenueChanging(value); + this.SendPropertyChanging(); + this._Revenue = value; + this.SendPropertyChanged("Revenue"); + this.OnRevenueChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RevenueRemark", DbType="NVarChar(500)")] + public string RevenueRemark + { + get + { + return this._RevenueRemark; + } + set + { + if ((this._RevenueRemark != value)) + { + this.OnRevenueRemarkChanging(value); + this.SendPropertyChanging(); + this._RevenueRemark = value; + this.SendPropertyChanged("RevenueRemark"); + this.OnRevenueRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeMan", DbType="Int")] + public System.Nullable FullTimeMan + { + get + { + return this._FullTimeMan; + } + set + { + if ((this._FullTimeMan != value)) + { + this.OnFullTimeManChanging(value); + this.SendPropertyChanging(); + this._FullTimeMan = value; + this.SendPropertyChanged("FullTimeMan"); + this.OnFullTimeManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeManRemark", DbType="NVarChar(500)")] + public string FullTimeManRemark + { + get + { + return this._FullTimeManRemark; + } + set + { + if ((this._FullTimeManRemark != value)) + { + this.OnFullTimeManRemarkChanging(value); + this.SendPropertyChanging(); + this._FullTimeManRemark = value; + this.SendPropertyChanged("FullTimeManRemark"); + this.OnFullTimeManRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeManAttachUrl", DbType="NVarChar(2000)")] + public string FullTimeManAttachUrl + { + get + { + return this._FullTimeManAttachUrl; + } + set + { + if ((this._FullTimeManAttachUrl != value)) + { + this.OnFullTimeManAttachUrlChanging(value); + this.SendPropertyChanging(); + this._FullTimeManAttachUrl = value; + this.SendPropertyChanged("FullTimeManAttachUrl"); + this.OnFullTimeManAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PMMan", DbType="Int")] + public System.Nullable PMMan + { + get + { + return this._PMMan; + } + set + { + if ((this._PMMan != value)) + { + this.OnPMManChanging(value); + this.SendPropertyChanging(); + this._PMMan = value; + this.SendPropertyChanged("PMMan"); + this.OnPMManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PMManRemark", DbType="NVarChar(500)")] + public string PMManRemark + { + get + { + return this._PMManRemark; + } + set + { + if ((this._PMManRemark != value)) + { + this.OnPMManRemarkChanging(value); + this.SendPropertyChanging(); + this._PMManRemark = value; + this.SendPropertyChanged("PMManRemark"); + this.OnPMManRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PMManAttachUrl", DbType="NVarChar(2000)")] + public string PMManAttachUrl + { + get + { + return this._PMManAttachUrl; + } + set + { + if ((this._PMManAttachUrl != value)) + { + this.OnPMManAttachUrlChanging(value); + this.SendPropertyChanging(); + this._PMManAttachUrl = value; + this.SendPropertyChanged("PMManAttachUrl"); + this.OnPMManAttachUrlChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CorporateDirectorEdu", DbType="Int")] + public System.Nullable CorporateDirectorEdu + { + get + { + return this._CorporateDirectorEdu; + } + set + { + if ((this._CorporateDirectorEdu != value)) + { + this.OnCorporateDirectorEduChanging(value); + this.SendPropertyChanging(); + this._CorporateDirectorEdu = value; + this.SendPropertyChanged("CorporateDirectorEdu"); + this.OnCorporateDirectorEduChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CorporateDirectorEduRemark", DbType="NVarChar(500)")] + public string CorporateDirectorEduRemark + { + get + { + return this._CorporateDirectorEduRemark; + } + set + { + if ((this._CorporateDirectorEduRemark != value)) + { + this.OnCorporateDirectorEduRemarkChanging(value); + this.SendPropertyChanging(); + this._CorporateDirectorEduRemark = value; + this.SendPropertyChanged("CorporateDirectorEduRemark"); + this.OnCorporateDirectorEduRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectLeaderEdu", DbType="Int")] + public System.Nullable ProjectLeaderEdu + { + get + { + return this._ProjectLeaderEdu; + } + set + { + if ((this._ProjectLeaderEdu != value)) + { + this.OnProjectLeaderEduChanging(value); + this.SendPropertyChanging(); + this._ProjectLeaderEdu = value; + this.SendPropertyChanged("ProjectLeaderEdu"); + this.OnProjectLeaderEduChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectLeaderEduRemark", DbType="NVarChar(500)")] + public string ProjectLeaderEduRemark + { + get + { + return this._ProjectLeaderEduRemark; + } + set + { + if ((this._ProjectLeaderEduRemark != value)) + { + this.OnProjectLeaderEduRemarkChanging(value); + this.SendPropertyChanging(); + this._ProjectLeaderEduRemark = value; + this.SendPropertyChanged("ProjectLeaderEduRemark"); + this.OnProjectLeaderEduRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeEdu", DbType="Int")] + public System.Nullable FullTimeEdu + { + get + { + return this._FullTimeEdu; + } + set + { + if ((this._FullTimeEdu != value)) + { + this.OnFullTimeEduChanging(value); + this.SendPropertyChanging(); + this._FullTimeEdu = value; + this.SendPropertyChanged("FullTimeEdu"); + this.OnFullTimeEduChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeEduRemark", DbType="NVarChar(500)")] + public string FullTimeEduRemark + { + get + { + return this._FullTimeEduRemark; + } + set + { + if ((this._FullTimeEduRemark != value)) + { + this.OnFullTimeEduRemarkChanging(value); + this.SendPropertyChanging(); + this._FullTimeEduRemark = value; + this.SendPropertyChanged("FullTimeEduRemark"); + this.OnFullTimeEduRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThreeKidsEduRate", DbType="Decimal(18,2)")] + public System.Nullable ThreeKidsEduRate + { + get + { + return this._ThreeKidsEduRate; + } + set + { + if ((this._ThreeKidsEduRate != value)) + { + this.OnThreeKidsEduRateChanging(value); + this.SendPropertyChanging(); + this._ThreeKidsEduRate = value; + this.SendPropertyChanged("ThreeKidsEduRate"); + this.OnThreeKidsEduRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThreeKidsEduRateRemark", DbType="NVarChar(500)")] + public string ThreeKidsEduRateRemark + { + get + { + return this._ThreeKidsEduRateRemark; + } + set + { + if ((this._ThreeKidsEduRateRemark != value)) + { + this.OnThreeKidsEduRateRemarkChanging(value); + this.SendPropertyChanging(); + this._ThreeKidsEduRateRemark = value; + this.SendPropertyChanged("ThreeKidsEduRateRemark"); + this.OnThreeKidsEduRateRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UplinReportRate", DbType="Decimal(18,2)")] + public System.Nullable UplinReportRate + { + get + { + return this._UplinReportRate; + } + set + { + if ((this._UplinReportRate != value)) + { + this.OnUplinReportRateChanging(value); + this.SendPropertyChanging(); + this._UplinReportRate = value; + this.SendPropertyChanged("UplinReportRate"); + this.OnUplinReportRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UplinReportRateRemark", DbType="NVarChar(500)")] + public string UplinReportRateRemark + { + get + { + return this._UplinReportRateRemark; + } + set + { + if ((this._UplinReportRateRemark != value)) + { + this.OnUplinReportRateRemarkChanging(value); + this.SendPropertyChanging(); + this._UplinReportRateRemark = value; + this.SendPropertyChanged("UplinReportRateRemark"); + this.OnUplinReportRateRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remarks", DbType="NVarChar(1000)")] + public string Remarks + { + get + { + return this._Remarks; + } + set + { + if ((this._Remarks != value)) + { + this.OnRemarksChanging(value); + this.SendPropertyChanging(); + this._Remarks = value; + this.SendPropertyChanged("Remarks"); + this.OnRemarksChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this.OnFillingDateChanging(value); + this.SendPropertyChanging(); + this._FillingDate = value; + this.SendPropertyChanged("FillingDate"); + this.OnFillingDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this.OnUpStateChanging(value); + this.SendPropertyChanging(); + this._UpState = value; + this.SendPropertyChanged("UpState"); + this.OnUpStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this.OnHandleStateChanging(value); + this.SendPropertyChanging(); + this._HandleState = value; + this.SendPropertyChanged("HandleState"); + this.OnHandleStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this.OnHandleManChanging(value); + this.SendPropertyChanging(); + this._HandleMan = value; + this.SendPropertyChanged("HandleMan"); + this.OnHandleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyEquipmentTotal", DbType="Int")] + public System.Nullable KeyEquipmentTotal + { + get + { + return this._KeyEquipmentTotal; + } + set + { + if ((this._KeyEquipmentTotal != value)) + { + this.OnKeyEquipmentTotalChanging(value); + this.SendPropertyChanging(); + this._KeyEquipmentTotal = value; + this.SendPropertyChanged("KeyEquipmentTotal"); + this.OnKeyEquipmentTotalChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyEquipmentTotalRemark", DbType="NVarChar(500)")] + public string KeyEquipmentTotalRemark + { + get + { + return this._KeyEquipmentTotalRemark; + } + set + { + if ((this._KeyEquipmentTotalRemark != value)) + { + this.OnKeyEquipmentTotalRemarkChanging(value); + this.SendPropertyChanging(); + this._KeyEquipmentTotalRemark = value; + this.SendPropertyChanged("KeyEquipmentTotalRemark"); + this.OnKeyEquipmentTotalRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyEquipmentReportCount", DbType="Int")] + public System.Nullable KeyEquipmentReportCount + { + get + { + return this._KeyEquipmentReportCount; + } + set + { + if ((this._KeyEquipmentReportCount != value)) + { + this.OnKeyEquipmentReportCountChanging(value); + this.SendPropertyChanging(); + this._KeyEquipmentReportCount = value; + this.SendPropertyChanged("KeyEquipmentReportCount"); + this.OnKeyEquipmentReportCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyEquipmentReportCountRemark", DbType="NVarChar(500)")] + public string KeyEquipmentReportCountRemark + { + get + { + return this._KeyEquipmentReportCountRemark; + } + set + { + if ((this._KeyEquipmentReportCountRemark != value)) + { + this.OnKeyEquipmentReportCountRemarkChanging(value); + this.SendPropertyChanging(); + this._KeyEquipmentReportCountRemark = value; + this.SendPropertyChanged("KeyEquipmentReportCountRemark"); + this.OnKeyEquipmentReportCountRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ChemicalAreaProjectCount", DbType="Int")] + public System.Nullable ChemicalAreaProjectCount + { + get + { + return this._ChemicalAreaProjectCount; + } + set + { + if ((this._ChemicalAreaProjectCount != value)) + { + this.OnChemicalAreaProjectCountChanging(value); + this.SendPropertyChanging(); + this._ChemicalAreaProjectCount = value; + this.SendPropertyChanged("ChemicalAreaProjectCount"); + this.OnChemicalAreaProjectCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ChemicalAreaProjectCountRemark", DbType="NVarChar(500)")] + public string ChemicalAreaProjectCountRemark + { + get + { + return this._ChemicalAreaProjectCountRemark; + } + set + { + if ((this._ChemicalAreaProjectCountRemark != value)) + { + this.OnChemicalAreaProjectCountRemarkChanging(value); + this.SendPropertyChanging(); + this._ChemicalAreaProjectCountRemark = value; + this.SendPropertyChanged("ChemicalAreaProjectCountRemark"); + this.OnChemicalAreaProjectCountRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HarmfulMediumCoverCount", DbType="Int")] + public System.Nullable HarmfulMediumCoverCount + { + get + { + return this._HarmfulMediumCoverCount; + } + set + { + if ((this._HarmfulMediumCoverCount != value)) + { + this.OnHarmfulMediumCoverCountChanging(value); + this.SendPropertyChanging(); + this._HarmfulMediumCoverCount = value; + this.SendPropertyChanged("HarmfulMediumCoverCount"); + this.OnHarmfulMediumCoverCountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HarmfulMediumCoverCountRemark", DbType="NVarChar(500)")] + public string HarmfulMediumCoverCountRemark + { + get + { + return this._HarmfulMediumCoverCountRemark; + } + set + { + if ((this._HarmfulMediumCoverCountRemark != value)) + { + this.OnHarmfulMediumCoverCountRemarkChanging(value); + this.SendPropertyChanging(); + this._HarmfulMediumCoverCountRemark = value; + this.SendPropertyChanged("HarmfulMediumCoverCountRemark"); + this.OnHarmfulMediumCoverCountRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HarmfulMediumCoverRate", DbType="Decimal(18,2)")] + public System.Nullable HarmfulMediumCoverRate + { + get + { + return this._HarmfulMediumCoverRate; + } + set + { + if ((this._HarmfulMediumCoverRate != value)) + { + this.OnHarmfulMediumCoverRateChanging(value); + this.SendPropertyChanging(); + this._HarmfulMediumCoverRate = value; + this.SendPropertyChanged("HarmfulMediumCoverRate"); + this.OnHarmfulMediumCoverRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HarmfulMediumCoverRateRemark", DbType="NVarChar(500)")] + public string HarmfulMediumCoverRateRemark + { + get + { + return this._HarmfulMediumCoverRateRemark; + } + set + { + if ((this._HarmfulMediumCoverRateRemark != value)) + { + this.OnHarmfulMediumCoverRateRemarkChanging(value); + this.SendPropertyChanging(); + this._HarmfulMediumCoverRateRemark = value; + this.SendPropertyChanged("HarmfulMediumCoverRateRemark"); + this.OnHarmfulMediumCoverRateRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_SafetyQuarterlyReport_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.Information_SafetyQuarterlyReport.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_SafetyQuarterlyReport.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + 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.Information_UrgeReport")] + public partial class Information_UrgeReport : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _UrgeReportId; + + private string _UnitId; + + private string _ReprotType; + + private string _YearId; + + private string _MonthId; + + private string _QuarterId; + + private string _HalfYearId; + + private System.Nullable _UrgeDate; + + private System.Nullable _IsComplete; + + private System.Nullable _IsCancel; + + private EntityRef _Base_Unit; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnUrgeReportIdChanging(string value); + partial void OnUrgeReportIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnReprotTypeChanging(string value); + partial void OnReprotTypeChanged(); + partial void OnYearIdChanging(string value); + partial void OnYearIdChanged(); + partial void OnMonthIdChanging(string value); + partial void OnMonthIdChanged(); + partial void OnQuarterIdChanging(string value); + partial void OnQuarterIdChanged(); + partial void OnHalfYearIdChanging(string value); + partial void OnHalfYearIdChanged(); + partial void OnUrgeDateChanging(System.Nullable value); + partial void OnUrgeDateChanged(); + partial void OnIsCompleteChanging(System.Nullable value); + partial void OnIsCompleteChanged(); + partial void OnIsCancelChanging(System.Nullable value); + partial void OnIsCancelChanged(); + #endregion + + public Information_UrgeReport() + { + this._Base_Unit = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UrgeReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string UrgeReportId + { + get + { + return this._UrgeReportId; + } + set + { + if ((this._UrgeReportId != value)) + { + this.OnUrgeReportIdChanging(value); + this.SendPropertyChanging(); + this._UrgeReportId = value; + this.SendPropertyChanged("UrgeReportId"); + this.OnUrgeReportIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + if (this._Base_Unit.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReprotType", DbType="NVarChar(50)")] + public string ReprotType + { + get + { + return this._ReprotType; + } + set + { + if ((this._ReprotType != value)) + { + this.OnReprotTypeChanging(value); + this.SendPropertyChanging(); + this._ReprotType = value; + this.SendPropertyChanged("ReprotType"); + this.OnReprotTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="NVarChar(50)")] + public string YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this.OnYearIdChanging(value); + this.SendPropertyChanging(); + this._YearId = value; + this.SendPropertyChanged("YearId"); + this.OnYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthId", DbType="NVarChar(50)")] + public string MonthId + { + get + { + return this._MonthId; + } + set + { + if ((this._MonthId != value)) + { + this.OnMonthIdChanging(value); + this.SendPropertyChanging(); + this._MonthId = value; + this.SendPropertyChanged("MonthId"); + this.OnMonthIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuarterId", DbType="NVarChar(50)")] + public string QuarterId + { + get + { + return this._QuarterId; + } + set + { + if ((this._QuarterId != value)) + { + this.OnQuarterIdChanging(value); + this.SendPropertyChanging(); + this._QuarterId = value; + this.SendPropertyChanged("QuarterId"); + this.OnQuarterIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HalfYearId", DbType="NVarChar(50)")] + public string HalfYearId + { + get + { + return this._HalfYearId; + } + set + { + if ((this._HalfYearId != value)) + { + this.OnHalfYearIdChanging(value); + this.SendPropertyChanging(); + this._HalfYearId = value; + this.SendPropertyChanged("HalfYearId"); + this.OnHalfYearIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UrgeDate", DbType="DateTime")] + public System.Nullable UrgeDate + { + get + { + return this._UrgeDate; + } + set + { + if ((this._UrgeDate != value)) + { + this.OnUrgeDateChanging(value); + this.SendPropertyChanging(); + this._UrgeDate = value; + this.SendPropertyChanged("UrgeDate"); + this.OnUrgeDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsComplete", DbType="Bit")] + public System.Nullable IsComplete + { + get + { + return this._IsComplete; + } + set + { + if ((this._IsComplete != value)) + { + this.OnIsCompleteChanging(value); + this.SendPropertyChanging(); + this._IsComplete = value; + this.SendPropertyChanged("IsComplete"); + this.OnIsCompleteChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsCancel", DbType="Bit")] + public System.Nullable IsCancel + { + get + { + return this._IsCancel; + } + set + { + if ((this._IsCancel != value)) + { + this.OnIsCancelChanging(value); + this.SendPropertyChanging(); + this._IsCancel = value; + this.SendPropertyChanged("IsCancel"); + this.OnIsCancelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Information_UrgeReport_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.Information_UrgeReport.Remove(this); + } + this._Base_Unit.Entity = value; + if ((value != null)) + { + value.Information_UrgeReport.Add(this); + this._UnitId = value.UnitId; + } + else + { + this._UnitId = default(string); + } + this.SendPropertyChanged("Base_Unit"); + } + } + } + + 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.InformationProject_AccidentCauseReport")] public partial class InformationProject_AccidentCauseReport : INotifyPropertyChanging, INotifyPropertyChanged { @@ -216306,6 +223584,2058 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_DataIn_AccidentCauseReport")] + public partial class View_DataIn_AccidentCauseReport + { + + private string _AccidentCauseReportItemId; + + private string _AccidentCauseReportId; + + private string _AccidentType; + + private System.Nullable _TotalDeath; + + private System.Nullable _TotalInjuries; + + private System.Nullable _TotalMinorInjuries; + + private System.Nullable _Death1; + + private System.Nullable _Injuries1; + + private System.Nullable _MinorInjuries1; + + private System.Nullable _Death2; + + private System.Nullable _Injuries2; + + private System.Nullable _MinorInjuries2; + + private System.Nullable _Death3; + + private System.Nullable _Injuries3; + + private System.Nullable _MinorInjuries3; + + private System.Nullable _Death4; + + private System.Nullable _Injuries4; + + private System.Nullable _MinorInjuries4; + + private System.Nullable _Death5; + + private System.Nullable _Injuries5; + + private System.Nullable _MinorInjuries5; + + private System.Nullable _Death6; + + private System.Nullable _Injuries6; + + private System.Nullable _MinorInjuries6; + + private System.Nullable _Death7; + + private System.Nullable _Injuries7; + + private System.Nullable _MinorInjuries7; + + private System.Nullable _Death8; + + private System.Nullable _Injuries8; + + private System.Nullable _MinorInjuries8; + + private System.Nullable _Death9; + + private System.Nullable _Injuries9; + + private System.Nullable _MinorInjuries9; + + private System.Nullable _Death10; + + private System.Nullable _Injuries10; + + private System.Nullable _MinorInjuries10; + + private System.Nullable _Death11; + + private System.Nullable _Injuries11; + + private System.Nullable _MinorInjuries11; + + private string _UnitId; + + private string _AccidentCauseReportCode; + + private System.Nullable _Year; + + private System.Nullable _Month; + + private System.Nullable _DeathAccident; + + private System.Nullable _DeathToll; + + private System.Nullable _InjuredAccident; + + private System.Nullable _InjuredToll; + + private System.Nullable _MinorWoundAccident; + + private System.Nullable _MinorWoundToll; + + private System.Nullable _AverageTotalHours; + + private System.Nullable _AverageManHours; + + private System.Nullable _TotalLossMan; + + private System.Nullable _LastMonthLossHoursTotal; + + private System.Nullable _KnockOffTotal; + + private System.Nullable _DirectLoss; + + private System.Nullable _IndirectLosses; + + private System.Nullable _TotalLoss; + + private System.Nullable _TotalLossTime; + + private string _FillCompanyPersonCharge; + + private string _TabPeople; + + private string _AuditPerson; + + private System.Nullable _FillingDate; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private string _UnitName; + + public View_DataIn_AccidentCauseReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentCauseReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string AccidentCauseReportItemId + { + get + { + return this._AccidentCauseReportItemId; + } + set + { + if ((this._AccidentCauseReportItemId != value)) + { + this._AccidentCauseReportItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentCauseReportId", DbType="NVarChar(50)")] + public string AccidentCauseReportId + { + get + { + return this._AccidentCauseReportId; + } + set + { + if ((this._AccidentCauseReportId != value)) + { + this._AccidentCauseReportId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentType", DbType="NVarChar(20)")] + public string AccidentType + { + get + { + return this._AccidentType; + } + set + { + if ((this._AccidentType != value)) + { + this._AccidentType = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalDeath", DbType="Int")] + public System.Nullable TotalDeath + { + get + { + return this._TotalDeath; + } + set + { + if ((this._TotalDeath != value)) + { + this._TotalDeath = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalInjuries", DbType="Int")] + public System.Nullable TotalInjuries + { + get + { + return this._TotalInjuries; + } + set + { + if ((this._TotalInjuries != value)) + { + this._TotalInjuries = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalMinorInjuries", DbType="Int")] + public System.Nullable TotalMinorInjuries + { + get + { + return this._TotalMinorInjuries; + } + set + { + if ((this._TotalMinorInjuries != value)) + { + this._TotalMinorInjuries = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death1", DbType="Int")] + public System.Nullable Death1 + { + get + { + return this._Death1; + } + set + { + if ((this._Death1 != value)) + { + this._Death1 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries1", DbType="Int")] + public System.Nullable Injuries1 + { + get + { + return this._Injuries1; + } + set + { + if ((this._Injuries1 != value)) + { + this._Injuries1 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries1", DbType="Int")] + public System.Nullable MinorInjuries1 + { + get + { + return this._MinorInjuries1; + } + set + { + if ((this._MinorInjuries1 != value)) + { + this._MinorInjuries1 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death2", DbType="Int")] + public System.Nullable Death2 + { + get + { + return this._Death2; + } + set + { + if ((this._Death2 != value)) + { + this._Death2 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries2", DbType="Int")] + public System.Nullable Injuries2 + { + get + { + return this._Injuries2; + } + set + { + if ((this._Injuries2 != value)) + { + this._Injuries2 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries2", DbType="Int")] + public System.Nullable MinorInjuries2 + { + get + { + return this._MinorInjuries2; + } + set + { + if ((this._MinorInjuries2 != value)) + { + this._MinorInjuries2 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death3", DbType="Int")] + public System.Nullable Death3 + { + get + { + return this._Death3; + } + set + { + if ((this._Death3 != value)) + { + this._Death3 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries3", DbType="Int")] + public System.Nullable Injuries3 + { + get + { + return this._Injuries3; + } + set + { + if ((this._Injuries3 != value)) + { + this._Injuries3 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries3", DbType="Int")] + public System.Nullable MinorInjuries3 + { + get + { + return this._MinorInjuries3; + } + set + { + if ((this._MinorInjuries3 != value)) + { + this._MinorInjuries3 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death4", DbType="Int")] + public System.Nullable Death4 + { + get + { + return this._Death4; + } + set + { + if ((this._Death4 != value)) + { + this._Death4 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries4", DbType="Int")] + public System.Nullable Injuries4 + { + get + { + return this._Injuries4; + } + set + { + if ((this._Injuries4 != value)) + { + this._Injuries4 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries4", DbType="Int")] + public System.Nullable MinorInjuries4 + { + get + { + return this._MinorInjuries4; + } + set + { + if ((this._MinorInjuries4 != value)) + { + this._MinorInjuries4 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death5", DbType="Int")] + public System.Nullable Death5 + { + get + { + return this._Death5; + } + set + { + if ((this._Death5 != value)) + { + this._Death5 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries5", DbType="Int")] + public System.Nullable Injuries5 + { + get + { + return this._Injuries5; + } + set + { + if ((this._Injuries5 != value)) + { + this._Injuries5 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries5", DbType="Int")] + public System.Nullable MinorInjuries5 + { + get + { + return this._MinorInjuries5; + } + set + { + if ((this._MinorInjuries5 != value)) + { + this._MinorInjuries5 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death6", DbType="Int")] + public System.Nullable Death6 + { + get + { + return this._Death6; + } + set + { + if ((this._Death6 != value)) + { + this._Death6 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries6", DbType="Int")] + public System.Nullable Injuries6 + { + get + { + return this._Injuries6; + } + set + { + if ((this._Injuries6 != value)) + { + this._Injuries6 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries6", DbType="Int")] + public System.Nullable MinorInjuries6 + { + get + { + return this._MinorInjuries6; + } + set + { + if ((this._MinorInjuries6 != value)) + { + this._MinorInjuries6 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death7", DbType="Int")] + public System.Nullable Death7 + { + get + { + return this._Death7; + } + set + { + if ((this._Death7 != value)) + { + this._Death7 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries7", DbType="Int")] + public System.Nullable Injuries7 + { + get + { + return this._Injuries7; + } + set + { + if ((this._Injuries7 != value)) + { + this._Injuries7 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries7", DbType="Int")] + public System.Nullable MinorInjuries7 + { + get + { + return this._MinorInjuries7; + } + set + { + if ((this._MinorInjuries7 != value)) + { + this._MinorInjuries7 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death8", DbType="Int")] + public System.Nullable Death8 + { + get + { + return this._Death8; + } + set + { + if ((this._Death8 != value)) + { + this._Death8 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries8", DbType="Int")] + public System.Nullable Injuries8 + { + get + { + return this._Injuries8; + } + set + { + if ((this._Injuries8 != value)) + { + this._Injuries8 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries8", DbType="Int")] + public System.Nullable MinorInjuries8 + { + get + { + return this._MinorInjuries8; + } + set + { + if ((this._MinorInjuries8 != value)) + { + this._MinorInjuries8 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death9", DbType="Int")] + public System.Nullable Death9 + { + get + { + return this._Death9; + } + set + { + if ((this._Death9 != value)) + { + this._Death9 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries9", DbType="Int")] + public System.Nullable Injuries9 + { + get + { + return this._Injuries9; + } + set + { + if ((this._Injuries9 != value)) + { + this._Injuries9 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries9", DbType="Int")] + public System.Nullable MinorInjuries9 + { + get + { + return this._MinorInjuries9; + } + set + { + if ((this._MinorInjuries9 != value)) + { + this._MinorInjuries9 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death10", DbType="Int")] + public System.Nullable Death10 + { + get + { + return this._Death10; + } + set + { + if ((this._Death10 != value)) + { + this._Death10 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries10", DbType="Int")] + public System.Nullable Injuries10 + { + get + { + return this._Injuries10; + } + set + { + if ((this._Injuries10 != value)) + { + this._Injuries10 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries10", DbType="Int")] + public System.Nullable MinorInjuries10 + { + get + { + return this._MinorInjuries10; + } + set + { + if ((this._MinorInjuries10 != value)) + { + this._MinorInjuries10 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Death11", DbType="Int")] + public System.Nullable Death11 + { + get + { + return this._Death11; + } + set + { + if ((this._Death11 != value)) + { + this._Death11 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Injuries11", DbType="Int")] + public System.Nullable Injuries11 + { + get + { + return this._Injuries11; + } + set + { + if ((this._Injuries11 != value)) + { + this._Injuries11 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorInjuries11", DbType="Int")] + public System.Nullable MinorInjuries11 + { + get + { + return this._MinorInjuries11; + } + set + { + if ((this._MinorInjuries11 != value)) + { + this._MinorInjuries11 = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentCauseReportCode", DbType="NVarChar(50)")] + public string AccidentCauseReportCode + { + get + { + return this._AccidentCauseReportCode; + } + set + { + if ((this._AccidentCauseReportCode != value)) + { + this._AccidentCauseReportCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this._Year = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")] + public System.Nullable Month + { + get + { + return this._Month; + } + set + { + if ((this._Month != value)) + { + this._Month = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathAccident", DbType="Int")] + public System.Nullable DeathAccident + { + get + { + return this._DeathAccident; + } + set + { + if ((this._DeathAccident != value)) + { + this._DeathAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathToll", DbType="Int")] + public System.Nullable DeathToll + { + get + { + return this._DeathToll; + } + set + { + if ((this._DeathToll != value)) + { + this._DeathToll = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InjuredAccident", DbType="Int")] + public System.Nullable InjuredAccident + { + get + { + return this._InjuredAccident; + } + set + { + if ((this._InjuredAccident != value)) + { + this._InjuredAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InjuredToll", DbType="Int")] + public System.Nullable InjuredToll + { + get + { + return this._InjuredToll; + } + set + { + if ((this._InjuredToll != value)) + { + this._InjuredToll = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorWoundAccident", DbType="Int")] + public System.Nullable MinorWoundAccident + { + get + { + return this._MinorWoundAccident; + } + set + { + if ((this._MinorWoundAccident != value)) + { + this._MinorWoundAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorWoundToll", DbType="Int")] + public System.Nullable MinorWoundToll + { + get + { + return this._MinorWoundToll; + } + set + { + if ((this._MinorWoundToll != value)) + { + this._MinorWoundToll = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AverageTotalHours", DbType="Decimal(19,2)")] + public System.Nullable AverageTotalHours + { + get + { + return this._AverageTotalHours; + } + set + { + if ((this._AverageTotalHours != value)) + { + this._AverageTotalHours = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AverageManHours", DbType="Int")] + public System.Nullable AverageManHours + { + get + { + return this._AverageManHours; + } + set + { + if ((this._AverageManHours != value)) + { + this._AverageManHours = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLossMan", DbType="Int")] + public System.Nullable TotalLossMan + { + get + { + return this._TotalLossMan; + } + set + { + if ((this._TotalLossMan != value)) + { + this._TotalLossMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastMonthLossHoursTotal", DbType="Int")] + public System.Nullable LastMonthLossHoursTotal + { + get + { + return this._LastMonthLossHoursTotal; + } + set + { + if ((this._LastMonthLossHoursTotal != value)) + { + this._LastMonthLossHoursTotal = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KnockOffTotal", DbType="Int")] + public System.Nullable KnockOffTotal + { + get + { + return this._KnockOffTotal; + } + set + { + if ((this._KnockOffTotal != value)) + { + this._KnockOffTotal = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DirectLoss", DbType="Int")] + public System.Nullable DirectLoss + { + get + { + return this._DirectLoss; + } + set + { + if ((this._DirectLoss != value)) + { + this._DirectLoss = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IndirectLosses", DbType="Int")] + public System.Nullable IndirectLosses + { + get + { + return this._IndirectLosses; + } + set + { + if ((this._IndirectLosses != value)) + { + this._IndirectLosses = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLoss", DbType="Int")] + public System.Nullable TotalLoss + { + get + { + return this._TotalLoss; + } + set + { + if ((this._TotalLoss != value)) + { + this._TotalLoss = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLossTime", DbType="Int")] + public System.Nullable TotalLossTime + { + get + { + return this._TotalLossTime; + } + set + { + if ((this._TotalLossTime != value)) + { + this._TotalLossTime = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillCompanyPersonCharge", DbType="NVarChar(50)")] + public string FillCompanyPersonCharge + { + get + { + return this._FillCompanyPersonCharge; + } + set + { + if ((this._FillCompanyPersonCharge != value)) + { + this._FillCompanyPersonCharge = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TabPeople", DbType="NVarChar(50)")] + public string TabPeople + { + get + { + return this._TabPeople; + } + set + { + if ((this._TabPeople != value)) + { + this._TabPeople = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditPerson", DbType="NVarChar(50)")] + public string AuditPerson + { + get + { + return this._AuditPerson; + } + set + { + if ((this._AuditPerson != value)) + { + this._AuditPerson = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this._FillingDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_DataIn_MillionsMonthlyReport")] + public partial class View_DataIn_MillionsMonthlyReport + { + + private string _MillionsMonthlyReportItemId; + + private string _MillionsMonthlyReportId; + + private System.Nullable _SortIndex; + + private string _Affiliation; + + private string _Name; + + private System.Nullable _PostPersonNum; + + private System.Nullable _SnapPersonNum; + + private System.Nullable _ContractorNum; + + private System.Nullable _SumPersonNum; + + private System.Nullable _TotalWorkNum; + + private System.Nullable _SeriousInjuriesNum; + + private System.Nullable _SeriousInjuriesPersonNum; + + private System.Nullable _SeriousInjuriesLossHour; + + private System.Nullable _MinorAccidentNum; + + private System.Nullable _MinorAccidentPersonNum; + + private System.Nullable _MinorAccidentLossHour; + + private System.Nullable _OtherAccidentNum; + + private System.Nullable _OtherAccidentPersonNum; + + private System.Nullable _OtherAccidentLossHour; + + private System.Nullable _RestrictedWorkPersonNum; + + private System.Nullable _RestrictedWorkLossHour; + + private System.Nullable _MedicalTreatmentPersonNum; + + private System.Nullable _MedicalTreatmentLossHour; + + private System.Nullable _FireNum; + + private System.Nullable _ExplosionNum; + + private System.Nullable _TrafficNum; + + private System.Nullable _EquipmentNum; + + private System.Nullable _QualityNum; + + private System.Nullable _OtherNum; + + private System.Nullable _FirstAidDressingsNum; + + private System.Nullable _AttemptedEventNum; + + private System.Nullable _LossDayNum; + + private string _UnitId; + + private System.Nullable _Year; + + private System.Nullable _Month; + + private string _FillingMan; + + private System.Nullable _FillingDate; + + private string _DutyPerson; + + private System.Nullable _RecordableIncidentRate; + + private System.Nullable _LostTimeRate; + + private System.Nullable _LostTimeInjuryRate; + + private System.Nullable _DeathAccidentFrequency; + + private System.Nullable _AccidentMortality; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private string _UnitName; + + public View_DataIn_MillionsMonthlyReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MillionsMonthlyReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string MillionsMonthlyReportItemId + { + get + { + return this._MillionsMonthlyReportItemId; + } + set + { + if ((this._MillionsMonthlyReportItemId != value)) + { + this._MillionsMonthlyReportItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MillionsMonthlyReportId", DbType="NVarChar(50)")] + public string MillionsMonthlyReportId + { + get + { + return this._MillionsMonthlyReportId; + } + set + { + if ((this._MillionsMonthlyReportId != value)) + { + this._MillionsMonthlyReportId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this._SortIndex = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Affiliation", DbType="NVarChar(500)")] + public string Affiliation + { + get + { + return this._Affiliation; + } + set + { + if ((this._Affiliation != value)) + { + this._Affiliation = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(500)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this._Name = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PostPersonNum", DbType="Int")] + public System.Nullable PostPersonNum + { + get + { + return this._PostPersonNum; + } + set + { + if ((this._PostPersonNum != value)) + { + this._PostPersonNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SnapPersonNum", DbType="Int")] + public System.Nullable SnapPersonNum + { + get + { + return this._SnapPersonNum; + } + set + { + if ((this._SnapPersonNum != value)) + { + this._SnapPersonNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractorNum", DbType="Int")] + public System.Nullable ContractorNum + { + get + { + return this._ContractorNum; + } + set + { + if ((this._ContractorNum != value)) + { + this._ContractorNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SumPersonNum", DbType="Int")] + public System.Nullable SumPersonNum + { + get + { + return this._SumPersonNum; + } + set + { + if ((this._SumPersonNum != value)) + { + this._SumPersonNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalWorkNum", DbType="Decimal(18,4)")] + public System.Nullable TotalWorkNum + { + get + { + return this._TotalWorkNum; + } + set + { + if ((this._TotalWorkNum != value)) + { + this._TotalWorkNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuriesNum", DbType="Int")] + public System.Nullable SeriousInjuriesNum + { + get + { + return this._SeriousInjuriesNum; + } + set + { + if ((this._SeriousInjuriesNum != value)) + { + this._SeriousInjuriesNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuriesPersonNum", DbType="Int")] + public System.Nullable SeriousInjuriesPersonNum + { + get + { + return this._SeriousInjuriesPersonNum; + } + set + { + if ((this._SeriousInjuriesPersonNum != value)) + { + this._SeriousInjuriesPersonNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuriesLossHour", DbType="Int")] + public System.Nullable SeriousInjuriesLossHour + { + get + { + return this._SeriousInjuriesLossHour; + } + set + { + if ((this._SeriousInjuriesLossHour != value)) + { + this._SeriousInjuriesLossHour = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorAccidentNum", DbType="Int")] + public System.Nullable MinorAccidentNum + { + get + { + return this._MinorAccidentNum; + } + set + { + if ((this._MinorAccidentNum != value)) + { + this._MinorAccidentNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorAccidentPersonNum", DbType="Int")] + public System.Nullable MinorAccidentPersonNum + { + get + { + return this._MinorAccidentPersonNum; + } + set + { + if ((this._MinorAccidentPersonNum != value)) + { + this._MinorAccidentPersonNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorAccidentLossHour", DbType="Int")] + public System.Nullable MinorAccidentLossHour + { + get + { + return this._MinorAccidentLossHour; + } + set + { + if ((this._MinorAccidentLossHour != value)) + { + this._MinorAccidentLossHour = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherAccidentNum", DbType="Int")] + public System.Nullable OtherAccidentNum + { + get + { + return this._OtherAccidentNum; + } + set + { + if ((this._OtherAccidentNum != value)) + { + this._OtherAccidentNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherAccidentPersonNum", DbType="Int")] + public System.Nullable OtherAccidentPersonNum + { + get + { + return this._OtherAccidentPersonNum; + } + set + { + if ((this._OtherAccidentPersonNum != value)) + { + this._OtherAccidentPersonNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherAccidentLossHour", DbType="Int")] + public System.Nullable OtherAccidentLossHour + { + get + { + return this._OtherAccidentLossHour; + } + set + { + if ((this._OtherAccidentLossHour != value)) + { + this._OtherAccidentLossHour = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RestrictedWorkPersonNum", DbType="Int")] + public System.Nullable RestrictedWorkPersonNum + { + get + { + return this._RestrictedWorkPersonNum; + } + set + { + if ((this._RestrictedWorkPersonNum != value)) + { + this._RestrictedWorkPersonNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RestrictedWorkLossHour", DbType="Int")] + public System.Nullable RestrictedWorkLossHour + { + get + { + return this._RestrictedWorkLossHour; + } + set + { + if ((this._RestrictedWorkLossHour != value)) + { + this._RestrictedWorkLossHour = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MedicalTreatmentPersonNum", DbType="Int")] + public System.Nullable MedicalTreatmentPersonNum + { + get + { + return this._MedicalTreatmentPersonNum; + } + set + { + if ((this._MedicalTreatmentPersonNum != value)) + { + this._MedicalTreatmentPersonNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MedicalTreatmentLossHour", DbType="Int")] + public System.Nullable MedicalTreatmentLossHour + { + get + { + return this._MedicalTreatmentLossHour; + } + set + { + if ((this._MedicalTreatmentLossHour != value)) + { + this._MedicalTreatmentLossHour = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireNum", DbType="Int")] + public System.Nullable FireNum + { + get + { + return this._FireNum; + } + set + { + if ((this._FireNum != value)) + { + this._FireNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExplosionNum", DbType="Int")] + public System.Nullable ExplosionNum + { + get + { + return this._ExplosionNum; + } + set + { + if ((this._ExplosionNum != value)) + { + this._ExplosionNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrafficNum", DbType="Int")] + public System.Nullable TrafficNum + { + get + { + return this._TrafficNum; + } + set + { + if ((this._TrafficNum != value)) + { + this._TrafficNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentNum", DbType="Int")] + public System.Nullable EquipmentNum + { + get + { + return this._EquipmentNum; + } + set + { + if ((this._EquipmentNum != value)) + { + this._EquipmentNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityNum", DbType="Int")] + public System.Nullable QualityNum + { + get + { + return this._QualityNum; + } + set + { + if ((this._QualityNum != value)) + { + this._QualityNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OtherNum", DbType="Int")] + public System.Nullable OtherNum + { + get + { + return this._OtherNum; + } + set + { + if ((this._OtherNum != value)) + { + this._OtherNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FirstAidDressingsNum", DbType="Int")] + public System.Nullable FirstAidDressingsNum + { + get + { + return this._FirstAidDressingsNum; + } + set + { + if ((this._FirstAidDressingsNum != value)) + { + this._FirstAidDressingsNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttemptedEventNum", DbType="Int")] + public System.Nullable AttemptedEventNum + { + get + { + return this._AttemptedEventNum; + } + set + { + if ((this._AttemptedEventNum != value)) + { + this._AttemptedEventNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LossDayNum", DbType="Int")] + public System.Nullable LossDayNum + { + get + { + return this._LossDayNum; + } + set + { + if ((this._LossDayNum != value)) + { + this._LossDayNum = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this._Year = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")] + public System.Nullable Month + { + get + { + return this._Month; + } + set + { + if ((this._Month != value)) + { + this._Month = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingMan", DbType="NVarChar(50)")] + public string FillingMan + { + get + { + return this._FillingMan; + } + set + { + if ((this._FillingMan != value)) + { + this._FillingMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this._FillingDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyPerson", DbType="NVarChar(50)")] + public string DutyPerson + { + get + { + return this._DutyPerson; + } + set + { + if ((this._DutyPerson != value)) + { + this._DutyPerson = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordableIncidentRate", DbType="Decimal(18,4)")] + public System.Nullable RecordableIncidentRate + { + get + { + return this._RecordableIncidentRate; + } + set + { + if ((this._RecordableIncidentRate != value)) + { + this._RecordableIncidentRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LostTimeRate", DbType="Decimal(18,4)")] + public System.Nullable LostTimeRate + { + get + { + return this._LostTimeRate; + } + set + { + if ((this._LostTimeRate != value)) + { + this._LostTimeRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LostTimeInjuryRate", DbType="Decimal(18,4)")] + public System.Nullable LostTimeInjuryRate + { + get + { + return this._LostTimeInjuryRate; + } + set + { + if ((this._LostTimeInjuryRate != value)) + { + this._LostTimeInjuryRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathAccidentFrequency", DbType="Decimal(18,4)")] + public System.Nullable DeathAccidentFrequency + { + get + { + return this._DeathAccidentFrequency; + } + set + { + if ((this._DeathAccidentFrequency != value)) + { + this._DeathAccidentFrequency = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentMortality", DbType="Decimal(18,4)")] + public System.Nullable AccidentMortality + { + get + { + return this._AccidentMortality; + } + set + { + if ((this._AccidentMortality != value)) + { + this._AccidentMortality = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_DayRportView")] public partial class View_DayRportView { @@ -224189,7 +233519,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CanWelderCode", DbType="NVarChar(1000)")] public string CanWelderCode { get @@ -228222,6 +237552,3759 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_AccidentCauseReport")] + public partial class View_Information_AccidentCauseReport + { + + private string _AccidentCauseReportId; + + private string _UnitId; + + private string _UnitName; + + private System.Nullable _FillingDate; + + private string _ReportDate; + + private string _YearStr; + + private string _MonthStr; + + private string _AccidentCauseReportCode; + + private System.Nullable _Year; + + private System.Nullable _Month; + + private System.Nullable _DeathAccident; + + private System.Nullable _DeathToll; + + private System.Nullable _InjuredAccident; + + private System.Nullable _InjuredToll; + + private System.Nullable _MinorWoundAccident; + + private System.Nullable _MinorWoundToll; + + private System.Nullable _AverageTotalHours; + + private System.Nullable _AverageManHours; + + private System.Nullable _TotalLossMan; + + private System.Nullable _LastMonthLossHoursTotal; + + private System.Nullable _KnockOffTotal; + + private System.Nullable _DirectLoss; + + private System.Nullable _IndirectLosses; + + private System.Nullable _TotalLoss; + + private System.Nullable _TotalLossTime; + + private string _FillCompanyPersonCharge; + + private string _TabPeople; + + private string _AuditPerson; + + private string _UpState; + + private string _HandleState; + + private string _UserName; + + public View_Information_AccidentCauseReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentCauseReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string AccidentCauseReportId + { + get + { + return this._AccidentCauseReportId; + } + set + { + if ((this._AccidentCauseReportId != value)) + { + this._AccidentCauseReportId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this._FillingDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this._ReportDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearStr", DbType="NVarChar(100)")] + public string YearStr + { + get + { + return this._YearStr; + } + set + { + if ((this._YearStr != value)) + { + this._YearStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthStr", DbType="NVarChar(100)")] + public string MonthStr + { + get + { + return this._MonthStr; + } + set + { + if ((this._MonthStr != value)) + { + this._MonthStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentCauseReportCode", DbType="NVarChar(50)")] + public string AccidentCauseReportCode + { + get + { + return this._AccidentCauseReportCode; + } + set + { + if ((this._AccidentCauseReportCode != value)) + { + this._AccidentCauseReportCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this._Year = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")] + public System.Nullable Month + { + get + { + return this._Month; + } + set + { + if ((this._Month != value)) + { + this._Month = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathAccident", DbType="Int")] + public System.Nullable DeathAccident + { + get + { + return this._DeathAccident; + } + set + { + if ((this._DeathAccident != value)) + { + this._DeathAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathToll", DbType="Int")] + public System.Nullable DeathToll + { + get + { + return this._DeathToll; + } + set + { + if ((this._DeathToll != value)) + { + this._DeathToll = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InjuredAccident", DbType="Int")] + public System.Nullable InjuredAccident + { + get + { + return this._InjuredAccident; + } + set + { + if ((this._InjuredAccident != value)) + { + this._InjuredAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InjuredToll", DbType="Int")] + public System.Nullable InjuredToll + { + get + { + return this._InjuredToll; + } + set + { + if ((this._InjuredToll != value)) + { + this._InjuredToll = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorWoundAccident", DbType="Int")] + public System.Nullable MinorWoundAccident + { + get + { + return this._MinorWoundAccident; + } + set + { + if ((this._MinorWoundAccident != value)) + { + this._MinorWoundAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MinorWoundToll", DbType="Int")] + public System.Nullable MinorWoundToll + { + get + { + return this._MinorWoundToll; + } + set + { + if ((this._MinorWoundToll != value)) + { + this._MinorWoundToll = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AverageTotalHours", DbType="Decimal(19,2)")] + public System.Nullable AverageTotalHours + { + get + { + return this._AverageTotalHours; + } + set + { + if ((this._AverageTotalHours != value)) + { + this._AverageTotalHours = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AverageManHours", DbType="Int")] + public System.Nullable AverageManHours + { + get + { + return this._AverageManHours; + } + set + { + if ((this._AverageManHours != value)) + { + this._AverageManHours = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLossMan", DbType="Int")] + public System.Nullable TotalLossMan + { + get + { + return this._TotalLossMan; + } + set + { + if ((this._TotalLossMan != value)) + { + this._TotalLossMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LastMonthLossHoursTotal", DbType="Int")] + public System.Nullable LastMonthLossHoursTotal + { + get + { + return this._LastMonthLossHoursTotal; + } + set + { + if ((this._LastMonthLossHoursTotal != value)) + { + this._LastMonthLossHoursTotal = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KnockOffTotal", DbType="Int")] + public System.Nullable KnockOffTotal + { + get + { + return this._KnockOffTotal; + } + set + { + if ((this._KnockOffTotal != value)) + { + this._KnockOffTotal = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DirectLoss", DbType="Int")] + public System.Nullable DirectLoss + { + get + { + return this._DirectLoss; + } + set + { + if ((this._DirectLoss != value)) + { + this._DirectLoss = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IndirectLosses", DbType="Int")] + public System.Nullable IndirectLosses + { + get + { + return this._IndirectLosses; + } + set + { + if ((this._IndirectLosses != value)) + { + this._IndirectLosses = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLoss", DbType="Int")] + public System.Nullable TotalLoss + { + get + { + return this._TotalLoss; + } + set + { + if ((this._TotalLoss != value)) + { + this._TotalLoss = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalLossTime", DbType="Int")] + public System.Nullable TotalLossTime + { + get + { + return this._TotalLossTime; + } + set + { + if ((this._TotalLossTime != value)) + { + this._TotalLossTime = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillCompanyPersonCharge", DbType="NVarChar(50)")] + public string FillCompanyPersonCharge + { + get + { + return this._FillCompanyPersonCharge; + } + set + { + if ((this._FillCompanyPersonCharge != value)) + { + this._FillCompanyPersonCharge = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TabPeople", DbType="NVarChar(50)")] + public string TabPeople + { + get + { + return this._TabPeople; + } + set + { + if ((this._TabPeople != value)) + { + this._TabPeople = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditPerson", DbType="NVarChar(50)")] + public string AuditPerson + { + get + { + return this._AuditPerson; + } + set + { + if ((this._AuditPerson != value)) + { + this._AuditPerson = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(200)")] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this._UserName = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_DrillConductedQuarterlyReport")] + public partial class View_Information_DrillConductedQuarterlyReport + { + + private string _DrillConductedQuarterlyReportId; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _YearId; + + private System.Nullable _Quarter; + + private string _UpState; + + private string _HandleState; + + private string _Quarters; + + private string _UnitName; + + private string _HandleMan; + + private string _UserName; + + public View_Information_DrillConductedQuarterlyReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillConductedQuarterlyReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DrillConductedQuarterlyReportId + { + get + { + return this._DrillConductedQuarterlyReportId; + } + set + { + if ((this._DrillConductedQuarterlyReportId != value)) + { + this._DrillConductedQuarterlyReportId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this._ReportDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this._YearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this._Quarter = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string Quarters + { + get + { + return this._Quarters; + } + set + { + if ((this._Quarters != value)) + { + this._Quarters = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(200)")] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this._UserName = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_DrillConductedQuarterlyReportItem")] + public partial class View_Information_DrillConductedQuarterlyReportItem + { + + private string _DrillConductedQuarterlyReportItemId; + + private string _DrillConductedQuarterlyReportId; + + private string _IndustryType; + + private System.Nullable _TotalConductCount; + + private System.Nullable _TotalPeopleCount; + + private System.Nullable _TotalInvestment; + + private System.Nullable _HQConductCount; + + private System.Nullable _HQPeopleCount; + + private System.Nullable _HQInvestment; + + private System.Nullable _BasicConductCount; + + private System.Nullable _BasicPeopleCount; + + private System.Nullable _BasicInvestment; + + private System.Nullable _ComprehensivePractice; + + private System.Nullable _CPScene; + + private System.Nullable _CPDesktop; + + private System.Nullable _SpecialDrill; + + private System.Nullable _SDScene; + + private System.Nullable _SDDesktop; + + private System.Nullable _SortIndex; + + private string _UnitId; + + private System.Nullable _ReportDate; + + private System.Nullable _Quarter; + + private System.Nullable _YearId; + + private string _CompileMan; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private string _UnitName; + + public View_Information_DrillConductedQuarterlyReportItem() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillConductedQuarterlyReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DrillConductedQuarterlyReportItemId + { + get + { + return this._DrillConductedQuarterlyReportItemId; + } + set + { + if ((this._DrillConductedQuarterlyReportItemId != value)) + { + this._DrillConductedQuarterlyReportItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillConductedQuarterlyReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DrillConductedQuarterlyReportId + { + get + { + return this._DrillConductedQuarterlyReportId; + } + set + { + if ((this._DrillConductedQuarterlyReportId != value)) + { + this._DrillConductedQuarterlyReportId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IndustryType", DbType="NVarChar(50)")] + public string IndustryType + { + get + { + return this._IndustryType; + } + set + { + if ((this._IndustryType != value)) + { + this._IndustryType = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalConductCount", DbType="Int")] + public System.Nullable TotalConductCount + { + get + { + return this._TotalConductCount; + } + set + { + if ((this._TotalConductCount != value)) + { + this._TotalConductCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalPeopleCount", DbType="Int")] + public System.Nullable TotalPeopleCount + { + get + { + return this._TotalPeopleCount; + } + set + { + if ((this._TotalPeopleCount != value)) + { + this._TotalPeopleCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalInvestment", DbType="Money")] + public System.Nullable TotalInvestment + { + get + { + return this._TotalInvestment; + } + set + { + if ((this._TotalInvestment != value)) + { + this._TotalInvestment = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HQConductCount", DbType="Int")] + public System.Nullable HQConductCount + { + get + { + return this._HQConductCount; + } + set + { + if ((this._HQConductCount != value)) + { + this._HQConductCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HQPeopleCount", DbType="Int")] + public System.Nullable HQPeopleCount + { + get + { + return this._HQPeopleCount; + } + set + { + if ((this._HQPeopleCount != value)) + { + this._HQPeopleCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HQInvestment", DbType="Money")] + public System.Nullable HQInvestment + { + get + { + return this._HQInvestment; + } + set + { + if ((this._HQInvestment != value)) + { + this._HQInvestment = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BasicConductCount", DbType="Int")] + public System.Nullable BasicConductCount + { + get + { + return this._BasicConductCount; + } + set + { + if ((this._BasicConductCount != value)) + { + this._BasicConductCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BasicPeopleCount", DbType="Int")] + public System.Nullable BasicPeopleCount + { + get + { + return this._BasicPeopleCount; + } + set + { + if ((this._BasicPeopleCount != value)) + { + this._BasicPeopleCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BasicInvestment", DbType="Money")] + public System.Nullable BasicInvestment + { + get + { + return this._BasicInvestment; + } + set + { + if ((this._BasicInvestment != value)) + { + this._BasicInvestment = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ComprehensivePractice", DbType="Int")] + public System.Nullable ComprehensivePractice + { + get + { + return this._ComprehensivePractice; + } + set + { + if ((this._ComprehensivePractice != value)) + { + this._ComprehensivePractice = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CPScene", DbType="Int")] + public System.Nullable CPScene + { + get + { + return this._CPScene; + } + set + { + if ((this._CPScene != value)) + { + this._CPScene = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CPDesktop", DbType="Int")] + public System.Nullable CPDesktop + { + get + { + return this._CPDesktop; + } + set + { + if ((this._CPDesktop != value)) + { + this._CPDesktop = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialDrill", DbType="Int")] + public System.Nullable SpecialDrill + { + get + { + return this._SpecialDrill; + } + set + { + if ((this._SpecialDrill != value)) + { + this._SpecialDrill = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SDScene", DbType="Int")] + public System.Nullable SDScene + { + get + { + return this._SDScene; + } + set + { + if ((this._SDScene != value)) + { + this._SDScene = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SDDesktop", DbType="Int")] + public System.Nullable SDDesktop + { + get + { + return this._SDDesktop; + } + set + { + if ((this._SDDesktop != value)) + { + this._SDDesktop = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this._SortIndex = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")] + public System.Nullable ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this._ReportDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarter", DbType="Int")] + public System.Nullable Quarter + { + get + { + return this._Quarter; + } + set + { + if ((this._Quarter != value)) + { + this._Quarter = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this._YearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_DrillPlanHalfYearReport")] + public partial class View_Information_DrillPlanHalfYearReport + { + + private string _DrillPlanHalfYearReportId; + + private string _UnitId; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private string _Telephone; + + private System.Nullable _YearId; + + private System.Nullable _HalfYearId; + + private string _UpState; + + private string _HandleState; + + private string _Years; + + private string _UnitName; + + private string _UserName; + + private string _HandleMan; + + private string _HandleManName; + + public View_Information_DrillPlanHalfYearReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanHalfYearReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DrillPlanHalfYearReportId + { + get + { + return this._DrillPlanHalfYearReportId; + } + set + { + if ((this._DrillPlanHalfYearReportId != value)) + { + this._DrillPlanHalfYearReportId = value; + } + } + } + + [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)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this._CompileDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Telephone", DbType="NVarChar(50)")] + public string Telephone + { + get + { + return this._Telephone; + } + set + { + if ((this._Telephone != value)) + { + this._Telephone = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this._YearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HalfYearId", DbType="Int")] + public System.Nullable HalfYearId + { + get + { + return this._HalfYearId; + } + set + { + if ((this._HalfYearId != value)) + { + this._HalfYearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Years", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string Years + { + get + { + return this._Years; + } + set + { + if ((this._Years != value)) + { + this._Years = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(200)")] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this._UserName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleManName", DbType="NVarChar(200)")] + public string HandleManName + { + get + { + return this._HandleManName; + } + set + { + if ((this._HandleManName != value)) + { + this._HandleManName = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_DrillPlanHalfYearReportItem")] + public partial class View_Information_DrillPlanHalfYearReportItem + { + + private string _DrillPlanHalfYearReportItemId; + + private string _DrillPlanHalfYearReportId; + + private string _DrillPlanName; + + private string _OrganizationUnit; + + private string _DrillPlanDate; + + private string _AccidentScene; + + private string _ExerciseWay; + + private System.Nullable _SortIndex; + + private string _UnitId; + + private string _CompileMan; + + private System.Nullable _CompileDate; + + private System.Nullable _YearId; + + private System.Nullable _HalfYearId; + + private string _Telephone; + + private string _UpState; + + private string _HandleState; + + private string _HandleMan; + + private string _UnitName; + + public View_Information_DrillPlanHalfYearReportItem() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanHalfYearReportItemId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DrillPlanHalfYearReportItemId + { + get + { + return this._DrillPlanHalfYearReportItemId; + } + set + { + if ((this._DrillPlanHalfYearReportItemId != value)) + { + this._DrillPlanHalfYearReportItemId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanHalfYearReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string DrillPlanHalfYearReportId + { + get + { + return this._DrillPlanHalfYearReportId; + } + set + { + if ((this._DrillPlanHalfYearReportId != value)) + { + this._DrillPlanHalfYearReportId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanName", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string DrillPlanName + { + get + { + return this._DrillPlanName; + } + set + { + if ((this._DrillPlanName != value)) + { + this._DrillPlanName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrganizationUnit", DbType="NVarChar(100)")] + public string OrganizationUnit + { + get + { + return this._OrganizationUnit; + } + set + { + if ((this._OrganizationUnit != value)) + { + this._OrganizationUnit = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DrillPlanDate", DbType="NVarChar(50)")] + public string DrillPlanDate + { + get + { + return this._DrillPlanDate; + } + set + { + if ((this._DrillPlanDate != value)) + { + this._DrillPlanDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentScene", DbType="NVarChar(1000)")] + public string AccidentScene + { + get + { + return this._AccidentScene; + } + set + { + if ((this._AccidentScene != value)) + { + this._AccidentScene = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ExerciseWay", DbType="NVarChar(50)")] + public string ExerciseWay + { + get + { + return this._ExerciseWay; + } + set + { + if ((this._ExerciseWay != value)) + { + this._ExerciseWay = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")] + public System.Nullable SortIndex + { + get + { + return this._SortIndex; + } + set + { + if ((this._SortIndex != value)) + { + this._SortIndex = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this._CompileMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this._CompileDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this._YearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HalfYearId", DbType="Int")] + public System.Nullable HalfYearId + { + get + { + return this._HalfYearId; + } + set + { + if ((this._HalfYearId != value)) + { + this._HalfYearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Telephone", DbType="NVarChar(50)")] + public string Telephone + { + get + { + return this._Telephone; + } + set + { + if ((this._Telephone != value)) + { + this._Telephone = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_MillionsMonthlyReport")] + public partial class View_Information_MillionsMonthlyReport + { + + private string _MillionsMonthlyReportId; + + private string _UnitId; + + private System.Nullable _FillingDate; + + private string _UpState; + + private string _ReportDate; + + private string _YearStr; + + private string _MonthStr; + + private string _UnitName; + + private System.Nullable _Year; + + private System.Nullable _Month; + + private string _DutyPerson; + + private System.Nullable _RecordableIncidentRate; + + private System.Nullable _LostTimeRate; + + private System.Nullable _LostTimeInjuryRate; + + private System.Nullable _DeathAccidentFrequency; + + private System.Nullable _AccidentMortality; + + private string _HandleState; + + private string _HandleMan; + + private string _UserName; + + public View_Information_MillionsMonthlyReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MillionsMonthlyReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string MillionsMonthlyReportId + { + get + { + return this._MillionsMonthlyReportId; + } + set + { + if ((this._MillionsMonthlyReportId != value)) + { + this._MillionsMonthlyReportId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this._FillingDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="NVarChar(200) NOT NULL", CanBeNull=false)] + public string ReportDate + { + get + { + return this._ReportDate; + } + set + { + if ((this._ReportDate != value)) + { + this._ReportDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearStr", DbType="NVarChar(100)")] + public string YearStr + { + get + { + return this._YearStr; + } + set + { + if ((this._YearStr != value)) + { + this._YearStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MonthStr", DbType="NVarChar(100)")] + public string MonthStr + { + get + { + return this._MonthStr; + } + set + { + if ((this._MonthStr != value)) + { + this._MonthStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Year", DbType="Int")] + public System.Nullable Year + { + get + { + return this._Year; + } + set + { + if ((this._Year != value)) + { + this._Year = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Month", DbType="Int")] + public System.Nullable Month + { + get + { + return this._Month; + } + set + { + if ((this._Month != value)) + { + this._Month = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyPerson", DbType="NVarChar(50)")] + public string DutyPerson + { + get + { + return this._DutyPerson; + } + set + { + if ((this._DutyPerson != value)) + { + this._DutyPerson = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RecordableIncidentRate", DbType="Decimal(18,4)")] + public System.Nullable RecordableIncidentRate + { + get + { + return this._RecordableIncidentRate; + } + set + { + if ((this._RecordableIncidentRate != value)) + { + this._RecordableIncidentRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LostTimeRate", DbType="Decimal(18,4)")] + public System.Nullable LostTimeRate + { + get + { + return this._LostTimeRate; + } + set + { + if ((this._LostTimeRate != value)) + { + this._LostTimeRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LostTimeInjuryRate", DbType="Decimal(18,4)")] + public System.Nullable LostTimeInjuryRate + { + get + { + return this._LostTimeInjuryRate; + } + set + { + if ((this._LostTimeInjuryRate != value)) + { + this._LostTimeInjuryRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeathAccidentFrequency", DbType="Decimal(18,4)")] + public System.Nullable DeathAccidentFrequency + { + get + { + return this._DeathAccidentFrequency; + } + set + { + if ((this._DeathAccidentFrequency != value)) + { + this._DeathAccidentFrequency = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentMortality", DbType="Decimal(18,4)")] + public System.Nullable AccidentMortality + { + get + { + return this._AccidentMortality; + } + set + { + if ((this._AccidentMortality != value)) + { + this._AccidentMortality = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(200)")] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this._UserName = value; + } + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_Information_SafetyQuarterlyReport")] + public partial class View_Information_SafetyQuarterlyReport + { + + private string _SafetyQuarterlyReportId; + + private string _UnitId; + + private System.Nullable _YearId; + + private System.Nullable _Quarters; + + private string _UpState; + + private string _QuartersStr; + + private string _UnitName; + + private System.Nullable _TotalInWorkHours; + + private string _TotalInWorkHoursRemark; + + private System.Nullable _TotalOutWorkHours; + + private string _TotalOutWorkHoursRemark; + + private System.Nullable _WorkHoursLossRate; + + private string _WorkHoursLossRateRemark; + + private System.Nullable _WorkHoursAccuracy; + + private string _WorkHoursAccuracyRemark; + + private System.Nullable _MainBusinessIncome; + + private string _MainBusinessIncomeRemark; + + private System.Nullable _ConstructionRevenue; + + private string _ConstructionRevenueRemark; + + private System.Nullable _UnitTimeIncome; + + private string _UnitTimeIncomeRemark; + + private System.Nullable _BillionsOutputMortality; + + private string _BillionsOutputMortalityRemark; + + private System.Nullable _MajorFireAccident; + + private string _MajorFireAccidentRemark; + + private System.Nullable _MajorEquipAccident; + + private string _MajorEquipAccidentRemark; + + private System.Nullable _AccidentFrequency; + + private string _AccidentFrequencyRemark; + + private System.Nullable _SeriousInjuryAccident; + + private string _SeriousInjuryAccidentRemark; + + private System.Nullable _FireAccident; + + private string _FireAccidentRemark; + + private System.Nullable _EquipmentAccident; + + private string _EquipmentAccidentRemark; + + private System.Nullable _PoisoningAndInjuries; + + private string _PoisoningAndInjuriesRemark; + + private System.Nullable _ProductionSafetyInTotal; + + private string _ProductionSafetyInTotalRemark; + + private System.Nullable _ProtectionInput; + + private string _ProtectionInputRemark; + + private System.Nullable _LaboAndHealthIn; + + private string _LaborAndHealthInRemark; + + private System.Nullable _TechnologyProgressIn; + + private string _TechnologyProgressInRemark; + + private System.Nullable _EducationTrainIn; + + private string _EducationTrainInRemark; + + private System.Nullable _ProjectCostRate; + + private string _ProjectCostRateRemark; + + private System.Nullable _ProductionInput; + + private string _ProductionInputRemark; + + private System.Nullable _Revenue; + + private string _RevenueRemark; + + private System.Nullable _FullTimeMan; + + private string _FullTimeManRemark; + + private string _FullTimeManAttachUrl; + + private System.Nullable _PMMan; + + private string _PMManRemark; + + private string _PMManAttachUrl; + + private System.Nullable _CorporateDirectorEdu; + + private string _CorporateDirectorEduRemark; + + private System.Nullable _ProjectLeaderEdu; + + private string _ProjectLeaderEduRemark; + + private System.Nullable _FullTimeEdu; + + private string _FullTimeEduRemark; + + private System.Nullable _ThreeKidsEduRate; + + private string _ThreeKidsEduRateRemark; + + private System.Nullable _UplinReportRate; + + private string _UplinReportRateRemark; + + private string _Remarks; + + private System.Nullable _FillingDate; + + private System.Nullable _KeyEquipmentTotal; + + private string _KeyEquipmentTotalRemark; + + private System.Nullable _KeyEquipmentReportCount; + + private string _KeyEquipmentReportCountRemark; + + private System.Nullable _ChemicalAreaProjectCount; + + private string _ChemicalAreaProjectCountRemark; + + private System.Nullable _HarmfulMediumCoverCount; + + private string _HarmfulMediumCoverCountRemark; + + private System.Nullable _HarmfulMediumCoverRate; + + private string _HarmfulMediumCoverRateRemark; + + private string _HandleState; + + private string _HandleMan; + + private string _UserName; + + public View_Information_SafetyQuarterlyReport() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SafetyQuarterlyReportId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string SafetyQuarterlyReportId + { + get + { + return this._SafetyQuarterlyReportId; + } + set + { + if ((this._SafetyQuarterlyReportId != value)) + { + this._SafetyQuarterlyReportId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this._UnitId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YearId", DbType="Int")] + public System.Nullable YearId + { + get + { + return this._YearId; + } + set + { + if ((this._YearId != value)) + { + this._YearId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quarters", DbType="Int")] + public System.Nullable Quarters + { + get + { + return this._Quarters; + } + set + { + if ((this._Quarters != value)) + { + this._Quarters = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UpState", DbType="Char(1)")] + public string UpState + { + get + { + return this._UpState; + } + set + { + if ((this._UpState != value)) + { + this._UpState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QuartersStr", DbType="NVarChar(100)")] + public string QuartersStr + { + get + { + return this._QuartersStr; + } + set + { + if ((this._QuartersStr != value)) + { + this._QuartersStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitName", DbType="NVarChar(200)")] + public string UnitName + { + get + { + return this._UnitName; + } + set + { + if ((this._UnitName != value)) + { + this._UnitName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalInWorkHours", DbType="Int")] + public System.Nullable TotalInWorkHours + { + get + { + return this._TotalInWorkHours; + } + set + { + if ((this._TotalInWorkHours != value)) + { + this._TotalInWorkHours = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalInWorkHoursRemark", DbType="NVarChar(500)")] + public string TotalInWorkHoursRemark + { + get + { + return this._TotalInWorkHoursRemark; + } + set + { + if ((this._TotalInWorkHoursRemark != value)) + { + this._TotalInWorkHoursRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalOutWorkHours", DbType="Int")] + public System.Nullable TotalOutWorkHours + { + get + { + return this._TotalOutWorkHours; + } + set + { + if ((this._TotalOutWorkHours != value)) + { + this._TotalOutWorkHours = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalOutWorkHoursRemark", DbType="NVarChar(500)")] + public string TotalOutWorkHoursRemark + { + get + { + return this._TotalOutWorkHoursRemark; + } + set + { + if ((this._TotalOutWorkHoursRemark != value)) + { + this._TotalOutWorkHoursRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHoursLossRate", DbType="Decimal(18,2)")] + public System.Nullable WorkHoursLossRate + { + get + { + return this._WorkHoursLossRate; + } + set + { + if ((this._WorkHoursLossRate != value)) + { + this._WorkHoursLossRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHoursLossRateRemark", DbType="NVarChar(500)")] + public string WorkHoursLossRateRemark + { + get + { + return this._WorkHoursLossRateRemark; + } + set + { + if ((this._WorkHoursLossRateRemark != value)) + { + this._WorkHoursLossRateRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHoursAccuracy", DbType="Decimal(18,2)")] + public System.Nullable WorkHoursAccuracy + { + get + { + return this._WorkHoursAccuracy; + } + set + { + if ((this._WorkHoursAccuracy != value)) + { + this._WorkHoursAccuracy = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkHoursAccuracyRemark", DbType="NVarChar(500)")] + public string WorkHoursAccuracyRemark + { + get + { + return this._WorkHoursAccuracyRemark; + } + set + { + if ((this._WorkHoursAccuracyRemark != value)) + { + this._WorkHoursAccuracyRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainBusinessIncome", DbType="Money")] + public System.Nullable MainBusinessIncome + { + get + { + return this._MainBusinessIncome; + } + set + { + if ((this._MainBusinessIncome != value)) + { + this._MainBusinessIncome = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainBusinessIncomeRemark", DbType="NVarChar(500)")] + public string MainBusinessIncomeRemark + { + get + { + return this._MainBusinessIncomeRemark; + } + set + { + if ((this._MainBusinessIncomeRemark != value)) + { + this._MainBusinessIncomeRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionRevenue", DbType="Money")] + public System.Nullable ConstructionRevenue + { + get + { + return this._ConstructionRevenue; + } + set + { + if ((this._ConstructionRevenue != value)) + { + this._ConstructionRevenue = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionRevenueRemark", DbType="NVarChar(500)")] + public string ConstructionRevenueRemark + { + get + { + return this._ConstructionRevenueRemark; + } + set + { + if ((this._ConstructionRevenueRemark != value)) + { + this._ConstructionRevenueRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitTimeIncome", DbType="Money")] + public System.Nullable UnitTimeIncome + { + get + { + return this._UnitTimeIncome; + } + set + { + if ((this._UnitTimeIncome != value)) + { + this._UnitTimeIncome = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitTimeIncomeRemark", DbType="NVarChar(500)")] + public string UnitTimeIncomeRemark + { + get + { + return this._UnitTimeIncomeRemark; + } + set + { + if ((this._UnitTimeIncomeRemark != value)) + { + this._UnitTimeIncomeRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BillionsOutputMortality", DbType="Decimal(18,2)")] + public System.Nullable BillionsOutputMortality + { + get + { + return this._BillionsOutputMortality; + } + set + { + if ((this._BillionsOutputMortality != value)) + { + this._BillionsOutputMortality = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BillionsOutputMortalityRemark", DbType="NVarChar(500)")] + public string BillionsOutputMortalityRemark + { + get + { + return this._BillionsOutputMortalityRemark; + } + set + { + if ((this._BillionsOutputMortalityRemark != value)) + { + this._BillionsOutputMortalityRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MajorFireAccident", DbType="Int")] + public System.Nullable MajorFireAccident + { + get + { + return this._MajorFireAccident; + } + set + { + if ((this._MajorFireAccident != value)) + { + this._MajorFireAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MajorFireAccidentRemark", DbType="NVarChar(500)")] + public string MajorFireAccidentRemark + { + get + { + return this._MajorFireAccidentRemark; + } + set + { + if ((this._MajorFireAccidentRemark != value)) + { + this._MajorFireAccidentRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MajorEquipAccident", DbType="Int")] + public System.Nullable MajorEquipAccident + { + get + { + return this._MajorEquipAccident; + } + set + { + if ((this._MajorEquipAccident != value)) + { + this._MajorEquipAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MajorEquipAccidentRemark", DbType="NVarChar(500)")] + public string MajorEquipAccidentRemark + { + get + { + return this._MajorEquipAccidentRemark; + } + set + { + if ((this._MajorEquipAccidentRemark != value)) + { + this._MajorEquipAccidentRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentFrequency", DbType="Decimal(18,2)")] + public System.Nullable AccidentFrequency + { + get + { + return this._AccidentFrequency; + } + set + { + if ((this._AccidentFrequency != value)) + { + this._AccidentFrequency = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AccidentFrequencyRemark", DbType="NVarChar(500)")] + public string AccidentFrequencyRemark + { + get + { + return this._AccidentFrequencyRemark; + } + set + { + if ((this._AccidentFrequencyRemark != value)) + { + this._AccidentFrequencyRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuryAccident", DbType="Int")] + public System.Nullable SeriousInjuryAccident + { + get + { + return this._SeriousInjuryAccident; + } + set + { + if ((this._SeriousInjuryAccident != value)) + { + this._SeriousInjuryAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SeriousInjuryAccidentRemark", DbType="NVarChar(500)")] + public string SeriousInjuryAccidentRemark + { + get + { + return this._SeriousInjuryAccidentRemark; + } + set + { + if ((this._SeriousInjuryAccidentRemark != value)) + { + this._SeriousInjuryAccidentRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireAccident", DbType="Int")] + public System.Nullable FireAccident + { + get + { + return this._FireAccident; + } + set + { + if ((this._FireAccident != value)) + { + this._FireAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FireAccidentRemark", DbType="NVarChar(500)")] + public string FireAccidentRemark + { + get + { + return this._FireAccidentRemark; + } + set + { + if ((this._FireAccidentRemark != value)) + { + this._FireAccidentRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentAccident", DbType="Int")] + public System.Nullable EquipmentAccident + { + get + { + return this._EquipmentAccident; + } + set + { + if ((this._EquipmentAccident != value)) + { + this._EquipmentAccident = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentAccidentRemark", DbType="NVarChar(500)")] + public string EquipmentAccidentRemark + { + get + { + return this._EquipmentAccidentRemark; + } + set + { + if ((this._EquipmentAccidentRemark != value)) + { + this._EquipmentAccidentRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PoisoningAndInjuries", DbType="Int")] + public System.Nullable PoisoningAndInjuries + { + get + { + return this._PoisoningAndInjuries; + } + set + { + if ((this._PoisoningAndInjuries != value)) + { + this._PoisoningAndInjuries = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PoisoningAndInjuriesRemark", DbType="NVarChar(500)")] + public string PoisoningAndInjuriesRemark + { + get + { + return this._PoisoningAndInjuriesRemark; + } + set + { + if ((this._PoisoningAndInjuriesRemark != value)) + { + this._PoisoningAndInjuriesRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductionSafetyInTotal", DbType="Int")] + public System.Nullable ProductionSafetyInTotal + { + get + { + return this._ProductionSafetyInTotal; + } + set + { + if ((this._ProductionSafetyInTotal != value)) + { + this._ProductionSafetyInTotal = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductionSafetyInTotalRemark", DbType="NVarChar(500)")] + public string ProductionSafetyInTotalRemark + { + get + { + return this._ProductionSafetyInTotalRemark; + } + set + { + if ((this._ProductionSafetyInTotalRemark != value)) + { + this._ProductionSafetyInTotalRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProtectionInput", DbType="Money")] + public System.Nullable ProtectionInput + { + get + { + return this._ProtectionInput; + } + set + { + if ((this._ProtectionInput != value)) + { + this._ProtectionInput = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProtectionInputRemark", DbType="NVarChar(500)")] + public string ProtectionInputRemark + { + get + { + return this._ProtectionInputRemark; + } + set + { + if ((this._ProtectionInputRemark != value)) + { + this._ProtectionInputRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LaboAndHealthIn", DbType="Money")] + public System.Nullable LaboAndHealthIn + { + get + { + return this._LaboAndHealthIn; + } + set + { + if ((this._LaboAndHealthIn != value)) + { + this._LaboAndHealthIn = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LaborAndHealthInRemark", DbType="NVarChar(500)")] + public string LaborAndHealthInRemark + { + get + { + return this._LaborAndHealthInRemark; + } + set + { + if ((this._LaborAndHealthInRemark != value)) + { + this._LaborAndHealthInRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TechnologyProgressIn", DbType="Money")] + public System.Nullable TechnologyProgressIn + { + get + { + return this._TechnologyProgressIn; + } + set + { + if ((this._TechnologyProgressIn != value)) + { + this._TechnologyProgressIn = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TechnologyProgressInRemark", DbType="NVarChar(500)")] + public string TechnologyProgressInRemark + { + get + { + return this._TechnologyProgressInRemark; + } + set + { + if ((this._TechnologyProgressInRemark != value)) + { + this._TechnologyProgressInRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EducationTrainIn", DbType="Money")] + public System.Nullable EducationTrainIn + { + get + { + return this._EducationTrainIn; + } + set + { + if ((this._EducationTrainIn != value)) + { + this._EducationTrainIn = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EducationTrainInRemark", DbType="NVarChar(500)")] + public string EducationTrainInRemark + { + get + { + return this._EducationTrainInRemark; + } + set + { + if ((this._EducationTrainInRemark != value)) + { + this._EducationTrainInRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCostRate", DbType="Decimal(18,2)")] + public System.Nullable ProjectCostRate + { + get + { + return this._ProjectCostRate; + } + set + { + if ((this._ProjectCostRate != value)) + { + this._ProjectCostRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectCostRateRemark", DbType="NVarChar(500)")] + public string ProjectCostRateRemark + { + get + { + return this._ProjectCostRateRemark; + } + set + { + if ((this._ProjectCostRateRemark != value)) + { + this._ProjectCostRateRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductionInput", DbType="Money")] + public System.Nullable ProductionInput + { + get + { + return this._ProductionInput; + } + set + { + if ((this._ProductionInput != value)) + { + this._ProductionInput = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductionInputRemark", DbType="NVarChar(500)")] + public string ProductionInputRemark + { + get + { + return this._ProductionInputRemark; + } + set + { + if ((this._ProductionInputRemark != value)) + { + this._ProductionInputRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Revenue", DbType="Decimal(18,2)")] + public System.Nullable Revenue + { + get + { + return this._Revenue; + } + set + { + if ((this._Revenue != value)) + { + this._Revenue = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RevenueRemark", DbType="NVarChar(500)")] + public string RevenueRemark + { + get + { + return this._RevenueRemark; + } + set + { + if ((this._RevenueRemark != value)) + { + this._RevenueRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeMan", DbType="Int")] + public System.Nullable FullTimeMan + { + get + { + return this._FullTimeMan; + } + set + { + if ((this._FullTimeMan != value)) + { + this._FullTimeMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeManRemark", DbType="NVarChar(500)")] + public string FullTimeManRemark + { + get + { + return this._FullTimeManRemark; + } + set + { + if ((this._FullTimeManRemark != value)) + { + this._FullTimeManRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeManAttachUrl", DbType="NVarChar(2000)")] + public string FullTimeManAttachUrl + { + get + { + return this._FullTimeManAttachUrl; + } + set + { + if ((this._FullTimeManAttachUrl != value)) + { + this._FullTimeManAttachUrl = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PMMan", DbType="Int")] + public System.Nullable PMMan + { + get + { + return this._PMMan; + } + set + { + if ((this._PMMan != value)) + { + this._PMMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PMManRemark", DbType="NVarChar(500)")] + public string PMManRemark + { + get + { + return this._PMManRemark; + } + set + { + if ((this._PMManRemark != value)) + { + this._PMManRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PMManAttachUrl", DbType="NVarChar(2000)")] + public string PMManAttachUrl + { + get + { + return this._PMManAttachUrl; + } + set + { + if ((this._PMManAttachUrl != value)) + { + this._PMManAttachUrl = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CorporateDirectorEdu", DbType="Int")] + public System.Nullable CorporateDirectorEdu + { + get + { + return this._CorporateDirectorEdu; + } + set + { + if ((this._CorporateDirectorEdu != value)) + { + this._CorporateDirectorEdu = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CorporateDirectorEduRemark", DbType="NVarChar(500)")] + public string CorporateDirectorEduRemark + { + get + { + return this._CorporateDirectorEduRemark; + } + set + { + if ((this._CorporateDirectorEduRemark != value)) + { + this._CorporateDirectorEduRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectLeaderEdu", DbType="Int")] + public System.Nullable ProjectLeaderEdu + { + get + { + return this._ProjectLeaderEdu; + } + set + { + if ((this._ProjectLeaderEdu != value)) + { + this._ProjectLeaderEdu = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectLeaderEduRemark", DbType="NVarChar(500)")] + public string ProjectLeaderEduRemark + { + get + { + return this._ProjectLeaderEduRemark; + } + set + { + if ((this._ProjectLeaderEduRemark != value)) + { + this._ProjectLeaderEduRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeEdu", DbType="Int")] + public System.Nullable FullTimeEdu + { + get + { + return this._FullTimeEdu; + } + set + { + if ((this._FullTimeEdu != value)) + { + this._FullTimeEdu = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FullTimeEduRemark", DbType="NVarChar(500)")] + public string FullTimeEduRemark + { + get + { + return this._FullTimeEduRemark; + } + set + { + if ((this._FullTimeEduRemark != value)) + { + this._FullTimeEduRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThreeKidsEduRate", DbType="Decimal(18,2)")] + public System.Nullable ThreeKidsEduRate + { + get + { + return this._ThreeKidsEduRate; + } + set + { + if ((this._ThreeKidsEduRate != value)) + { + this._ThreeKidsEduRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ThreeKidsEduRateRemark", DbType="NVarChar(500)")] + public string ThreeKidsEduRateRemark + { + get + { + return this._ThreeKidsEduRateRemark; + } + set + { + if ((this._ThreeKidsEduRateRemark != value)) + { + this._ThreeKidsEduRateRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UplinReportRate", DbType="Decimal(18,2)")] + public System.Nullable UplinReportRate + { + get + { + return this._UplinReportRate; + } + set + { + if ((this._UplinReportRate != value)) + { + this._UplinReportRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UplinReportRateRemark", DbType="NVarChar(500)")] + public string UplinReportRateRemark + { + get + { + return this._UplinReportRateRemark; + } + set + { + if ((this._UplinReportRateRemark != value)) + { + this._UplinReportRateRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remarks", DbType="NVarChar(1000)")] + public string Remarks + { + get + { + return this._Remarks; + } + set + { + if ((this._Remarks != value)) + { + this._Remarks = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FillingDate", DbType="DateTime")] + public System.Nullable FillingDate + { + get + { + return this._FillingDate; + } + set + { + if ((this._FillingDate != value)) + { + this._FillingDate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyEquipmentTotal", DbType="Int")] + public System.Nullable KeyEquipmentTotal + { + get + { + return this._KeyEquipmentTotal; + } + set + { + if ((this._KeyEquipmentTotal != value)) + { + this._KeyEquipmentTotal = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyEquipmentTotalRemark", DbType="NVarChar(500)")] + public string KeyEquipmentTotalRemark + { + get + { + return this._KeyEquipmentTotalRemark; + } + set + { + if ((this._KeyEquipmentTotalRemark != value)) + { + this._KeyEquipmentTotalRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyEquipmentReportCount", DbType="Int")] + public System.Nullable KeyEquipmentReportCount + { + get + { + return this._KeyEquipmentReportCount; + } + set + { + if ((this._KeyEquipmentReportCount != value)) + { + this._KeyEquipmentReportCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_KeyEquipmentReportCountRemark", DbType="NVarChar(500)")] + public string KeyEquipmentReportCountRemark + { + get + { + return this._KeyEquipmentReportCountRemark; + } + set + { + if ((this._KeyEquipmentReportCountRemark != value)) + { + this._KeyEquipmentReportCountRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ChemicalAreaProjectCount", DbType="Int")] + public System.Nullable ChemicalAreaProjectCount + { + get + { + return this._ChemicalAreaProjectCount; + } + set + { + if ((this._ChemicalAreaProjectCount != value)) + { + this._ChemicalAreaProjectCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ChemicalAreaProjectCountRemark", DbType="NVarChar(500)")] + public string ChemicalAreaProjectCountRemark + { + get + { + return this._ChemicalAreaProjectCountRemark; + } + set + { + if ((this._ChemicalAreaProjectCountRemark != value)) + { + this._ChemicalAreaProjectCountRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HarmfulMediumCoverCount", DbType="Int")] + public System.Nullable HarmfulMediumCoverCount + { + get + { + return this._HarmfulMediumCoverCount; + } + set + { + if ((this._HarmfulMediumCoverCount != value)) + { + this._HarmfulMediumCoverCount = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HarmfulMediumCoverCountRemark", DbType="NVarChar(500)")] + public string HarmfulMediumCoverCountRemark + { + get + { + return this._HarmfulMediumCoverCountRemark; + } + set + { + if ((this._HarmfulMediumCoverCountRemark != value)) + { + this._HarmfulMediumCoverCountRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HarmfulMediumCoverRate", DbType="Decimal(18,2)")] + public System.Nullable HarmfulMediumCoverRate + { + get + { + return this._HarmfulMediumCoverRate; + } + set + { + if ((this._HarmfulMediumCoverRate != value)) + { + this._HarmfulMediumCoverRate = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HarmfulMediumCoverRateRemark", DbType="NVarChar(500)")] + public string HarmfulMediumCoverRateRemark + { + get + { + return this._HarmfulMediumCoverRateRemark; + } + set + { + if ((this._HarmfulMediumCoverRateRemark != value)) + { + this._HarmfulMediumCoverRateRemark = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleState", DbType="Char(1)")] + public string HandleState + { + get + { + return this._HandleState; + } + set + { + if ((this._HandleState != value)) + { + this._HandleState = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleMan", DbType="NVarChar(50)")] + public string HandleMan + { + get + { + return this._HandleMan; + } + set + { + if ((this._HandleMan != value)) + { + this._HandleMan = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UserName", DbType="NVarChar(200)")] + public string UserName + { + get + { + return this._UserName; + } + set + { + if ((this._UserName != value)) + { + this._UserName = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_InformationProject_ConstructionStandardIdentify")] public partial class View_InformationProject_ConstructionStandardIdentify { From 61c788d93cadb90bad019e6f17433e3ab91c13dd Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Fri, 3 Feb 2023 10:57:52 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=84=8A=E5=B7=A5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index 79ec6c3c..1994fb5e 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -1100,7 +1100,10 @@ namespace BLL Model.SitePerson_Person x = db.SitePerson_Person.FirstOrDefault(e => e.ProjectId == projectId && e.PersonId == personId); Model.Person_Persons getPerson = db.Person_Persons.FirstOrDefault(e => e.PersonId == personId); getPerson.Sex = getPerson.Sex == "1" ? "男" : "女"; - getPerson.Birthday = getPerson.Birthday; + if (getPerson.Birthday != null) + { + getPerson.Birthday = getPerson.Birthday.Value.Date; + } getPerson.PhotoUrl = getPerson.PhotoUrl; getPerson.QRCodeAttachUrl = getPerson.QRCodeAttachUrl; getPerson.IdentityCard = x.IdentityCard; From ca484ca4d659eb981c5a4eadcc27fbbb607c7c83 Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Fri, 3 Feb 2023 11:24:14 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=84=8A=E5=B7=A5?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index 1994fb5e..79ec6c3c 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -1100,10 +1100,7 @@ namespace BLL Model.SitePerson_Person x = db.SitePerson_Person.FirstOrDefault(e => e.ProjectId == projectId && e.PersonId == personId); Model.Person_Persons getPerson = db.Person_Persons.FirstOrDefault(e => e.PersonId == personId); getPerson.Sex = getPerson.Sex == "1" ? "男" : "女"; - if (getPerson.Birthday != null) - { - getPerson.Birthday = getPerson.Birthday.Value.Date; - } + getPerson.Birthday = getPerson.Birthday; getPerson.PhotoUrl = getPerson.PhotoUrl; getPerson.QRCodeAttachUrl = getPerson.QRCodeAttachUrl; getPerson.IdentityCard = x.IdentityCard; From 7bd05d57cbdbe6dc5d196d1229e0dcc51e6f9e01 Mon Sep 17 00:00:00 2001 From: yhw0507 Date: Tue, 14 Feb 2023 16:55:32 +0800 Subject: [PATCH 8/9] =?UTF-8?q?20230214=E4=BA=BA=E5=91=98=E8=80=83?= =?UTF-8?q?=E5=8B=A4=E5=9C=A8=E5=B2=97=E4=BA=BA=E5=91=98=E5=AF=BC=E5=87=BA?= =?UTF-8?q?=20=E5=88=97=E8=A1=A8=E4=B8=BB=E9=94=AE=E6=9C=89=E4=BA=BA?= =?UTF-8?q?=E5=91=98id=E6=94=B9=E4=B8=BA=E9=A1=B9=E7=9B=AE=E4=BA=BA?= =?UTF-8?q?=E5=91=98id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SitePerson/SitePerson_PersonService.cs | 1 + SGGL/FineUIPro.Web/ErrLog.txt | 285 ------------------ .../HSSE/SitePerson/PersonUnitList.aspx | 2 +- 3 files changed, 2 insertions(+), 286 deletions(-) diff --git a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs index 79ec6c3c..244728b8 100644 --- a/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/SitePerson_PersonService.cs @@ -160,6 +160,7 @@ namespace BLL select new { x.PersonId, + x.SitePersonId, x.CardNo, x.PersonName, x.UnitId, diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index d6f77b39..e69de29b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,285 +0,0 @@ -<<<<<<< HEAD -======= - -错误信息开始=====> -错误类型:IndexOutOfRangeException -错误信息:无法找到列 WeldJointNum。 -错误堆栈: - 在 System.Data.DataTable.ParseSortString(String sortString) - 在 System.Data.DataView.CheckSort(String sort) - 在 System.Data.DataView.set_Sort(String value) - 在 FineUIPro.Web.PageBase.GetPagedDataTable(Grid Grid1, DataTable tb) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\common\PageBase.cs:行号 497 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.BindGrid(List`1 weldingDailyItem) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 246 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 68 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 17:13:10 -出错文件:http://localhost:4909/HJGL/WeldingManage/WeldReportEdit.aspx?WeldingDailyId=7a2cf1c3-6253-4705-b2ed-208af534369b -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 17:13:10 - - -错误信息开始=====> -错误类型:SqlException -错误信息:列名 'WeldJointNum' 无效。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate) - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.BindGrid(List`1 weldingDailyItem) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 209 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 68 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 17:20:43 -出错文件:http://localhost:4909/HJGL/WeldingManage/WeldReportEdit.aspx?WeldingDailyId=b58f14b3-6886-4b85-9d5e-cd7fec8c25b0 -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 17:20:43 - - -错误信息开始=====> -错误类型:SqlException -错误信息:列名 'WeldJointNum' 无效。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate) - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.BindGrid(List`1 weldingDailyItem) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 209 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 68 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 17:23:11 -出错文件:http://localhost:4909/HJGL/WeldingManage/WeldReportEdit.aspx?WeldingDailyId=7a2cf1c3-6253-4705-b2ed-208af534369b -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 17:23:11 - - -错误信息开始=====> -错误类型:SqlException -错误信息:列名 'WeldJointNum' 无效。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.ExecuteReader() - 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) - 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) - 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) - 在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression) - 在 System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate) - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.BindGrid(List`1 weldingDailyItem) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 209 - 在 FineUIPro.Web.WeldingProcess.WeldingManage.WeldReportEdit.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\WeldReportEdit.aspx.cs:行号 68 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 17:33:50 -出错文件:http://localhost:4909/HJGL/WeldingManage/WeldReportEdit.aspx?WeldingDailyId=7a2cf1c3-6253-4705-b2ed-208af534369b -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 17:33:50 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.InitTreeMenu() 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 180 - 在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 158 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 21:31:26 -出错文件:http://localhost:4909/HJGL/WeldingManage/SelectTaskWeldJoint.aspx?strList=476d4c23-155c-47c4-9cf8-8158034b0a1d%7C1af885ff-b778-46c6-a13d-a21b304ac835%7C2022-12-01 -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 21:31:26 - - -错误信息开始=====> -错误类型:ArgumentNullException -错误信息:值不能为 null。 -参数名: source -错误堆栈: - 在 System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate) - 在 FineUIPro.Web.HJGL.PreDesign.PrePipeline.InitTreeMenu() 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\PreDesign\PrePipeline.aspx.cs:行号 84 - 在 FineUIPro.Web.HJGL.PreDesign.PrePipeline.Page_Load(Object sender, EventArgs e) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\FineUIPro.Web\HJGL\PreDesign\PrePipeline.aspx.cs:行号 23 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:12/26/2022 22:15:59 -出错文件:http://localhost:4909/HJGL/PreDesign/PrePipeline.aspx -IP地址:::1 -操作人员:李嘉威 - -出错时间:12/26/2022 22:15:59 - -System.InvalidOperationException: 可为空的对象必须具有一个值。 - 在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) - 在 System.Nullable`1.get_Value() - 在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284 -System.InvalidOperationException: 可为空的对象必须具有一个值。 - 在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) - 在 System.Nullable`1.get_Value() - 在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284 -System.InvalidOperationException: 可为空的对象必须具有一个值。 - 在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) - 在 System.Nullable`1.get_Value() - 在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284 -System.InvalidOperationException: 可为空的对象必须具有一个值。 - 在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) - 在 System.Nullable`1.get_Value() - 在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 E:\赛鼎\SGGL_SeDin_New\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284 - -错误信息开始=====> -错误类型:OutOfMemoryException -错误信息:引发类型为“System.OutOfMemoryException”的异常。 -错误堆栈: - 在 System.Data.SqlTypes.SqlBinary.get_Value() - 在 System.Data.SqlClient.SqlBuffer.get_ByteArray() - 在 System.Data.SqlClient.SqlBuffer.get_Value() - 在 System.Data.SqlClient.SqlDataReader.GetValueFromSqlBufferInternal(SqlBuffer data, _SqlMetaData metaData) - 在 System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i) - 在 System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) - 在 Read_Person_Persons(ObjectMaterializer`1 ) - 在 System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext() - 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) - 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) - 在 BLL.Person_PersonsService.GetUserListByProjectIdUnitIdRoleId(String projectId, String unitIds, String roleIds) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 572 - 在 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropDownList dropName, String projectId, String unitId, String roleIds, Boolean isShowPlease) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 1267 - 在 FineUIPro.Web.ProjectData.ProjectSetSave.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ProjectData\ProjectSetSave.aspx.cs:行号 42 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:01/19/2023 12:49:49 -出错文件:http://localhost:4909/ProjectData/ProjectSetSave.aspx -IP地址:::1 -操作人员:JT - -出错时间:01/19/2023 12:49:49 - - -错误信息开始=====> -错误类型:OutOfMemoryException -错误信息:引发类型为“System.OutOfMemoryException”的异常。 -错误堆栈: - 在 System.Data.SqlTypes.SqlBinary.get_Value() - 在 System.Data.SqlClient.SqlBuffer.get_ByteArray() - 在 System.Data.SqlClient.SqlBuffer.get_Value() - 在 System.Data.SqlClient.SqlDataReader.GetValueFromSqlBufferInternal(SqlBuffer data, _SqlMetaData metaData) - 在 System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i) - 在 System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) - 在 Read_Person_Persons(ObjectMaterializer`1 ) - 在 System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext() - 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) - 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) - 在 BLL.Person_PersonsService.GetUserListByProjectIdUnitIdRoleId(String projectId, String unitIds, String roleIds) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 572 - 在 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropDownList dropName, String projectId, String unitId, String roleIds, Boolean isShowPlease) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 1267 - 在 FineUIPro.Web.ProjectData.ProjectSetSave.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ProjectData\ProjectSetSave.aspx.cs:行号 44 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:01/19/2023 12:56:37 -出错文件:http://localhost:4909/ProjectData/ProjectSetSave.aspx -IP地址:::1 -操作人员:JT - -出错时间:01/19/2023 12:56:37 - - -错误信息开始=====> -错误类型:OutOfMemoryException -错误信息:引发类型为“System.OutOfMemoryException”的异常。 -错误堆栈: - 在 System.Data.SqlClient.TdsParser.TryReadSqlValue(SqlBuffer value, SqlMetaDataPriv md, Int32 length, TdsParserStateObject stateObj, SqlCommandColumnEncryptionSetting columnEncryptionOverride, String columnName) - 在 System.Data.SqlClient.SqlDataReader.TryReadColumnData() - 在 System.Data.SqlClient.SqlDataReader.TryReadColumnInternal(Int32 i, Boolean readHeaderOnly) - 在 System.Data.SqlClient.SqlDataReader.TryReadColumn(Int32 i, Boolean setTimeout, Boolean allowPartiallyReadColumn) - 在 System.Data.SqlClient.SqlDataReader.GetValueInternal(Int32 i) - 在 System.Data.SqlClient.SqlDataReader.GetValue(Int32 i) - 在 Read_Person_Persons(ObjectMaterializer`1 ) - 在 System.Data.Linq.SqlClient.ObjectReaderCompiler.ObjectReader`2.MoveNext() - 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) - 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) - 在 BLL.Person_PersonsService.GetUserListByProjectIdUnitIdRoleId(String projectId, String unitIds, String roleIds) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 572 - 在 BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropDownList dropName, String projectId, String unitId, String roleIds, Boolean isShowPlease) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\Person\Person_PersonsService.cs:行号 1267 - 在 FineUIPro.Web.ProjectData.ProjectSetSave.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\ProjectData\ProjectSetSave.aspx.cs:行号 44 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:01/19/2023 13:22:05 -出错文件:http://localhost:4909/ProjectData/ProjectSetSave.aspx -IP地址:::1 -操作人员:JT - -出错时间:01/19/2023 13:22:05 - ->>>>>>> 9e0702540e91ee4f7d2ce5a300e2a4fac65230ab diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitList.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitList.aspx index 74b2d7a9..b419699f 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitList.aspx +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonUnitList.aspx @@ -13,7 +13,7 @@ ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> From fa156db08cabc34464ed7e362fecef7ef5a49ee5 Mon Sep 17 00:00:00 2001 From: gaofei <181547018@qq.com> Date: Tue, 14 Feb 2023 17:40:34 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A8=E9=87=8F?= =?UTF-8?q?=E6=A0=B7=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_V2023-02-13_gaofei.sql | 50 ++++ .../0-0系统设置(Menu_SysSet).sql | 13 + SGGL/BLL/BLL.csproj | 1 + SGGL/BLL/BaseInfo/CompanyModelKindService.cs | 87 +++++++ SGGL/BLL/BaseInfo/CompanyModelService.cs | 6 +- SGGL/BLL/Common/Const.cs | 5 + SGGL/FineUIPro.Web/BaseInfo/CompanyModel.aspx | 4 +- .../BaseInfo/CompanyModel.aspx.cs | 2 +- .../BaseInfo/CompanyModelEdit.aspx | 8 +- .../BaseInfo/CompanyModelEdit.aspx.cs | 12 + .../CompanyModelEdit.aspx.designer.cs | 9 + .../BaseInfo/CompanyModelKind.aspx | 94 +++++++ .../BaseInfo/CompanyModelKind.aspx.cs | 214 ++++++++++++++++ .../CompanyModelKind.aspx.designer.cs | 150 +++++++++++ .../BaseInfo/CompanyModelKindEdit.aspx | 64 +++++ .../BaseInfo/CompanyModelKindEdit.aspx.cs | 81 ++++++ .../CompanyModelKindEdit.aspx.designer.cs | 132 ++++++++++ .../CQMS/Models/QualityModel.aspx | 2 + .../CQMS/Models/QualityModel.aspx.cs | 2 +- .../CQMS/Models/QualityModelEdit.aspx | 2 + .../CQMS/Models/QualityModelEdit.aspx.cs | 31 ++- .../Models/QualityModelEdit.aspx.designer.cs | 9 + SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 16 ++ SGGL/Model/Model.cs | 238 ++++++++++++++++++ 24 files changed, 1224 insertions(+), 8 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2023-02-13_gaofei.sql create mode 100644 SGGL/BLL/BaseInfo/CompanyModelKindService.cs create mode 100644 SGGL/FineUIPro.Web/BaseInfo/CompanyModelKind.aspx create mode 100644 SGGL/FineUIPro.Web/BaseInfo/CompanyModelKind.aspx.cs create mode 100644 SGGL/FineUIPro.Web/BaseInfo/CompanyModelKind.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/BaseInfo/CompanyModelKindEdit.aspx create mode 100644 SGGL/FineUIPro.Web/BaseInfo/CompanyModelKindEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/BaseInfo/CompanyModelKindEdit.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_V2023-02-13_gaofei.sql b/DataBase/版本日志/SGGLDB_V2023-02-13_gaofei.sql new file mode 100644 index 00000000..8529dfb5 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-02-13_gaofei.sql @@ -0,0 +1,50 @@ + +CREATE TABLE [dbo].[Base_CompanyModelKind]( + [CompanyModelKindId] [nvarchar](50) NOT NULL, + [CompanyModelKindCode] [nvarchar](50) NULL, + [CompanyModelKindName] [nvarchar](50) NULL, + [Remark] [nvarchar](100) NULL, + CONSTRAINT [PK_Base_CompanyModelKind] PRIMARY KEY CLUSTERED +( + [CompanyModelKindId] 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 + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_CompanyModelKind', @level2type=N'COLUMN',@level2name=N'CompanyModelKindId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_CompanyModelKind', @level2type=N'COLUMN',@level2name=N'CompanyModelKindCode' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_CompanyModelKind', @level2type=N'COLUMN',@level2name=N'CompanyModelKindName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_CompanyModelKind', @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'Base_CompanyModelKind' +GO + + +alter table [dbo].[Base_CompanyModel] add CompanyModelKindId nvarchar(50) null +GO +alter table Base_CompanyModel add constraint FK_Base_CompanyModel_Base_CompanyModelKind +foreign key (CompanyModelKindId) references Base_CompanyModelKind (CompanyModelKindId) +GO + + + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('B9372A07-8A93-4EC0-9374-FDE1ED958DAE','˾','BaseInfo/CompanyModelKind.aspx',69,'A93BA810-3511-4BB2-9C10-9663351DF79F','Menu_SysSet',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('051EC690-DCA2-4296-9698-49BD2875F30A','B9372A07-8A93-4EC0-9374-FDE1ED958DAE','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('ACB8BFF1-8D4A-4935-89DF-9DBAA1EC3F94','B9372A07-8A93-4EC0-9374-FDE1ED958DAE','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('4F5FA4EB-E08D-48D6-A9F1-F2E1F4EBE049','B9372A07-8A93-4EC0-9374-FDE1ED958DAE','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7504C77A-7D99-4822-8A3C-411ADDF91596','B9372A07-8A93-4EC0-9374-FDE1ED958DAE','',4) + GO \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/0-0系统设置(Menu_SysSet).sql b/DataBase/菜单初始化脚本/0-0系统设置(Menu_SysSet).sql index fe4c96e9..a286b3c4 100644 --- a/DataBase/菜单初始化脚本/0-0系统设置(Menu_SysSet).sql +++ b/DataBase/菜单初始化脚本/0-0系统设置(Menu_SysSet).sql @@ -337,6 +337,19 @@ GO VALUES('AF3594FB-0CC9-419E-9D8D-25ECD888AD47','CCD45D20-EA3F-47E7-8176-AB085778539E','',4) GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('B9372A07-8A93-4EC0-9374-FDE1ED958DAE','˾','BaseInfo/CompanyModelKind.aspx',69,'A93BA810-3511-4BB2-9C10-9663351DF79F','Menu_SysSet',1,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('051EC690-DCA2-4296-9698-49BD2875F30A','B9372A07-8A93-4EC0-9374-FDE1ED958DAE','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('ACB8BFF1-8D4A-4935-89DF-9DBAA1EC3F94','B9372A07-8A93-4EC0-9374-FDE1ED958DAE','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('4F5FA4EB-E08D-48D6-A9F1-F2E1F4EBE049','B9372A07-8A93-4EC0-9374-FDE1ED958DAE','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('7504C77A-7D99-4822-8A3C-411ADDF91596','B9372A07-8A93-4EC0-9374-FDE1ED958DAE','',4) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('99C99DF8-103F-4CA4-83CB-A6C924B5A698','˾','BaseInfo/CompanyModel.aspx',70,'A93BA810-3511-4BB2-9C10-9663351DF79F','Menu_SysSet',1,1,1) GO diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 7a85283e..ec90c7a5 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -212,6 +212,7 @@ + diff --git a/SGGL/BLL/BaseInfo/CompanyModelKindService.cs b/SGGL/BLL/BaseInfo/CompanyModelKindService.cs new file mode 100644 index 00000000..27f9abc4 --- /dev/null +++ b/SGGL/BLL/BaseInfo/CompanyModelKindService.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + public class CompanyModelKindService + { + /// + /// 根据主键获取公司质量样板类别 + /// + /// + /// + public static Model.Base_CompanyModelKind GetCompanyModelKindById(string CompanyModelKindId) + { + return Funs.DB.Base_CompanyModelKind.FirstOrDefault(e => e.CompanyModelKindId == CompanyModelKindId); + } + + /// + /// 添加公司质量样板类别 + /// + /// + public static void AddCompanyModelKind(Model.Base_CompanyModelKind CompanyModelKind) + { + Model.Base_CompanyModelKind newCompanyModelKind = new Model.Base_CompanyModelKind + { + CompanyModelKindId = CompanyModelKind.CompanyModelKindId, + CompanyModelKindCode = CompanyModelKind.CompanyModelKindCode, + CompanyModelKindName = CompanyModelKind.CompanyModelKindName, + Remark = CompanyModelKind.Remark, + }; + Funs.DB.Base_CompanyModelKind.InsertOnSubmit(newCompanyModelKind); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改公司质量样板类别 + /// + /// + public static void UpdateCompanyModelKind(Model.Base_CompanyModelKind CompanyModelKind) + { + Model.Base_CompanyModelKind newCompanyModelKind = Funs.DB.Base_CompanyModelKind.FirstOrDefault(e => e.CompanyModelKindId == CompanyModelKind.CompanyModelKindId); + if (newCompanyModelKind != null) + { + newCompanyModelKind.CompanyModelKindCode = CompanyModelKind.CompanyModelKindCode; + newCompanyModelKind.CompanyModelKindName = CompanyModelKind.CompanyModelKindName; + newCompanyModelKind.Remark = CompanyModelKind.Remark; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除公司质量样板类别 + /// + /// + public static void DeleteCompanyModelKindById(string CompanyModelKindId) + { + Model.Base_CompanyModelKind CompanyModelKind = Funs.DB.Base_CompanyModelKind.FirstOrDefault(e => e.CompanyModelKindId == CompanyModelKindId); + if (CompanyModelKind != null) + { + CommonService.DeleteAttachFileById(CompanyModelKindId); + Funs.DB.Base_CompanyModelKind.DeleteOnSubmit(CompanyModelKind); + Funs.DB.SubmitChanges(); + } + } + + /// + /// 样板类型下拉框 + /// + /// + /// + /// + public static void InitCompanyModelKindDownList(FineUIPro.DropDownList dropName, bool isShowPlease) + { + dropName.DataValueField = "CompanyModelKindId"; + dropName.DataTextField = "CompanyModelKindName"; + dropName.DataSource = from x in Funs.DB.Base_CompanyModelKind orderby x.CompanyModelKindCode select x; + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + } +} diff --git a/SGGL/BLL/BaseInfo/CompanyModelService.cs b/SGGL/BLL/BaseInfo/CompanyModelService.cs index 6752a708..77195260 100644 --- a/SGGL/BLL/BaseInfo/CompanyModelService.cs +++ b/SGGL/BLL/BaseInfo/CompanyModelService.cs @@ -30,6 +30,7 @@ namespace BLL Model.Base_CompanyModel newCompanyModel = new Model.Base_CompanyModel { CompanyModelId = CompanyModel.CompanyModelId, + CompanyModelKindId = CompanyModel.CompanyModelKindId, ModelType = CompanyModel.ModelType, Remark = CompanyModel.Remark, }; @@ -46,6 +47,7 @@ namespace BLL Model.Base_CompanyModel newCompanyModel = Funs.DB.Base_CompanyModel.FirstOrDefault(e => e.CompanyModelId == CompanyModel.CompanyModelId); if (newCompanyModel != null) { + newCompanyModel.CompanyModelKindId = CompanyModel.CompanyModelKindId; newCompanyModel.ModelType = CompanyModel.ModelType; newCompanyModel.Remark = CompanyModel.Remark; Funs.DB.SubmitChanges(); @@ -73,11 +75,11 @@ namespace BLL /// /// /// - public static void InitModelTypeDownList(FineUIPro.DropDownList dropName, bool isShowPlease) + public static void InitModelTypeDownList(FineUIPro.DropDownList dropName, string companyModelKindId, bool isShowPlease) { dropName.DataValueField = "CompanyModelId"; dropName.DataTextField = "ModelType"; - dropName.DataSource = from x in Funs.DB.Base_CompanyModel orderby x.ModelType select x; + dropName.DataSource = from x in Funs.DB.Base_CompanyModel where x.CompanyModelKindId == companyModelKindId orderby x.ModelType select x; dropName.DataBind(); if (isShowPlease) { diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 93074ebb..fe683598 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -1005,6 +1005,11 @@ /// public const string NoticeAndSupervisionTypeMenuId = "CCD45D20-EA3F-47E7-8176-AB085778539E"; + /// + /// 公司质量样板类别 + /// + public const string CompanyModelKindMenuId = "B9372A07-8A93-4EC0-9374-FDE1ED958DAE"; + /// /// 公司质量样板 /// diff --git a/SGGL/FineUIPro.Web/BaseInfo/CompanyModel.aspx b/SGGL/FineUIPro.Web/BaseInfo/CompanyModel.aspx index f3214d81..33a846d5 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CompanyModel.aspx +++ b/SGGL/FineUIPro.Web/BaseInfo/CompanyModel.aspx @@ -33,6 +33,8 @@ + + + + public void BindGrid() { - string strSql = @"select q.*,c.ModelType from Model_QualityModel q left join Base_CompanyModel c on c.CompanyModelId=q.CompanyModelId where ProjectId=@ProjectId "; + string strSql = @"select q.*,c.ModelType,CompanyModelKindName,CompanyModelKindCode from Model_QualityModel q left join Base_CompanyModel c on c.CompanyModelId=q.CompanyModelId left join Base_CompanyModelKind d on d.CompanyModelKindId=c.CompanyModelKindId where ProjectId=@ProjectId "; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); SqlParameter[] parameter = listStr.ToArray(); diff --git a/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx index f671d75e..e1064988 100644 --- a/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx @@ -36,6 +36,8 @@ + + protected void btnSave_Click(object sender, EventArgs e) { + if (this.drpCompanyModelKindId.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择样板类别!", MessageBoxIcon.Warning); + return; + } if (this.drpModelType.SelectedValue == BLL.Const._Null) { ShowNotify("请选择样板类型!", MessageBoxIcon.Warning); @@ -152,7 +167,7 @@ namespace FineUIPro.Web.CQMS.Models /// public void BindCGrid() { - if (this.drpModelType.SelectedValue != BLL.Const._Null) + if (this.drpModelType.SelectedValue != BLL.Const._Null && this.drpCompanyModelKindId.SelectedValue != BLL.Const._Null) { string strSql = @"select * from AttachFile where ToKeyId='" + this.drpModelType.SelectedValue + "'"; DataTable tb = SQLHelper.GetDataTableRunText(strSql, null); @@ -192,5 +207,17 @@ namespace FineUIPro.Web.CQMS.Models { BindCGrid(); } + + protected void drpCompanyModelKindId_SelectedIndexChanged(object sender, EventArgs e) + { + this.drpModelType.Items.Clear(); + if (this.drpCompanyModelKindId.SelectedValue != BLL.Const._Null) + { + CompanyModelService.InitModelTypeDownList(this.drpModelType, this.drpCompanyModelKindId.SelectedValue, false); + } + Funs.FineUIPleaseSelect(this.drpModelType); + this.drpModelType.SelectedValue = BLL.Const._Null; + BindCGrid(); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx.designer.cs index 0eb3097a..23b2fb6a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Models/QualityModelEdit.aspx.designer.cs @@ -102,6 +102,15 @@ namespace FineUIPro.Web.CQMS.Models { /// protected global::FineUIPro.Form Form2; + /// + /// drpCompanyModelKindId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCompanyModelKindId; + /// /// drpModelType 控件。 /// diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 110ce531..fc909370 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -208,6 +208,8 @@ + + @@ -5671,6 +5673,20 @@ CompanyModelEdit.aspx + + CompanyModelKind.aspx + ASPXCodeBehind + + + CompanyModelKind.aspx + + + CompanyModelKindEdit.aspx + ASPXCodeBehind + + + CompanyModelKindEdit.aspx + ConstructionTestType.aspx ASPXCodeBehind diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 94b6f58a..4e0cebc9 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -74,6 +74,9 @@ namespace Model partial void InsertBase_CompanyModel(Base_CompanyModel instance); partial void UpdateBase_CompanyModel(Base_CompanyModel instance); partial void DeleteBase_CompanyModel(Base_CompanyModel instance); + partial void InsertBase_CompanyModelKind(Base_CompanyModelKind instance); + partial void UpdateBase_CompanyModelKind(Base_CompanyModelKind instance); + partial void DeleteBase_CompanyModelKind(Base_CompanyModelKind instance); partial void InsertBase_Components(Base_Components instance); partial void UpdateBase_Components(Base_Components instance); partial void DeleteBase_Components(Base_Components instance); @@ -1630,6 +1633,14 @@ namespace Model } } + public System.Data.Linq.Table Base_CompanyModelKind + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Base_Components { get @@ -12420,6 +12431,10 @@ namespace Model private string _Remark; + private string _CompanyModelKindId; + + private EntityRef _Base_CompanyModelKind; + private EntitySet _Model_QualityModel; #region 可扩展性方法定义 @@ -12432,10 +12447,13 @@ namespace Model partial void OnModelTypeChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); + partial void OnCompanyModelKindIdChanging(string value); + partial void OnCompanyModelKindIdChanged(); #endregion public Base_CompanyModel() { + this._Base_CompanyModelKind = default(EntityRef); this._Model_QualityModel = new EntitySet(new Action(this.attach_Model_QualityModel), new Action(this.detach_Model_QualityModel)); OnCreated(); } @@ -12500,6 +12518,64 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyModelKindId", DbType="NVarChar(50)")] + public string CompanyModelKindId + { + get + { + return this._CompanyModelKindId; + } + set + { + if ((this._CompanyModelKindId != value)) + { + if (this._Base_CompanyModelKind.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompanyModelKindIdChanging(value); + this.SendPropertyChanging(); + this._CompanyModelKindId = value; + this.SendPropertyChanged("CompanyModelKindId"); + this.OnCompanyModelKindIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_CompanyModel_Base_CompanyModelKind", Storage="_Base_CompanyModelKind", ThisKey="CompanyModelKindId", OtherKey="CompanyModelKindId", IsForeignKey=true)] + public Base_CompanyModelKind Base_CompanyModelKind + { + get + { + return this._Base_CompanyModelKind.Entity; + } + set + { + Base_CompanyModelKind previousValue = this._Base_CompanyModelKind.Entity; + if (((previousValue != value) + || (this._Base_CompanyModelKind.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_CompanyModelKind.Entity = null; + previousValue.Base_CompanyModel.Remove(this); + } + this._Base_CompanyModelKind.Entity = value; + if ((value != null)) + { + value.Base_CompanyModel.Add(this); + this._CompanyModelKindId = value.CompanyModelKindId; + } + else + { + this._CompanyModelKindId = default(string); + } + this.SendPropertyChanged("Base_CompanyModelKind"); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Model_QualityModel_Base_CompanyModel", Storage="_Model_QualityModel", ThisKey="CompanyModelId", OtherKey="CompanyModelId", DeleteRule="NO ACTION")] public EntitySet Model_QualityModel { @@ -12546,6 +12622,168 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_CompanyModelKind")] + public partial class Base_CompanyModelKind : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _CompanyModelKindId; + + private string _CompanyModelKindCode; + + private string _CompanyModelKindName; + + private string _Remark; + + private EntitySet _Base_CompanyModel; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnCompanyModelKindIdChanging(string value); + partial void OnCompanyModelKindIdChanged(); + partial void OnCompanyModelKindCodeChanging(string value); + partial void OnCompanyModelKindCodeChanged(); + partial void OnCompanyModelKindNameChanging(string value); + partial void OnCompanyModelKindNameChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Base_CompanyModelKind() + { + this._Base_CompanyModel = new EntitySet(new Action(this.attach_Base_CompanyModel), new Action(this.detach_Base_CompanyModel)); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyModelKindId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string CompanyModelKindId + { + get + { + return this._CompanyModelKindId; + } + set + { + if ((this._CompanyModelKindId != value)) + { + this.OnCompanyModelKindIdChanging(value); + this.SendPropertyChanging(); + this._CompanyModelKindId = value; + this.SendPropertyChanged("CompanyModelKindId"); + this.OnCompanyModelKindIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyModelKindCode", DbType="NVarChar(50)")] + public string CompanyModelKindCode + { + get + { + return this._CompanyModelKindCode; + } + set + { + if ((this._CompanyModelKindCode != value)) + { + this.OnCompanyModelKindCodeChanging(value); + this.SendPropertyChanging(); + this._CompanyModelKindCode = value; + this.SendPropertyChanged("CompanyModelKindCode"); + this.OnCompanyModelKindCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyModelKindName", DbType="NVarChar(50)")] + public string CompanyModelKindName + { + get + { + return this._CompanyModelKindName; + } + set + { + if ((this._CompanyModelKindName != value)) + { + this.OnCompanyModelKindNameChanging(value); + this.SendPropertyChanging(); + this._CompanyModelKindName = value; + this.SendPropertyChanged("CompanyModelKindName"); + this.OnCompanyModelKindNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(100)")] + 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_Base_CompanyModel_Base_CompanyModelKind", Storage="_Base_CompanyModel", ThisKey="CompanyModelKindId", OtherKey="CompanyModelKindId", DeleteRule="NO ACTION")] + public EntitySet Base_CompanyModel + { + get + { + return this._Base_CompanyModel; + } + set + { + this._Base_CompanyModel.Assign(value); + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + + private void attach_Base_CompanyModel(Base_CompanyModel entity) + { + this.SendPropertyChanging(); + entity.Base_CompanyModelKind = this; + } + + private void detach_Base_CompanyModel(Base_CompanyModel entity) + { + this.SendPropertyChanging(); + entity.Base_CompanyModelKind = null; + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_Components")] public partial class Base_Components : INotifyPropertyChanging, INotifyPropertyChanged {