导出表格修改

This commit is contained in:
李超 2023-05-21 17:23:24 +08:00
parent 01a9f8557b
commit 117a54916a
5 changed files with 91 additions and 32 deletions

View File

@ -1327,3 +1327,41 @@ IP地址:::1
出错时间:05/19/2023 16:50:21
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 FineUIPro.Web.BaseInfo.TrainType.GetButtonPower() 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\BaseInfo\TrainType.aspx.cs:行号 260
在 FineUIPro.Web.BaseInfo.TrainType.Page_Load(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\BaseInfo\TrainType.aspx.cs:行号 15
在 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)
出错时间:05/21/2023 16:18:53
出错文件:http://localhost:1295/BaseInfo/TrainType.aspx
IP地址:::1
出错时间:05/21/2023 16:18:53
错误信息开始=====>
错误类型:NullReferenceException
错误信息:未将对象引用设置到对象的实例。
错误堆栈:
在 FineUIPro.Web.HSSE.HiddenInspection.HiddenRectificationList.GetGridTableHtml(Grid grid) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\HiddenInspection\HiddenRectificationList.aspx.cs:行号 723
在 FineUIPro.Web.HSSE.HiddenInspection.HiddenRectificationList.btnOut_Click(Object sender, EventArgs e) 位置 D:\project\vs\sggl_cd\SGGL\FineUIPro.Web\HSSE\HiddenInspection\HiddenRectificationList.aspx.cs:行号 684
在 FineUIPro.Button.OnClick(EventArgs e)
在 (Button , EventArgs )
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:05/21/2023 16:29:44
出错文件:http://localhost:1295/HSSE/HiddenInspection/HiddenRectificationList.aspx
IP地址:::1
操作人员:JT
出错时间:05/21/2023 16:29:44

View File

@ -65,7 +65,7 @@
<f:ListItem Text="周检" Value="W" />
<f:ListItem Text="月检" Value="M" />
</f:DropDownList>
<f:DropDownList ID="drpStates" runat="server" EmptyText="按状态" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
<f:DropDownList ID="drpStates" runat="server" EmptyText="按状态" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged" EnableMultiSelect="true" EnableCheckBoxSelect="true"
LabelAlign="Right" Width="150px">
</f:DropDownList>
<f:DropDownList ID="drpProblemTypes" runat="server" EmptyText="按检查类型" AutoPostBack="true" OnSelectedIndexChanged="TextBox_TextChanged"
@ -121,13 +121,13 @@
<f:TemplateField ColumnID="tfImageUrl1" Width="120px" HeaderText="整改前" HeaderTextAlign="Center"
TextAlign="Left">
<ItemTemplate>
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("HazardRegisterId")) %>'></asp:Label>
<asp:Label ID="lbImageUrl1" runat="server" Text='<%# ConvertImageUrlByImage(Eval("HazardRegisterId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfImageUrl2" Width="120px" HeaderText="整改后" HeaderTextAlign="Center"
TextAlign="Left">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# ConvertImgUrlByImage(Eval("HazardRegisterId")) %>'></asp:Label>
<asp:Label ID="lbImageUrl2" runat="server" Text='<%# ConvertImgUrlByImage(Eval("HazardRegisterId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="200px" ColumnID="RegisterDef" DataField="RegisterDef" SortField="RegisterDef"

View File

