From e084057b6bb2e92edb0355cbee6cd67026f407bc Mon Sep 17 00:00:00 2001 From: 10191 <506754232@qq.com> Date: Sat, 29 Apr 2023 17:46:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=B1=E9=99=A9=E6=BA=90=E8=BE=A8=E8=AF=86?= =?UTF-8?q?=20=20=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/ErrLog.txt | 176 ++++++++++++++++++ .../HSSE/Check/CheckColligationEdit.aspx.cs | 4 + .../HSSE/Hazard/HazardList.aspx.cs | 69 ++++++- SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx | 57 +++++- SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx.cs | 64 ++++++- .../ToDo/HSSEToDo.aspx.designer.cs | 80 +++++++- 6 files changed, 438 insertions(+), 12 deletions(-) diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 00dc6d31..25e4fd40 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -96,3 +96,179 @@ IP地址:::1 出错时间:04/27/2023 15:21:49 + +错误信息开始=====> +错误类型:JsonReaderException +错误信息:Unexpected character encountered while parsing value: 未. Path '', line 0, position 0. +错误堆栈: + 在 Newtonsoft.Json.JsonTextReader.ParseValue() + 在 Newtonsoft.Json.JsonTextReader.Read() + 在 Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) + 在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) + 在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value) + 在 BLL.WeatherService.GetWeather(String projectId) 位置 D:\project\vs\sggl_cd\SGGL\BLL\Common\WeatherService.cs:行号 96 +出错时间:04/28/2023 18:29:17 +出错时间:04/28/2023 18:29:17 + + +错误信息开始=====> +错误类型:JsonReaderException +错误信息:Unexpected character encountered while parsing value: 未. Path '', line 0, position 0. +错误堆栈: + 在 Newtonsoft.Json.JsonTextReader.ParseValue() + 在 Newtonsoft.Json.JsonTextReader.Read() + 在 Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) + 在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) + 在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value) + 在 BLL.WeatherService.GetWeather(String projectId) 位置 D:\project\vs\sggl_cd\SGGL\BLL\Common\WeatherService.cs:行号 96 +出错时间:04/28/2023 18:29:33 +出错时间:04/28/2023 18:29:33 + + +错误信息开始=====> +错误类型:JsonReaderException +错误信息:Unexpected character encountered while parsing value: 未. Path '', line 0, position 0. +错误堆栈: + 在 Newtonsoft.Json.JsonTextReader.ParseValue() + 在 Newtonsoft.Json.JsonTextReader.Read() + 在 Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) + 在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) + 在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value) + 在 BLL.WeatherService.GetWeather(String projectId) 位置 D:\project\vs\sggl_cd\SGGL\BLL\Common\WeatherService.cs:行号 96 +出错时间:04/28/2023 18:29:36 +出错时间:04/28/2023 18:29:36 + + +错误信息开始=====> +错误类型:SqlException +错误信息:参数化查询 '(@ProjectId nvarchar(4000))select HazardList.HazardListId,Hazard' 需要参数 '@ProjectId',但未提供该参数。 +错误堆栈: + 在 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.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 D:\project\vs\sggl_cd\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.HSSE.Hazard.HazardList.BindGrid() 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Hazard\HazardList.aspx.cs:行号 100 + 在 FineUIPro.Web.HSSE.Hazard.HazardList.Page_Load(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Hazard\HazardList.aspx.cs:行号 65 + 在 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) +出错时间:04/29/2023 17:32:15 +出错文件:http://localhost:1295/HSSE/Hazard/HazardList.aspx +IP地址:::1 +操作人员:JT + +出错时间:04/29/2023 17:32:15 + + +错误信息开始=====> +错误类型:JsonReaderException +错误信息:Unexpected character encountered while parsing value: 未. Path '', line 0, position 0. +错误堆栈: + 在 Newtonsoft.Json.JsonTextReader.ParseValue() + 在 Newtonsoft.Json.JsonTextReader.Read() + 在 Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) + 在 Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) + 在 Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) + 在 Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value) + 在 BLL.WeatherService.GetWeather(String projectId) 位置 D:\project\vs\sggl_cd\SGGL\BLL\Common\WeatherService.cs:行号 96 +出错时间:04/29/2023 17:34:03 +出错时间:04/29/2023 17:34:03 + + +错误信息开始=====> +错误类型:SqlException +错误信息:参数化查询 '(@ProjectId nvarchar(4000))select HazardList.HazardListId,Hazard' 需要参数 '@ProjectId',但未提供该参数。 +错误堆栈: + 在 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.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 D:\project\vs\sggl_cd\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.HSSE.Hazard.HazardList.BindGrid() 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Hazard\HazardList.aspx.cs:行号 100 + 在 FineUIPro.Web.HSSE.Hazard.HazardList.Page_Load(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Hazard\HazardList.aspx.cs:行号 65 + 在 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) +出错时间:04/29/2023 17:37:44 +出错文件:http://localhost:1295/HSSE/Hazard/HazardList.aspx +IP地址:::1 +操作人员:JT + +出错时间:04/29/2023 17:37:44 + + +错误信息开始=====> +错误类型:SqlException +错误信息:参数化查询 '(@ProjectId nvarchar(4000))select HazardList.HazardListId,Hazard' 需要参数 '@ProjectId',但未提供该参数。 +错误堆栈: + 在 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.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 D:\project\vs\sggl_cd\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.HSSE.Hazard.HazardList.BindGrid() 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Hazard\HazardList.aspx.cs:行号 100 + 在 FineUIPro.Web.HSSE.Hazard.HazardList.Page_Load(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\Hazard\HazardList.aspx.cs:行号 65 + 在 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) +出错时间:04/29/2023 17:44:44 +出错文件:http://localhost:1295/HSSE/Hazard/HazardList.aspx +IP地址:::1 +操作人员:JT + +出错时间:04/29/2023 17:44:44 + diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckColligationEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/CheckColligationEdit.aspx.cs index 3544b1a5..05249910 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckColligationEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckColligationEdit.aspx.cs @@ -366,6 +366,10 @@ namespace FineUIPro.Web.HSSE.Check } ////保存流程审核数据 this.ctlAuditFlow.btnSaveData(this.ProjectId, BLL.Const.ProjectCheckColligationMenuId, this.CheckColligationId, (type == BLL.Const.BtnSubmit ? true : false), this.txtCheckDate.Text.Trim(), "~/Check/CheckColligationView.aspx?CheckColligationId={0}"); + //if (type == BLL.Const.BtnSubmit) + //{ + // APICommonService.SendSubscribeMessage(this.ctlAuditFlow.NextPerson, "职业健康安全待办理", this.CurrUser.UserName, string.Format("{0:yyyy-MM-dd HH:mm:ss}", DateTime.Now)); + //} } #region 关闭弹出窗 diff --git a/SGGL/FineUIPro.Web/HSSE/Hazard/HazardList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Hazard/HazardList.aspx.cs index 2c24b463..d18131b1 100644 --- a/SGGL/FineUIPro.Web/HSSE/Hazard/HazardList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Hazard/HazardList.aspx.cs @@ -372,9 +372,29 @@ namespace FineUIPro.Web.HSSE.Hazard 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 = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml(Grid1)); + //this.Grid1.PageSize = Grid1.RecordCount; + //this.BindGrid(); + string strSql = @"select CodeRecords.Code AS '清单编号',HazardList.WorkAreaName as '单位工程',HazardList.IdentificationDate AS '辨识时间',ControllingPersonUsers.UserName AS '控制责任人', HazardList.VersionNo '版本号', Users.UserName as '编制人',HazardList.CompileDate as '编制日期' + ,WorkStage.WorkStageName '工作阶段' , SuperHazardListType.HazardListTypeName '危险源类别', HazardListType.HazardListTypeName '危险源项',HazardItems '危险因素明细',DefectsType '缺陷类型',MayLeadAccidents '可能导致的事故',HelperMethod '辅助方法', + HazardJudge_L L ,HazardJudge_E E,HazardJudge_C C,HazardJudge_D D ,HazardLevel '危险级别',ControlMeasures '控制措施' + from Hazard_HazardList AS HazardList + LEFT JOIN Sys_FlowOperate AS FlowOperate ON HazardList.HazardListId=FlowOperate.DataId AND FlowOperate.IsClosed <> 1 + LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId + LEFT JOIN Sys_User AS Users ON HazardList.CompileMan=Users.UserId + LEFT JOIN Sys_User AS ControllingPersonUsers ON HazardList.ControllingPerson=ControllingPersonUsers.UserId + LEFT JOIN Sys_CodeRecords AS CodeRecords ON HazardList.HazardListId=CodeRecords.DataId + LEFT JOIN Hazard_HazardSelectedItem AS SelectedItem ON SelectedItem.HazardListId = HazardList.HazardListId + LEFT JOIN Base_WorkStage AS WorkStage ON WorkStage.WorkStageId = SelectedItem.WorkStage + LEFT JOIN Technique_HazardListType AS HazardListType ON HazardListType.HazardListTypeId=SelectedItem.HazardListTypeId + LEFT JOIN Technique_HazardListType AS SuperHazardListType ON SuperHazardListType.HazardListTypeId = HazardListType.SupHazardListTypeId + where HazardList.ProjectId='"+CurrUser.UserId+"'"; + if (!string.IsNullOrEmpty(this.txtHazardListCode.Text.Trim())) + { + strSql += " AND HazardListCode LIKE '%"+this.txtHazardListCode.Text.Trim()+"%'"; + } + DataTable tb = SQLHelper.GetDataTableRunText(strSql, null); + + Response.Write(GetDataTableHtml(tb)); Response.End(); } @@ -424,7 +444,48 @@ namespace FineUIPro.Web.HSSE.Hazard return sb.ToString(); } - #endregion + #endregion + + + private string GetDataTableHtml(DataTable dt) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (DataColumn column in dt.Columns) + { + sb.AppendFormat("", column.ColumnName); + } + sb.Append(""); + foreach (DataRow row in dt.Rows) + { + sb.Append(""); + foreach (DataColumn column in dt.Columns) + { + string html = row[column.ColumnName].ToString(); + if(column.ColumnName== "编制日期"|| column.ColumnName == "辨识时间") + { + try + { + html = Funs.GetNewDateTime(row[column.ColumnName].ToString()).Value.ToString("yyyy-MM-dd"); + + }catch(Exception ex) { } + + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + + + #region 打印 /// diff --git a/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx b/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx index a4ca5829..4d3427f2 100644 --- a/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx +++ b/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx @@ -9,8 +9,61 @@
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx.cs b/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx.cs index c5120629..7b3996b6 100644 --- a/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx.cs +++ b/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx.cs @@ -1,4 +1,5 @@ -using System; +using BLL; +using System; using System.Collections.Generic; using System.Linq; using System.Web; @@ -7,10 +8,69 @@ using System.Web.UI.WebControls; namespace FineUIPro.Web.ToDo { - public partial class HSSEToDo : System.Web.UI.Page + public partial class HSSEToDo : PageBase { protected void Page_Load(object sender, EventArgs e) { + if (!IsPostBack) + { + BindGrid(); + } + } + void BindGrid() + { + //var getDataList = Funs.DB.Sp_APP_GetCQMSToDoItems(this.CurrUser.LoginProjectId, CurrUser.UserId).ToList(); + //Grid1.DataSource = getDataList; + //Grid1.RecordCount = getDataList.Count; + //Grid1.DataBind(); + + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 过滤表头 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid(); + } + + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + var getDataList = Funs.DB.Sp_APP_GetCQMSToDoItems(this.CurrUser.LoginProjectId, CurrUser.UserId).ToList(); + var record = getDataList.Find(x => x.DataId == e.RowID); + if (record != null) + { + var url = record.PCUrl; + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(url)); + } + + } + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + protected void WindowAtt_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); } } diff --git a/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx.designer.cs b/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx.designer.cs index 18148141..dbed19c5 100644 --- a/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ToDo/HSSEToDo.aspx.designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ -// +// <自动生成> // 此代码由工具生成。 // -// 对此文件的更改可能会导致不正确的行为,并且如果 -// 重新生成代码,这些更改将会丢失。 -// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// //------------------------------------------------------------------------------ namespace FineUIPro.Web.ToDo @@ -22,5 +22,77 @@ namespace FineUIPro.Web.ToDo /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 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; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; } }