Пример #1
0
        public IActionResult AddEditWorkType(int?id)
        {
            WorkTypeViewModel model = new WorkTypeViewModel();

            try
            {
                var workType = _repository.GetWorkTypeById(id);
                if (id.HasValue)
                {
                    model = _mapper.Map <WorkType, WorkTypeViewModel>(workType);
                }
                // ViewBag.ProcessName = _repository.GetAllControlTools();
                return(PartialView("~/Areas/Transit/Views/Transit/AddEditWorkType.cshtml", model));
            }
            catch (Exception ex)
            {
                return(BadRequest("Failed to get orders"));
            }
        }