public static string getTrottoirZustand(ZustandsindexTyp typ) { switch (typ) { case ZustandsindexTyp.Unbekannt: return(UnknownZustand); case ZustandsindexTyp.Gut: return(Good); case ZustandsindexTyp.Mittel: return(Medium); case ZustandsindexTyp.Ausreichend: return(Sufficient); case ZustandsindexTyp.Kritisch: return(Critical); case ZustandsindexTyp.Schlecht: return(Bad); default: return(string.Empty); } }
public static string ToColorCode(this ZustandsindexTyp zustandsindexTyp) { switch (zustandsindexTyp) { case ZustandsindexTyp.Unbekannt: return("#9C9C9C"); case ZustandsindexTyp.Gut: return("#1CCF34"); case ZustandsindexTyp.Mittel: return("#F4F42D"); case ZustandsindexTyp.Ausreichend: return("#F2A232"); case ZustandsindexTyp.Kritisch: return("#EF0000"); case ZustandsindexTyp.Schlecht: return("#48024C"); default: throw new ArgumentOutOfRangeException("zustandsindexTyp"); } }
private DiagramPo CreateDiagramPo(ZustandsindexTyp z, JahresInterval jahresInterval) { return(new DiagramPo { ZustandsindexTyp = z, ZustandsindexTypBezeichnung = LocalizationService.GetLocalizedEnum(z), ColorCode = z.ToColorCode(), JahrVon = jahresInterval.JahrVon, JahrBis = jahresInterval.JahrBis }); }
private DiagramPo CreateDiagramPo(ZustandsindexTyp zustandsindexTyp, int sortOrder, FlaecheTyp flaecheTyp, string bezeichnung) { return(new DiagramPo { Value = 0, ZustandsindexTyp = zustandsindexTyp, ColumnSortOrder = sortOrder, RowSortOrder = (int)zustandsindexTyp, ColorCode = zustandsindexTyp.ToColorCode(), FlaecheTyp = flaecheTyp, Bezeichnung = bezeichnung }); }
//0.0-0.9 – gut //1.0-1.9 – mittel //2.0-2.9 – ausreichend //3.0-3.9 – kritisch //4.0-5.0 – schlecht public static decimal GetWert(ZustandsindexTyp zustandsindexTrottoirTyp) { switch (zustandsindexTrottoirTyp) { case ZustandsindexTyp.Gut: return(0m); case ZustandsindexTyp.Mittel: return(1m); case ZustandsindexTyp.Ausreichend: return(2m); case ZustandsindexTyp.Kritisch: return(3m); case ZustandsindexTyp.Schlecht: return(4m); default: throw new ArgumentOutOfRangeException("zustandsindexTrottoirTyp", zustandsindexTrottoirTyp, "Value is out of range!"); } }
private TablePo CreateTablePo(JahresInterval jahresInterval, decimal?decimalValue, Func <decimal?, string> format, string zustandsindexTypBezeichnung, int sortOrder, int currentYear, ZustandsindexTyp zustandsindexTyp = ZustandsindexTyp.Unbekannt) { return(new TablePo { CurrentJahr = currentYear, AktualString = LocalizationService.GetLocalizedText("CurrentShort"), JahrVon = jahresInterval.JahrVon, JahrBis = jahresInterval.JahrBis, DecimalValue = decimalValue, Format = format, ZustandsindexTyp = zustandsindexTyp, ZustandsindexTypBezeichnung = zustandsindexTypBezeichnung, SortOrder = sortOrder, LegendImageUrl = reportLegendImageService.GetLegendUrlForEnum(zustandsindexTyp) }); }