Пример #1
0
        public ActionResult BillableAllocations(DateTime?from, DateTime?upto)
        {
            UtilizationReportDetailViewModel model = new UtilizationReportDetailViewModel();

            try
            {
                if (from.HasValue == false || upto.HasValue == false)
                {
                    DisplayWarningMessage("No records found. Please try with different dates");
                }
                else
                {
                    List <BillabilityWiseAllocationDetailDto> summaryDtos = allocationService.GetAllocationsForDates(from.Value, upto.Value);
                    model.From        = from.Value;
                    model.Upto        = upto.Value;
                    model.Allocations = Mapper.Map <List <BillabilityWiseAllocationDetailDto>, List <BillabilityWiseAllocationDetailModel> >(summaryDtos);
                    if (model.Allocations.Count() == 0)
                    {
                        DisplayWarningMessage("No records found. Please try with different dates");
                    }
                }
            }
            catch (Exception exp)
            {
                DisplayLoadErrorMessage(exp);
            }
            return(View(model));
        }
Пример #2
0
        public ActionResult UtilizationReportDetail(string filterType, string filterValue)
        {
            UtilizationReportDetailViewModel model = new UtilizationReportDetailViewModel();

            try
            {
                model.FilterType  = filterType;
                model.FilterValue = filterValue;
                List <BillabilityWiseAllocationDetailDto> summaryDtos = allocationService.GetBillabilityWiseAllocationDetail(filterType, filterValue);
                model.Allocations          = Mapper.Map <List <BillabilityWiseAllocationDetailDto>, List <BillabilityWiseAllocationDetailModel> >(summaryDtos);
                model.FilterValueListItems = GetFilterValueListItems(filterType);
                //LoadFilterValueListItems(filterType);
                if (model.Allocations.Count() == 0)
                {
                    DisplayWarningMessage("No records found. Please try with different filter conditions");
                }
            }
            catch (Exception exp)
            {
                DisplayLoadErrorMessage(exp);
            }
            return(View(model));
        }