// POST: /Section/Delete/5 //[HttpPost, ActionName("Delete")] // [ValidateAntiForgeryToken] public ActionResult DeleteConfirmed(byte id) { HRP_SECTION hrp_section = db.HRP_SECTION.Find(id); db.HRP_SECTION.Remove(hrp_section); db.SaveChanges(); TempData["msg"] = "<script>alert('Deleted Section Information Succesfully !!');</script>"; return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "SECCODE,SECNAME,SECNMBG,SECFLOOR,PRSYMBOL,PSLNO,INSERTBY,INSERTDT,UPDATEBY,UPDATEDT,LAGGING_SLNO,LAGGING_HEADING")] HRP_SECTION hrp_section) { if (ModelState.IsValid) { db.Entry(hrp_section).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(hrp_section)); }
// GET: /Section/Edit/5 public ActionResult Edit(byte?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } HRP_SECTION hrp_section = db.HRP_SECTION.Find(id); if (hrp_section == null) { return(HttpNotFound()); } return(View(hrp_section)); }