Ejemplo n.º 1
0
 public ActionResult Create(DistrictViewModel districtViewModel)
 {
     try
     {
         // TODO: Add insert logic here
         districtServices.Create(districtViewModel);
         TempData["message"] = "Inserted Successfully";
         return(RedirectToAction("Index"));
     }
     catch
     {
         return(View());
     }
 }
        public ActionResult Create(DistrictViewModel districtViewModel)
        {
            try
            {
                // TODO: Add insert logic here
                districtServices.Create(districtViewModel);

                Loaddropdown();
                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }