110,889
社区成员
发帖
与我相关
我的任务
分享
private void gvProduct_RowCellStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs e)
{
DevExpress.Utils.AppearanceDefault appNotPass1 = new DevExpress.Utils.AppearanceDefault(Color.Black, Color.Salmon, Color.Empty, Color.SeaShell, System.Drawing.Drawing2D.LinearGradientMode.Horizontal);
DevExpress.Utils.AppearanceDefault appNotPass2 = new DevExpress.Utils.AppearanceDefault(Color.Black, Color.Yellow, Color.Empty, Color.SeaShell, System.Drawing.Drawing2D.LinearGradientMode.Horizontal);
DevExpress.Utils.AppearanceDefault appNotPass3 = new DevExpress.Utils.AppearanceDefault(Color.Black, Color.Green, Color.Empty, Color.SeaShell, System.Drawing.Drawing2D.LinearGradientMode.Horizontal);
if (e.Column.FieldName == "Available")
{
DataRow dr = gvProduct.GetDataRow(e.RowHandle);
string strTemp = dr[e.Column.FieldName].ToString().Trim();
if (!string.IsNullOrEmpty(strTemp))
{
switch (strTemp)
{
case "保存未提交": DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, appNotPass1); break;
case "审核未通过": DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, appNotPass1); break;
case "提交未审核": DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, appNotPass2); break;
case "审核通过": DevExpress.Utils.AppearanceHelper.Apply(e.Appearance, appNotPass3); break;
}
}
}
}