2023-04-28
This commit is contained in:
@@ -7,6 +7,17 @@
|
||||
<title>HSE巡检</title>
|
||||
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<style type="text/css">
|
||||
.f-grid-row.Red {
|
||||
background-color: red;
|
||||
}
|
||||
.f-grid-row.Yellow {
|
||||
background-color: yellow;
|
||||
} .f-grid-row.Blue {
|
||||
background-color: deepskyblue;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
|
||||
@@ -107,8 +107,20 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.dpRiskLevel.SelectedValue.Trim()))
|
||||
{
|
||||
strSql += " AND Risk_Level = @Risk_Level";
|
||||
listStr.Add(new SqlParameter("@Risk_Level", this.dpRiskLevel.SelectedText) );
|
||||
if (this.dpRiskLevel.SelectedText == "重大")
|
||||
{
|
||||
strSql += " AND Risk_Level in('重大','3','高') ";
|
||||
}
|
||||
else if (this.dpRiskLevel.SelectedText == "较大")
|
||||
{
|
||||
strSql += " AND Risk_Level in('较大','2','较高') ";
|
||||
}
|
||||
else if (this.dpRiskLevel.SelectedText == "一般")
|
||||
{
|
||||
strSql += " AND Risk_Level in('一般','1','低') ";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.drpType.SelectedValue.Trim()))
|
||||
{
|
||||
@@ -163,6 +175,32 @@ namespace FineUIPro.Web.HSSE.HiddenInspection
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
{
|
||||
string HazardRegisterId = Grid1.Rows[i].DataKeys[0].ToString();
|
||||
Model.View_Hazard_HazardRegister registration = (from x in Funs.DB.View_Hazard_HazardRegister where x.HazardRegisterId == HazardRegisterId select x).FirstOrDefault();
|
||||
|
||||
if (registration != null)
|
||||
{
|
||||
if (registration.Risk_Level == "一般" || registration.Risk_Level == "1" || registration.Risk_Level == "低")
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "Blue";
|
||||
}else if (registration.Risk_Level == "较大" || registration.Risk_Level == "2" || registration.Risk_Level == "较高")
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "Yellow";
|
||||
}
|
||||
else if (registration.Risk_Level == "重大" || registration.Risk_Level == "3")
|
||||
{
|
||||
Grid1.Rows[i].RowCssClass = "Red";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
Reference in New Issue
Block a user