2023-04-28

This commit is contained in:
2023-04-28 14:56:47 +08:00
parent f2ab2d5b73
commit 5b740e7bda
35 changed files with 1321 additions and 519 deletions
@@ -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