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