public System.Drawing.Color GetColorForStatus(BudgetItemStatus Status) { switch (Status) { case BudgetItemStatus.Open: return(System.Drawing.Color.FromName("#ffffff")); case BudgetItemStatus.Saved: return(System.Drawing.Color.FromName("#999999")); case BudgetItemStatus.Prepared: return(System.Drawing.Color.FromName("#ffff00")); case BudgetItemStatus.Reviewed: return(System.Drawing.Color.FromName("#00ffff")); case BudgetItemStatus.Approved: return(System.Drawing.Color.FromName("#00ff00")); case BudgetItemStatus.ReviewerRejected: return(System.Drawing.Color.FromName("#ff00ff")); case BudgetItemStatus.ApproverRejected: return(System.Drawing.Color.FromName("#ff0000")); } return(System.Drawing.Color.FromName("#ffffff")); }
public System.Drawing.Color GetColorByStatusValue(char strValue) { BudgetItemStatus objEnum = (BudgetItemStatus)Enum.ToObject(typeof(BudgetItemStatus), strValue); return(GetColorForStatus(objEnum)); }
public string GetBudgetItemStatusEnumValue(BudgetItemStatus objItemStaus) { return(Convert.ToChar(objItemStaus).ToString()); }