示例#1
0
        public ActionResult ComplaintCreate(ComplaintCreate model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var service = new ComplaintService();

            if (service.ComplaintCreate(model))
            {
                TempData["SaveResult"] = "The Complaint was created.";
                return(RedirectToAction("Index"));
            }
            ;

            ModelState.AddModelError("", "The Complaint could not be created.");
            return(View(model));
        }