예제 #1
0
        public ActionResult Create(ClinicCreate model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }
            var service = new ClinicService();

            if (service.CreateClinic(model))
            {
                TempData["SaveResult"] = "Clinic added to directory.";
                return(RedirectToAction("Index"));
            }
            ModelState.AddModelError("", "Failed to create Clinic.");
            return(View(model));
        }