public ActionResult AfraMaterPostsTypes() { Blog_ModelFiller BMF = new Blog_ModelFiller(); BlogPostsModel bpm = new BlogPostsModel() { GroupsList = BMF.Groups_Filler() }; return(View(bpm)); }
public ActionResult NewBlogPost() { string SSSession = ""; if (HttpContext.Request.Cookies["TSHPANDAControll" + StaticLicense.LicName] != null) { HttpCookie cookie = HttpContext.Request.Cookies.Get("TSHPANDAControll" + StaticLicense.LicName); if (cookie != null) { SSSession = cookie.Value; } else { SSSession = "N.A"; } } else { SSSession = "N.A"; } CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { //ControllerContext.ParentActionViewContext.ViewBag.PageTitle = ""; Blog_ModelFiller BMF = new Blog_ModelFiller(); var Model = new Blog_Post_insert_Model() { Category = BMF.BCategory_Filler(), Groups = BMF.Groups_Filler(), Type = BMF.B_Types_Filler(), PostData = new PostModel() { Id = 0, AdminPic = "", Category = "", ImagePath = "", InGroup = "", title = "", text_min = "", text = "", tags = "", date = "", by = "", Tags = new List <string>(), Comments__ = 0, IsDeleted = 0, IsDisabled = 0, IsImportant = 0, SearchGravity = 0 } }; return(View(Model)); } else { return(RedirectToAction("NotAccess", "MS")); } }
public ActionResult EditPost(int Post_id) { string SSSession = ""; if (HttpContext.Request.Cookies["TSHPANDAControll" + StaticLicense.LicName] != null) { HttpCookie cookie = HttpContext.Request.Cookies.Get("TSHPANDAControll" + StaticLicense.LicName); if (cookie != null) { SSSession = cookie.Value; } else { SSSession = "N.A"; } } else { SSSession = "N.A"; } CheckAccess check = new CheckAccess(SSSession); if (check.HasAccess) { //ControllerContext.ParentActionViewContext.ViewBag.PageTitle = ""; Blog_ModelFiller BMF = new Blog_ModelFiller(); var Model = new Blog_Post_insert_Model() { Category = BMF.BCategory_Filler(), Groups = BMF.Groups_Filler(), Type = BMF.B_Types_Filler(), PostData = BMF.EditModelFiller(Post_id) }; Model.Tags = BMF.B_Tags_Filler(Convert.ToInt32(Model.PostData.Category)); return(View(Model)); } else { return(RedirectToAction("NotAccess", "MS")); } }