public ActionResult News(long?newsId)
        {
            PublicViewModel publicViewModel = new PublicViewModel();

            if (Session["CompanySetting"] != null)
            {
                publicViewModel.CompanySetting = (CompanySetting)Session["CompanySetting"];
            }
            else
            {
                publicViewModel.CompanySetting = CompanySettingsManager.GetCompanySettings(1);
            }

            if (string.IsNullOrEmpty(newsId.ToString()))
            {
                publicViewModel.NewsList = NewsEventsManager.GetAllNews();
                if (publicViewModel.NewsList.Any() && publicViewModel.NewsList.Count > 0)
                {
                    publicViewModel.News = publicViewModel.NewsList.FirstOrDefault();
                }
            }
            else
            {
                publicViewModel.NewsList = NewsEventsManager.GetAllNews();
                publicViewModel.News     = NewsEventsManager.GetNewsById(newsId);
            }

            return(View(publicViewModel));
        }
        public ActionResult UpdateNews(AdminViewModel av, long Id)
        {
            if (Id > 0)
            {
                av.News = NewsEventsManager.GetNewsById(Id);
                if (av.News != null)
                {
                    return(View("~/Views/News/InsertNews.cshtml", av));
                }
            }

            return(RedirectToAction("News"));
        }