Ejemplo n.º 1
0
        public async Task <IActionResult> FifthQuery(GenericIntViewModel <SupplyAvgCountViewModel> aupplyAvgCountIntVM)
        {
            if (ModelState.IsValid)
            {
                var supplyAvgCountDTOs = await _queryService.GetSupplierWhereAvgCountMoreThanUserVal(aupplyAvgCountIntVM.Integer);

                var supplyAvgCountVMs = _mapper.Map <IEnumerable <SupplyAvgCountDTO>, IEnumerable <SupplyAvgCountViewModel> >(supplyAvgCountDTOs);
                aupplyAvgCountIntVM.Source = supplyAvgCountVMs;
            }
            return(View(aupplyAvgCountIntVM));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> FourthQuery(GenericIntViewModel <ProductViewModel> intTitleValueVM)
        {
            if (ModelState.IsValid)
            {
                var productDTOs = await _queryService.GetProductTitleAndPriceThatWasSaledToday(intTitleValueVM.Integer);

                var productVMs = _mapper.Map <IEnumerable <ProductDTO>, IEnumerable <ProductViewModel> >(productDTOs);
                intTitleValueVM.Source = productVMs;
            }
            return(View(intTitleValueVM));
        }
Ejemplo n.º 3
0
        public async Task <IActionResult> EighthQuery(GenericIntViewModel <DateSumViewModel> supplyDateSumVM)
        {
            if (ModelState.IsValid)
            {
                var supplyAvgCountDTOs = await _queryService.GetTotalSupplyCountGroupedByDate(supplyDateSumVM.Integer);

                var supplyAvgCountVMs = _mapper.Map <IEnumerable <DateSumDTO>, IEnumerable <DateSumViewModel> >(supplyAvgCountDTOs);
                supplyDateSumVM.Source = supplyAvgCountVMs;
            }
            return(View(supplyDateSumVM));
        }
Ejemplo n.º 4
0
        public IActionResult FifthQuery()
        {
            var g = new GenericIntViewModel <SupplyAvgCountViewModel>();

            return(View(g));
        }
Ejemplo n.º 5
0
        public IActionResult FourthQuery()
        {
            var g = new GenericIntViewModel <ProductViewModel>();

            return(View(g));
        }
Ejemplo n.º 6
0
        public IActionResult EighthQuery()
        {
            var g = new GenericIntViewModel <DateSumViewModel>();

            return(View(g));
        }