Esempio n. 1
0
        public ActionResult DeleteSliderImage(string id = null)
        {
            try
            {
                session.IsAuthenticated();

                if (id != null)
                {
                    if (settingManager.DeleteSliderImageSettings(Convert.ToInt32(Security.Decrypt(id))))
                    {
                        ViewBag.SaveMessage = "Delete successfully.";
                        LoadSliderSettings();
                    }
                    else
                    {
                        ViewBag.ExErrorMessage = "Failed to Delete.";
                    }
                }

                return(RedirectToAction("Slider"));
            }
            catch (Exception ex)
            {
                ViewBag.ExErrorMessage = ex.Message;
                return(RedirectToAction("Slider"));
            }
        }