public ActionResult EditNews(string Id)
 {
     Api.AdminNews.AdminNews apiobjNews = new Api.AdminNews.AdminNews();
     Domain.Socioboard.Domain.News ObjNews = (Domain.Socioboard.Domain.News)(new JavaScriptSerializer().Deserialize(apiobjNews.GetNewsById(Id), typeof(Domain.Socioboard.Domain.News)));
     Session["NewsToUpdate"] = ObjNews;
     return View(ObjNews);
 }
        public ActionResult EditNews(string Id)
        {
            if (Session["User"] != null)
            {
                Domain.Socioboard.Domain.User _User = (Domain.Socioboard.Domain.User)Session["User"];
                if (_User.UserType != "SuperAdmin")
                {
                    return RedirectToAction("Index", "Index");
                }
            }
            else
            {
                return RedirectToAction("Index", "Index");
            }

            Api.AdminNews.AdminNews apiobjNews = new Api.AdminNews.AdminNews();
            Domain.Socioboard.Domain.News ObjNews = (Domain.Socioboard.Domain.News)(new JavaScriptSerializer().Deserialize(apiobjNews.GetNewsById(Id), typeof(Domain.Socioboard.Domain.News)));
            Session["NewsToUpdate"] = ObjNews;
            return View(ObjNews);
        }
Beispiel #3
0
 public ActionResult EditNews(string Id)
 {
     Api.AdminNews.AdminNews       apiobjNews = new Api.AdminNews.AdminNews();
     Domain.Socioboard.Domain.News ObjNews    = (Domain.Socioboard.Domain.News)(new JavaScriptSerializer().Deserialize(apiobjNews.GetNewsById(Id), typeof(Domain.Socioboard.Domain.News)));
     Session["NewsToUpdate"] = ObjNews;
     return(View(ObjNews));
 }
        public ActionResult EditNews(string Id)
        {
            if (Session["User"] != null)
            {
                Domain.Socioboard.Domain.User _User = (Domain.Socioboard.Domain.User)Session["User"];
                if (_User.UserType != "SuperAdmin")
                {
                    return(RedirectToAction("Index", "Index"));
                }
            }
            else
            {
                return(RedirectToAction("Index", "Index"));
            }

            Api.AdminNews.AdminNews       apiobjNews = new Api.AdminNews.AdminNews();
            Domain.Socioboard.Domain.News ObjNews    = (Domain.Socioboard.Domain.News)(new JavaScriptSerializer().Deserialize(apiobjNews.GetNewsById(Id), typeof(Domain.Socioboard.Domain.News)));
            Session["NewsToUpdate"] = ObjNews;
            return(View(ObjNews));
        }