@ -63,9 +63,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
handleStep4.Id = "4";
handleStep4.Name = "超期未整改";
handleSteps.Add(handleStep4);
Model.HandleStep handleStep5 = new Model.HandleStep();
handleStep5.Id = "-1";
handleStep5.Name = "作废";
handleSteps.Add(handleStep5);
this.drpStates.DataSource = handleSteps; ;
this.drpStates.DataBind();
Funs.FineUIPleaseSelect(this.drpStates,"按状态");
this.drpStates.SelectedValue = "1";
ListItem[] ProblemTypes = new ListItem[2];
ProblemTypes[0] = new ListItem("日常巡检", "1");
ProblemTypes[1] = new ListItem("专项巡检", "2");
@ -157,27 +161,37 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
{
strSql += " and ProblemTypes ='"+this.drpProblemTypes.SelectedValue+"' " ;
}
if (this.drpStates.SelectedValue != BLL.Const._Null)
if (this.drpStates.SelectedValueArray != null && this.drpStates.SelectedValueArray.Length > 0)
{
if (this.drpStates.SelectedValue == "1")
string strSqlTemp = "";
if (this.drpStates.SelectedValueArray.Contains("1"))
{
strSql += " AND States = '1' and RectificationPeriod > getdate()";
}
else if (this.drpStates.SelectedValue == "2")
strSqlTemp += " ( States = '1' and RectificationPeriod > getdate() ) OR";
}
if (this.drpStates.SelectedValueArray.Contains("2"))
{
strSql += " AND States in( '2','3') and RectificationPeriod > RectificationTime";
strSqlTemp += " ( States in( '2','3') and RectificationPeriod > RectificationTime) OR";
}
else if (this.drpStates.SelectedValue == "3")
if (this.drpStates.SelectedValueArray.Contains("3"))
{
strSql += " AND States in( '2','3') and RectificationPeriod < RectificationTime";
strSqlTemp += " (States in( '2','3') and RectificationPeriod < RectificationTime ) OR";
}
else if (this.drpStates.SelectedValue == "4")
if (this.drpStates.SelectedValueArray.Contains("4"))
{
strSql += " AND States ='1' and RectificationPeriod < getdate()";
}
strSqlTemp += " ( States ='1' and RectificationPeriod < getdate() ) OR";
}
if (this.drpStates.SelectedValueArray.Contains("-1"))
{
strSqlTemp += " States ='-1' OR";
}
if (!string.IsNullOrEmpty(strSqlTemp))
{
strSql += " and (" + strSqlTemp.TrimEnd('R').TrimEnd('O') + ") ";
}
}
if (!CommonService.IsMainUnitOrAdmin(this.CurrUser.UserId))
{
@ -626,7 +640,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
var registration = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(registrationId.ToString());
if (registration != null)
{
url = BLL.UploadAttachmentService.ShowImage("../../", registration.RectificationImageUrl);
url = BLL.UploadAttachmentService.ShowImage(ConfigurationManager.AppSettings["SGGLUrl"], registration.RectificationImageUrl);
}
}
return url;
@ -655,6 +669,9 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
else if (registration.States =="1" && registration. RectificationPeriod.Value <DateTime.Now)
{
state += "超期未整改";
}else if (registration.States == "-1")
{
state += "作废";
}
}
@ -700,9 +717,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
sb.Append("<tr>");
foreach (GridColumn column in grid.Columns)
{
if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "tfImageUrl1" && column.ColumnID != "tfImageUrl2" && column.ColumnID != "Punish" && column.ColumnID != "Del")
if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "tfImageUrl1" && column.ColumnID != "lbImageUrl2" && column.ColumnID != "Punish" && column.ColumnID != "Del")
{
sb.AppendFormat("<td>{0}</td>", column.HeaderText);
}else if (column.ColumnID == "tfImageUrl1" || column.ColumnID == "lbImageUrl2")
{
sb.AppendFormat("<td ><div style=\"width: 120px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;\">{0}</div></td>", column.HeaderText);
}
}
sb.Append("</tr>");
@ -711,29 +732,29 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
sb.Append("<tr>");
foreach (GridColumn column in grid.Columns)
{
if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "tfImageUrl1" && column.ColumnID != "tfImageUrl2" && column.ColumnID != "Punish" && column.ColumnID != "Del")
if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "Punish" && column.ColumnID != "Del")
{
string html = row.Values[column.ColumnIndex].ToString();
if (column.ColumnID == "tfPageIndex")
{
html = (row.FindControl("lblPageIndex") as AspNet.Label).Text;
}
if (column.ColumnID == "tfImageUrl")
if (column.ColumnID == "tfImageUrl1")
{
html = (row.FindControl("lbtnImageUrl") as AspNet.LinkButton).Text;
html = (row.FindControl("lbImageUrl1") as AspNet.Label).Text;
}
if (column.ColumnID == "tfRectificationImageUrl")
if (column.ColumnID == "tfImageUrl2")
{
html = (row.FindControl("lbtnRectificationImageUrl") as AspNet.LinkButton).Text;
html = (row.FindControl("lbImageUrl2") as AspNet.Label).Text;
}
if (column.ColumnID == "ProblemTypes")
{
html = (row.FindControl("lbProblemTypes") as AspNet.Label).Text;
}
//if (column.ColumnID == "tfCutPayment")
//{
// html = (row.FindControl("lbtnCutPayment") as AspNet.LinkButton).Text;
//}
if (column.ColumnID == "State")
{
html = (row.FindControl("Label1") as AspNet.Label).Text;
}
sb.AppendFormat("<td>{0}</td>", html);
}
}

View File

@ -222,22 +222,22 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
protected global::System.Web.UI.WebControls.Label lbProblemTypes;
/// <summary>
/// lbImageUrl 控件。
/// lbImageUrl1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbImageUrl;
protected global::System.Web.UI.WebControls.Label lbImageUrl1;
/// <summary>
/// Label2 控件。
/// lbImageUrl2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
protected global::System.Web.UI.WebControls.Label lbImageUrl2;
/// <summary>
/// Label1 控件。

View File

@ -17,7 +17,7 @@
<add key="SystemName" value="数字化施工管理信息平台V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
<add key="aspnet:MaxHttpCollectionKeys" value="50000"/>
<add key="SGGLUrl" value="http://localhost:1295/"/>
<add key="SGGLUrl" value="https://sggl.chengda.com/"/>
<add key="SystemVersion" value="SGGLPackFile_V2022-11-11-001"/>
<!--启用与集团实名制 True启用 False 不启用-->
<add key="EnableRealName" value="False"/>