public ActionResult DeleteConfirmed(int id) { XuatKhau xuatKhau = db.XuatKhaus.Find(id); db.XuatKhaus.Remove(xuatKhau); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "IDRuou,TenRuou,NongDo,TinhChat,SoLuong,DonVi,TheTich,NguonGoc,NguoiXuat,NguoiNhap,Note")] XuatKhau xuatKhau) { if (ModelState.IsValid) { db.Entry(xuatKhau).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(xuatKhau)); }
public ActionResult Create([Bind(Include = "IDRuou,TenRuou,NongDo,TinhChat,SoLuong,DonVi,TheTich,NguonGoc,NguoiXuat,NguoiNhap,Note")] XuatKhau xuatKhau) { if (ModelState.IsValid) { db.XuatKhaus.Add(xuatKhau); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(xuatKhau)); }
// GET: XuatKhaus/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } XuatKhau xuatKhau = db.XuatKhaus.Find(id); if (xuatKhau == null) { return(HttpNotFound()); } return(View(xuatKhau)); }