public ActionResult DeleteConfirmed(string id) { Chude chude = db.Chudes.Find(id); db.Chudes.Remove(chude); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult ThemChuDe(string TenChuDe) { Chude cd = new Chude(); cd.Tenchude = TenChuDe; db.Chudes.Add(cd); db.SaveChanges(); return(RedirectToAction("ThemSach")); }
public ActionResult Edit([Bind(Include = "machude,tenchude")] Chude chude) { if (ModelState.IsValid) { db.Entry(chude).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(chude)); }
public ActionResult Create([Bind(Include = "machude,tenchude")] Chude chude) { if (ModelState.IsValid) { db.Chudes.Add(chude); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(chude)); }
// GET: Chudes/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Chude chude = db.Chudes.Find(id); if (chude == null) { return(HttpNotFound()); } return(View(chude)); }
public static bool Chude_Update(Chude data) { return(db.Chude_Update(data)); }
public static bool Chude_Insert(Chude data) { return(db.Chude_Insert(data)); }