public static LearnerPeriodStatsBoxToken Type2LearnerPeriodStatsBoxToken(this ReportEnums.eStatsTypes type, short index, decimal value, decimal previousValue) { return(new LearnerPeriodStatsBoxToken { Type = type , Index = index , DisplayedValue = value.ToString() , Tendency = value.Value2TendencyToken(previousValue) }); }
public static AuthorPeriodStatsBoxToken Type2AuthorPeriodStatsBoxToken(this ReportEnums.eStatsTypes type, short index, int value, int previousValue) { return(new AuthorPeriodStatsBoxToken { Type = type , Index = index , DisplayedValue = value.ToString() , Tendency = value.Value2TendencyToken(previousValue) }); }
public static LearnerPeriodStatsBoxToken Type2LearnerPeriodStatsBoxToken(this ReportEnums.eStatsTypes type, short index, int value, int previousValue, LearnerPeriodStatsBoxToken related = null) { return(new LearnerPeriodStatsBoxToken { Type = type , Index = index , DisplayedValue = value.ToString() , Tendency = value.Value2TendencyToken(previousValue) , Related = related }); }
public static TotalsBoxToken Type2TotalsBoxToken(this ReportEnums.eStatsTypes type, short index, int?total, int totalNew, int previousNew) { var box = new TotalsBoxToken { Type = type , Index = index , Total = total ?? 0 , New = totalNew }; box.Tendency = box.New.Value2TendencyToken(previousNew); return(box); }
public static SalesTotalsBoxToken Type2SalesTotalsBoxToken(this ReportEnums.eStatsTypes type, BaseCurrencyDTO currency, short index, decimal?total, int totalNew, int previousNew) { var box = new SalesTotalsBoxToken { Type = type , Index = index , TotalIncome = total ?? 0 , New = totalNew , Currency = currency }; box.Tendency = box.New.Value2TendencyToken(previousNew); return(box); }