示例#1
0
        public async Task <IActionResult> Index(int?gestion, AlertaParametersModel alertaParameters)
        {
            var outputList = await _getAlertaGeneralUserCase.ExecuteList(gestion == null? 2018 : gestion.Value, alertaParameters.Monto, alertaParameters.Operador, alertaParameters.Porcentaje);

            var viewModel = new AlertaGeneralModelView
            {
                Data             = _mapper.Map <ICollection <AlertaGeneralOutput>, List <AlertaGeneralModel> >(outputList),
                AlertaParameters = alertaParameters,
            };

            return(View(viewModel));
        }
示例#2
0
        // GET: AlertaGeneral
        public async Task <ActionResult> Index(AlertaParametersModel alertaParameters)
        {
            var gestionActual = await _getGestionesUserCase.GestionVigente();

            var outputList = await _getAlertaGeneralUserCase.ExecuteList(gestionActual.Anio, alertaParameters.Monto, alertaParameters.Operador, alertaParameters.Porcentaje);

            var viewModel = new AlertaGeneralModelView
            {
                Data             = Mapper.Map <ICollection <AlertaGeneralOutput>, List <AlertaGeneralModel> >(outputList),
                AlertaParameters = alertaParameters,
            };

            return(View(viewModel));
        }