1
This commit is contained in:
@@ -188,6 +188,21 @@ namespace FineUIPro.Web.JDGL.SGManPower
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
||||
// for (int i = 0; i < Grid1.Rows.Count; i++)
|
||||
// {
|
||||
// DataRowView dataRow = (DataRowView)Grid1.Rows[i].DataItem;
|
||||
// if (dataRow != null && dataRow["Bias"] != null)
|
||||
// {
|
||||
// if (decimal.TryParse(dataRow["Bias"].ToString(), out decimal bias))
|
||||
// {
|
||||
// if (bias > 0.1m)
|
||||
// {
|
||||
// Grid1.Rows[i].RowCssClass = "yellow";
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -310,6 +325,14 @@ namespace FineUIPro.Web.JDGL.SGManPower
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
// 在页面中添加格式化方法
|
||||
protected string ConvertBiasPercent(object biasValue)
|
||||
{
|
||||
if (biasValue != null && decimal.TryParse(biasValue.ToString(), out decimal value))
|
||||
{
|
||||
return (value * 100).ToString("F2") + "%";
|
||||
}
|
||||
return "0.00%";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user