예제 #1
0
        public ActionResult CrudAdd(FilterWordModel model)
        {
            try
            {
                CrudRepo db     = new CrudRepo();
                bool     result = db.CrudAdd(model);
                if (result)
                {
                    TempData["success"] = "Saved Successfully";
                    return(RedirectToAction("Crud", "Home"));
                }
                else
                {
                    TempData["error"] = "Record Added & Updated Unsuccessfully";
                }
            }
            catch (Exception ex)
            {
                TempData["error"] = "Record Added & Updated Unsuccessfully";
            }

            return(View());
        }