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) { 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 LoadNews() { Api.AdminNews.AdminNews apiobjNews = new Api.AdminNews.AdminNews(); List <Domain.Socioboard.Domain.News> lstPackage = (List <Domain.Socioboard.Domain.News>)(new JavaScriptSerializer().Deserialize(apiobjNews.GetAllNews(), typeof(List <Domain.Socioboard.Domain.News>))); return(View("_ManageNewsPartial", lstPackage)); }
public ActionResult UpdateNews(string News, string ExpiryDate, string Status) { 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")); } Domain.Socioboard.Domain.News objNews = (Domain.Socioboard.Domain.News)Session["NewsToUpdate"]; objNews.NewsDetail = News; objNews.ExpiryDate = Convert.ToDateTime(ExpiryDate); objNews.Status = bool.Parse(Status); string ObjPackage = (new JavaScriptSerializer().Serialize(objNews)); Api.AdminNews.AdminNews apiobjNews = new Api.AdminNews.AdminNews(); string NewsUpdateMessage = (string)(new JavaScriptSerializer().Deserialize(apiobjNews.UpdateNews(ObjPackage), typeof(string))); return(Content(NewsUpdateMessage)); }
public ActionResult LoadNews() { Api.AdminNews.AdminNews apiobjNews = new Api.AdminNews.AdminNews(); List<Domain.Socioboard.Domain.News> lstPackage = (List<Domain.Socioboard.Domain.News>)(new JavaScriptSerializer().Deserialize(apiobjNews.GetAllNews(), typeof(List<Domain.Socioboard.Domain.News>))); return View("_ManageNewsPartial", lstPackage); }
public ActionResult UpdateNews(string News,string ExpiryDate,string Status) { Domain.Socioboard.Domain.News objNews = (Domain.Socioboard.Domain.News)Session["NewsToUpdate"]; objNews.NewsDetail = News; objNews.ExpiryDate = Convert.ToDateTime(ExpiryDate); objNews.Status = bool.Parse(Status); string ObjPackage = (new JavaScriptSerializer().Serialize(objNews)); Api.AdminNews.AdminNews apiobjNews = new Api.AdminNews.AdminNews(); string NewsUpdateMessage = (string)(new JavaScriptSerializer().Deserialize(apiobjNews.UpdateNews(ObjPackage), typeof(string))); return Content(NewsUpdateMessage); }
public ActionResult AddNews(string News, string ExpiryDate, string Status) { Domain.Socioboard.Domain.News objNews = new Domain.Socioboard.Domain.News(); objNews.NewsDetail = News; objNews.ExpiryDate = Convert.ToDateTime(ExpiryDate); objNews.Status = bool.Parse(Status); objNews.Id = Guid.NewGuid(); string ObjPackage = (new JavaScriptSerializer().Serialize(objNews)); Api.AdminNews.AdminNews objApiNews = new Api.AdminNews.AdminNews(); string NewsAddedMessage = (string)(new JavaScriptSerializer().Deserialize(objApiNews.AddNews(ObjPackage,News), typeof(string))); return Content(NewsAddedMessage); }
public ActionResult UpdateNews(string News, string ExpiryDate, string Status) { Domain.Socioboard.Domain.News objNews = (Domain.Socioboard.Domain.News)Session["NewsToUpdate"]; objNews.NewsDetail = News; objNews.ExpiryDate = Convert.ToDateTime(ExpiryDate); objNews.Status = bool.Parse(Status); string ObjPackage = (new JavaScriptSerializer().Serialize(objNews)); Api.AdminNews.AdminNews apiobjNews = new Api.AdminNews.AdminNews(); string NewsUpdateMessage = (string)(new JavaScriptSerializer().Deserialize(apiobjNews.UpdateNews(ObjPackage), typeof(string))); return(Content(NewsUpdateMessage)); }
public ActionResult AddNews(string News, string ExpiryDate, string Status) { Domain.Socioboard.Domain.News objNews = new Domain.Socioboard.Domain.News(); objNews.NewsDetail = News; objNews.ExpiryDate = Convert.ToDateTime(ExpiryDate); objNews.Status = bool.Parse(Status); objNews.Id = Guid.NewGuid(); string ObjPackage = (new JavaScriptSerializer().Serialize(objNews)); Api.AdminNews.AdminNews objApiNews = new Api.AdminNews.AdminNews(); string NewsAddedMessage = (string)(new JavaScriptSerializer().Deserialize(objApiNews.AddNews(ObjPackage, News), typeof(string))); return(Content(NewsAddedMessage)); }
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)); }
public ActionResult LoadNews() { 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(); List <Domain.Socioboard.Domain.News> lstPackage = (List <Domain.Socioboard.Domain.News>)(new JavaScriptSerializer().Deserialize(apiobjNews.GetAllNews(), typeof(List <Domain.Socioboard.Domain.News>))); return(View("_ManageNewsPartial", lstPackage)); }
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); }
public ActionResult LoadNews() { 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(); List<Domain.Socioboard.Domain.News> lstPackage = (List<Domain.Socioboard.Domain.News>)(new JavaScriptSerializer().Deserialize(apiobjNews.GetAllNews(), typeof(List<Domain.Socioboard.Domain.News>))); return View("_ManageNewsPartial", lstPackage); }
public ActionResult UpdateNews(string News,string ExpiryDate,string Status) { 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"); } Domain.Socioboard.Domain.News objNews = (Domain.Socioboard.Domain.News)Session["NewsToUpdate"]; objNews.NewsDetail = News; objNews.ExpiryDate = Convert.ToDateTime(ExpiryDate); objNews.Status = bool.Parse(Status); string ObjPackage = (new JavaScriptSerializer().Serialize(objNews)); Api.AdminNews.AdminNews apiobjNews = new Api.AdminNews.AdminNews(); string NewsUpdateMessage = (string)(new JavaScriptSerializer().Deserialize(apiobjNews.UpdateNews(ObjPackage), typeof(string))); return Content(NewsUpdateMessage); }