public ActionResult DeleteConfirmed(string id) { RoLe roLe = db.RoLes.Find(id); db.RoLes.Remove(roLe); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "RoleID,HoVaTen,SoNgayLam")] RoLe roLe) { if (ModelState.IsValid) { db.Entry(roLe).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(roLe)); }
public ActionResult Create([Bind(Include = "RoleID,HoVaTen,SoNgayLam")] RoLe roLe) { if (ModelState.IsValid) { db.RoLes.Add(roLe); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(roLe)); }
// GET: RoLe/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } RoLe roLe = db.RoLes.Find(id); if (roLe == null) { return(HttpNotFound()); } return(View(roLe)); }