public ActionResult Create() { categoryLogics = new CategoryLogics(); var data = categoryLogics.GetCategories(); return(View(data)); }
public ActionResult Index() { blogLogics = new BlogLogics(); categoryLogics = new CategoryLogics(); var data = categoryLogics.GetCategories(); if (data == null || data.Count == 0) { return(RedirectToAction("Index", "Category")); } var obj = blogLogics.GetBlogs(); return(View(obj)); }
public ActionResult Edit(int?Id) { blogLogics = new BlogLogics(); categoryLogics = new CategoryLogics(); if (Id == null) { return(View("Error")); } var data = blogLogics.GetBlog(Id); var CategoryList = categoryLogics.GetCategories(); if (data == null) { ViewBag.Msg = "No Blog found with this Blog-Id"; return(View("Error")); } ViewBag.Blog_Id = data.Id; ViewBag.Blog_Headline = data.Blog_Headline; ViewBag.Blog_Description = data.Blog_Description; return(View(CategoryList)); }
public ActionResult Index() { var data = categoryLogics.GetCategories(); return(View(data)); }