public async Task <ActionResult> DeleteConfirmed(int id) { M_NewsSubCategoryMaster m_NewsSubCategoryMaster = await db.M_NewsSubCategoryMaster.FindAsync(id); db.M_NewsSubCategoryMaster.Remove(m_NewsSubCategoryMaster); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
public async Task <ActionResult> Edit([Bind(Include = "SubCategoryID,CategoryID,SubNewsCategory,SubNewsDesc,CreatedBy,CreatedDate,ModifiedBy,ModifiedDate,Active")] M_NewsSubCategoryMaster m_NewsSubCategoryMaster) { if (ModelState.IsValid) { db.Entry(m_NewsSubCategoryMaster).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.CategoryID = new SelectList(db.M_NewsCategoryMaster, "NewsCategoryID", "CategoryName", m_NewsSubCategoryMaster.CategoryID); return(View(m_NewsSubCategoryMaster)); }
// GET: M_NewsSubCategoryMaster/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } M_NewsSubCategoryMaster m_NewsSubCategoryMaster = await db.M_NewsSubCategoryMaster.FindAsync(id); if (m_NewsSubCategoryMaster == null) { return(HttpNotFound()); } return(View(m_NewsSubCategoryMaster)); }
// GET: M_NewsSubCategoryMaster/Edit/5 public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } M_NewsSubCategoryMaster m_NewsSubCategoryMaster = await db.M_NewsSubCategoryMaster.FindAsync(id); if (m_NewsSubCategoryMaster == null) { return(HttpNotFound()); } ViewBag.CategoryID = new SelectList(db.M_NewsCategoryMaster, "NewsCategoryID", "CategoryName", m_NewsSubCategoryMaster.CategoryID); return(View(m_NewsSubCategoryMaster)); }