Beispiel #1
0
        public async Task <IActionResult> Update(PartUpdateGetModel model)
        {
            var partDto = await this.partService.GetPartUpdateModel(model.PartId);

            var partModel = PartUpdateOutputMapper.Map(partDto);

            return(this.View(partModel));
        }
Beispiel #2
0
        public async Task <IActionResult> Update(PartUpdateGetModel model)
        {
            if (!this.User.IsInRole(GlobalConstants.AdministratorRoleName))
            {
                return(this.Redirect("/Identity/Account/AccessDenied"));
            }

            var partDto = await this.partService.GetPartUpdateModel(model.PartId);

            var partModel = PartUpdateOutputMapper.Map(partDto);

            return(this.View(partModel));
        }