public ActionResult DeleteConfirmed(int id) { LOAILK lOAILK = db.LOAILKs.Find(id); db.LOAILKs.Remove(lOAILK); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "MaLLK,TENLLK")] LOAILK lOAILK) { if (ModelState.IsValid) { db.Entry(lOAILK).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(lOAILK)); }
public ActionResult Create([Bind(Include = "MaLLK,TENLLK")] LOAILK lOAILK) { if (ModelState.IsValid) { db.LOAILKs.Add(lOAILK); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(lOAILK)); }
// GET: LOAILKs/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LOAILK lOAILK = db.LOAILKs.Find(id); if (lOAILK == null) { return(HttpNotFound()); } return(View(lOAILK)); }