private List <FiscalQuarterSummaryModel> SumQuarters(List <FiscalQuarterSummaryModel> fiscalQuarterSummaryModels)
        {
            var transactionModels = _getData.GetData();


            foreach (var transactionModel in transactionModels)
            {
                var dateTime1 = (DateTime)_fromStringToDate.ProcessDate(transactionModel.GetCreatedAtDateOnly());

                foreach (var fiscalQuarterSummaryModel in fiscalQuarterSummaryModels)
                {
                    if (dateTime1.Year == int.Parse(fiscalQuarterSummaryModel.TimePeriod) &&
                        (dateTime1.Month == fiscalQuarterSummaryModel.Months[0] || dateTime1.Month == fiscalQuarterSummaryModel.Months[1] || dateTime1.Month == fiscalQuarterSummaryModel.Months[2]))
                    {
                        fiscalQuarterSummaryModel.Sum = fiscalQuarterSummaryModel.Sum + 1;
                    }
                }
            }

            return(fiscalQuarterSummaryModels);
        }
        public List <DateSummaryModel> GetDataSet(object containsDate)
        {
            var requestParameters = (RequestParametersModel)containsDate;
            var fromDate          = (DateTime)_fromStringToDate.ProcessDate(requestParameters.FromDate);
            var fromDateCopy      = (DateTime)_fromStringToDate.ProcessDate(requestParameters.FromDate);
            var toDate            = (DateTime)_fromStringToDate.ProcessDate(requestParameters.ToDate);
            var dateSummaryModels = new List <DateSummaryModel>();


            for (var i = fromDate.Date.Ticks; i <= toDate.Date.Ticks; i += TimeSpan.TicksPerDay)
            {
                dateSummaryModels.Add(new DateSummaryModel(
                                          (string)_fromDateTimeToString.ProcessDate(fromDate.AddTicks(i - fromDate.Ticks))

                                          ));

                fromDate = fromDateCopy;
            }

            switch (requestParameters.View)
            {
            case 0:
                dateSummaryModels = GetCashFlowTimeSeries(dateSummaryModels);
                break;

            case 1:
                dateSummaryModels = GetFreeTransactionsTimeSeries(dateSummaryModels);
                break;

            case 2:
                dateSummaryModels = GetPaidTransactionsTimeSeries(dateSummaryModels);
                break;

            case 3:
                dateSummaryModels = GetCreditTransactionsTimeSeries(dateSummaryModels);
                break;
            }

            return(dateSummaryModels);
        }