コード例 #1
0
        public ActionResult AddRequest(SpecRequestInformation sInfo)
        {
            using (var sRepository = new SpecRequestRepository())
            {
                if (ModelState.IsValid)
                {
                    sRepository.AddSpecRequest(sInfo);

                    if (PaoliWebUser.CurrentUser.CanManageTypicals)
                    {
                        return(RedirectToAction("Manage"));
                    }
                    return(RedirectToAction("ViewAll"));
                }
                ViewBag.BlankInformation = sRepository.NewSpecRequest(true);
            }

            return(View(viewName: "NewAddRequest", model: sInfo));
        }