예제 #1
0
        public ActionResult Index(HomeModel homeModel)
        {
            if (!ModelState.IsValid)
            {
                return(View(homeModel));
            }

            try
            {
                _adminData.SaveHomePageMetadata(homeModel);
                _alert.Set(this, AlertType.Success, "Changes have been saved");
            }
            catch (Exception)
            {
                _alert.Set(this, AlertType.Error, "Unable to save changes");
            }

            return(Index());
        }