public ActionResult DeleteConfirmed(int id) { QuanLyLinhKienMT quanLyLinhKienMT = db.QuanLyLinhKienMTs.Find(id); db.QuanLyLinhKienMTs.Remove(quanLyLinhKienMT); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "STT,LoaiLinhKien,ThuongHieu,TenLinhKien,DungLuong,KichThuoc,BusRAM,ChuanBoNho,Chipset,GiaBan,TinhTrangKho,ThoiHanBaoHanh,GhiChu")] QuanLyLinhKienMT quanLyLinhKienMT) { if (ModelState.IsValid) { db.Entry(quanLyLinhKienMT).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(quanLyLinhKienMT)); }
// GET: QuanLyLinhKienMTs/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } QuanLyLinhKienMT quanLyLinhKienMT = db.QuanLyLinhKienMTs.Find(id); if (quanLyLinhKienMT == null) { return(HttpNotFound()); } return(View(quanLyLinhKienMT)); }