Example #1
0
        public virtual List <ScoreChartModel> GetScoreHistory(List <KeyValuePair <string, string> > queryParams)
        {
            var startDate = QueryParamsParsingService.StartDate(queryParams);
            var endDate   = QueryParamsParsingService.EndDate(queryParams);
            var servers   = QueryParamsParsingService.SelectedServers(queryParams);

            return(this.reportRepository.ReadScoreHistory(startDate.GetValueOrDefault(), endDate.GetValueOrDefault(), servers));
        }
Example #2
0
 public static GridConditions PopulateCommonGridConditions(List <KeyValuePair <string, string> > queryParams)
 {
     return(new GridConditions
     {
         sEcho = QueryParamsParsingService.GetValue(queryParams, "sEcho"),
         StartRow = QueryParamsParsingService.StartRow(queryParams),
         EndRow = QueryParamsParsingService.EndRow(queryParams),
         TimezoneOffset = QueryParamsParsingService.TimeZoneOffset(queryParams),
         StartDate = QueryParamsParsingService.StartDate(queryParams),
         EndDate = QueryParamsParsingService.EndDate(queryParams),
         ServerArtifactId = QueryParamsParsingService.ServerArtifactId(queryParams),
         SelectedServers = QueryParamsParsingService.SelectedServers(queryParams)
     });
 }
        internal static GridConditions PopulateGridConditions <T>(List <KeyValuePair <string, string> > queryParams)
            where T : struct, IConvertible
        {
            if (!typeof(T).IsEnum)
            {
                throw new ArgumentException("T must be an enumerated type");
            }

            //Grid conditions
            var gridConditions = QueryParamsParsingService.PopulateCommonGridConditions(queryParams);

            gridConditions.SortIndex     = QueryParamsParsingService.SortIndex(queryParams);
            gridConditions.SortColumn    = QueryParamsParsingService.SortColumn <T>(queryParams);
            gridConditions.SortDirection = QueryParamsParsingService.SortDirection(queryParams);

            return(gridConditions);
        }