This commit is contained in:
jackchenyang
2024-05-26 12:37:39 +08:00
parent 52b598aa1e
commit 16038d4776
6 changed files with 72 additions and 22 deletions
@@ -27,7 +27,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
BLL.Base_UnitService.InitProjectUnitDropDownList(this.drpUnitId, true, this.CurrUser.LoginProjectId, BLL.Const.UnitType_5, Resources.Lan.PleaseSelect);//单位
BLL.Project_WorkAreaService.InitWorkAreaDropDownList(this.drpWorkAreaId, true, this.CurrUser.LoginProjectId, string.Empty, this.drpUnitId.SelectedValue, string.Empty, Resources.Lan.PleaseSelect);//区域
this.BindGrid();
}
}
@@ -89,12 +89,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI
}
if (this.drpWorkAreaId.SelectedValue != BLL.Const._Null)
{
sql += " and WorkAreaId=@workAreaId";
sql += " and WorkAreaId=@workAreaId ";
listStr.Add(new SqlParameter("@workAreaId", this.drpWorkAreaId.SelectedValue));
}
if (this.drpIsALl.SelectedValue=="报警")
{
sql += " and RateBys<=2 and PMIBySNum<=2";
sql += " and ((RateBys<=2 and PMIBySNum<=2) or RateByf<=2 and PMIByFNum<=2)";
}
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text))
{
@@ -136,22 +136,17 @@ namespace FineUIPro.Web.WeldingProcess.PMI
decimal rates =Math.Round(Convert.ToDecimal(row["RateBys"]),2);
decimal ratef = Math.Round(Convert.ToDecimal(row["RateByf"]), 2);
AspNet.Label itemLable = e.Row.FindControl("labRateBys") as AspNet.Label;
if (itemLable !=null && !string.IsNullOrEmpty(itemLable.Text))
{
itemLable.Text = rates.ToString() + "%";
if (rates>0 && rates <= 2)
{
itemLable.ForeColor = Color.Red;
}
}
AspNet.Label labPMIBySNum = e.Row.FindControl("labPMIBySNum") as AspNet.Label;
AspNet.Label labRateByf = e.Row.FindControl("labRateByf") as AspNet.Label;
if(labRateByf!=null && !string.IsNullOrEmpty(labRateByf.Text))
AspNet.Label labPMIByFNum = e.Row.FindControl("labPMIByFNum") as AspNet.Label;
int PMIBySNum = Convert.ToInt32(labPMIBySNum.Text);
itemLable.Text = rates.ToString() + "%";
int PMIByFNum = Convert.ToInt32(labPMIByFNum.Text);
labRateByf.Text = ratef.ToString() + "%";
if ((rates <= 2 && PMIBySNum <= 2) || (ratef <= 2 && PMIByFNum <= 2))
{
labRateByf.Text= ratef.ToString() + "%";
if (ratef>0 && ratef <= 2)
{
labRateByf.ForeColor = Color.Red;
}
e.RowCssClass = "color1";
}
}