Example #1
0
        public IActionResult AddEditProject(int?id)
        {
            ProjectViewModel model = new ProjectViewModel();

            try
            {
                var project = _repository.GetProjectById(id);
                if (id.HasValue)
                {
                    model = _mapper.Map <Project, ProjectViewModel>(project);
                }
                // ViewBag.ProcessName = _repository.GetAllControlTools();
                return(PartialView("~/Areas/Transit/Views/Transit/AddEditProject.cshtml", model));
            }
            catch (Exception ex)
            {
                return(BadRequest("Failed to get orders"));
            }
        }