private TextWithStyle RankPointDeltaConverter(int?delta) { TextWithStyle data = new TextWithStyle(); if (delta.HasValue) { int value = delta.Value; data.Value = string.Format("(+{0})", value); if (value < 50) { data.HtmlClass = "cl-gray"; } else if (value < 100) { data.HtmlClass = "cl-green"; } else if (value < 150) { data.HtmlClass = "cl-blue"; } else { data.HtmlClass = "cl-blue font-bold"; } } return(data); }
private TextWithStyle StateConveter(StateType state) { TextWithStyle vws = new TextWithStyle(state.ToString()); if (state == StateType.Done) { vws.HtmlClass = "cl-green"; } else if (state == StateType.InProgress) { vws.HtmlClass = "cl-blue font-bold"; } else if (state == StateType.Planned) { vws.HtmlClass = "cl-gray"; } return(vws); }
private TextWithStyle TypeConveter(string type) { TextWithStyle vws = new TextWithStyle(type); if (type.Contains("Database")) { vws.HtmlClass = "bcl-red"; } else if (type.Contains("Front")) { vws.HtmlClass = "bcl-yellow"; } else if (type.Contains("Back")) { vws.HtmlClass = "bcl-blue"; } else if (type.Contains("Other")) { vws.HtmlClass = "bcl-gray"; } return(vws); }
private TextWithStyle RankingDeltaConverter(int?delta) { TextWithStyle data = new TextWithStyle(); if (delta.HasValue) { int value = delta.Value; data.Value = string.Format("({0}{1})", value >= 0 ? "\u2191" : "\u2193", Math.Abs(value)); if (value == 0) { data.HtmlClass = "cl-gray"; } else if (value < 0) { data.HtmlClass = "cl-red"; } else { data.HtmlClass = "cl-green"; } } return(data); }