// GET: Menus public ActionResult Index() { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } return(View(db.Menus.ToList())); }
// GET: Menus/Create public ActionResult Create() { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } return(View()); }
// GET: Blogs/Create public ActionResult Create() { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } ViewBag.blog_category_id = new SelectList(db.Categories, "category_id", "category_name"); return(View()); }
// GET: Blogs public ActionResult Index() { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } var blogs = db.Blogs.Include(b => b.Category); return(View(blogs.ToList())); }
public ActionResult DeleteConfirmed(int id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } Service_Area_Contents service_Area_Contents = db.Service_Area_Contents.Find(id); db.Service_Area_Contents.Remove(service_Area_Contents); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } Menu menu = db.Menus.Find(id); db.Menus.Remove(menu); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } Category category = db.Categories.Find(id); db.Categories.Remove(category); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } Feature_Boxes feature_Boxes = db.Feature_Boxes.Find(id); db.Feature_Boxes.Remove(feature_Boxes); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } Testimonials_Slider testimonials_Slider = db.Testimonials_Slider.Find(id); db.Testimonials_Slider.Remove(testimonials_Slider); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult DeleteConfirmed(int id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } Project_Area project_Area = db.Project_Area.Find(id); db.Project_Area.Remove(project_Area); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "project_area_id,project_area_title,project_area_content,project_area_url")] Project_Area project_Area) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(project_Area).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(project_Area)); }
public ActionResult Edit([Bind(Include = "category_id,category_name")] Category category) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(category).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category)); }
public ActionResult Edit([Bind(Include = "feature_boxes_id,feature_boxes_title,feature_boxes_icon,feature_boxes_content,feature_boxes_url")] Feature_Boxes feature_Boxes) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(feature_Boxes).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(feature_Boxes)); }
public ActionResult Edit([Bind(Include = "contact_id,contact_phone,contact_email,contact_address,contact_work_time")] Contact contact) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(contact).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(contact)); }
public ActionResult Edit([Bind(Include = "message_id,message_name,message_email,message_website_url,message_content")] Message message) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(message).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(message)); }
public ActionResult Edit([Bind(Include = "testimonials_slider_id,testimonials_slider_icon,testimonials_slider_content,testimonials_slider_author,testimonials_slider_position,testimonials_slider_img")] Testimonials_Slider testimonials_Slider) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(testimonials_Slider).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(testimonials_Slider)); }
public ActionResult Edit([Bind(Include = "service_contents_id,service_contents_title,service_contents_content,service_contents_icon")] Service_Area_Contents service_Area_Contents) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(service_Area_Contents).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(service_Area_Contents)); }
public ActionResult Edit([Bind(Include = "menu_id,menu_text,menu_url")] Menu menu) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(menu).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(menu)); }
public ActionResult Edit([Bind(Include = "industries_id,industries_title,industries_content,industries_img,industries_url")] Industry industry) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(industry).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(industry)); }
public ActionResult Edit([Bind(Include = "slider_id,slider_title,slider_img,slider_first_url,slider_second_url")] Slider slider) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(slider).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(slider)); }
public ActionResult Create([Bind(Include = "menu_id,menu_text,menu_url")] Menu menu) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Menus.Add(menu); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(menu)); }
public ActionResult Create([Bind(Include = "category_id,category_name")] Category category) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Categories.Add(category); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(category)); }
public ActionResult Edit([Bind(Include = "blog_id,blog_title,blog_content,blog_img,blog_category_id")] Blog blog) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (ModelState.IsValid) { db.Entry(blog).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.blog_category_id = new SelectList(db.Categories, "category_id", "category_name", blog.blog_category_id); return(View(blog)); }
// GET: Menus/Edit/5 public ActionResult Edit(int?id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Menu menu = db.Menus.Find(id); if (menu == null) { return(HttpNotFound()); } return(View(menu)); }
// GET: Testimonials_Slider/Edit/5 public ActionResult Edit(int?id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Testimonials_Slider testimonials_Slider = db.Testimonials_Slider.Find(id); if (testimonials_Slider == null) { return(HttpNotFound()); } return(View(testimonials_Slider)); }
// GET: Industries/Details/5 public ActionResult Details(int?id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Industry industry = db.Industries.Find(id); if (industry == null) { return(HttpNotFound()); } return(View(industry)); }
// GET: Service_Area_Contents/Edit/5 public ActionResult Edit(int?id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Service_Area_Contents service_Area_Contents = db.Service_Area_Contents.Find(id); if (service_Area_Contents == null) { return(HttpNotFound()); } return(View(service_Area_Contents)); }
// GET: Sliders/Delete/5 public ActionResult Delete(int?id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Slider slider = db.Sliders.Find(id); if (slider == null) { return(HttpNotFound()); } return(View(slider)); }
// GET: Project_Area/Edit/5 public ActionResult Edit(int?id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Project_Area project_Area = db.Project_Area.Find(id); if (project_Area == null) { return(HttpNotFound()); } return(View(project_Area)); }
// GET: Blogs/Edit/5 public ActionResult Edit(int?id) { if (!AdminPanelMethods.CheckAdminLogin()) { return(RedirectToAction("Index", "Login")); } if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Blog blog = db.Blogs.Find(id); if (blog == null) { return(HttpNotFound()); } ViewBag.blog_category_id = new SelectList(db.Categories, "category_id", "category_name", blog.blog_category_id); return(View(blog)); }