Beispiel #1
0
        // GET: /<controller>/
        public async Task <IActionResult> Index()
        {
            var mpid = await _userMpAppService.GetDefaultMpId();

            var model = new CreateOrEditMpSolicitudeTextViewModel()
            {
                MpID = mpid
            };

            return(View(model));
        }
Beispiel #2
0
        public async Task <PartialViewResult> CreateOrEditModal(int id)
        {
            if (id != 0)
            {
                var output = await _mpSolicitudeTextAppService.Get(new EntityDto <int>(id));

                var viewModel = new CreateOrEditMpSolicitudeTextViewModel(output);

                return(PartialView("_CreateOrEditModal", viewModel));
            }
            else
            {
                var mpid = await _userMpAppService.GetDefaultMpId();

                return(PartialView("_CreateOrEditModal", new CreateOrEditMpSolicitudeTextViewModel()
                {
                    MpID = mpid
                }));
            }
        }