예제 #1
0
        public JsonResult EditNews(int id, string desc)
        {
            bool          result = _newsManager.EditNews(id, desc);
            MvcHtmlString jsonResult;

            if (result)
            {
                jsonResult = Alert.GetAlert(SetAlert.Set("Poprawnie zaktualizowano news!", "Sukcess", AlertType.Success));
            }
            else
            {
                jsonResult = Alert.GetAlert(SetAlert.Set("Wystąpił błąd, spróbuj ponownie później!", "Błąd", AlertType.Danger));
            }

            return(Json(jsonResult.ToHtmlString()));
        }