public ActionResult DeleteConfirmed(int id)
        {
            PhieuHoaDon phieuHoaDon = db.PhieuHoaDons.Find(id);

            db.PhieuHoaDons.Remove(phieuHoaDon);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
 public ActionResult Edit([Bind(Include = "IDphieu,MaPhieu,TenPhieu,SanPham")] PhieuHoaDon phieuHoaDon)
 {
     if (ModelState.IsValid)
     {
         db.Entry(phieuHoaDon).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(phieuHoaDon));
 }
        public ActionResult Create([Bind(Include = "IDphieu,MaPhieu,TenPhieu,SanPham")] PhieuHoaDon phieuHoaDon)
        {
            if (ModelState.IsValid)
            {
                db.PhieuHoaDons.Add(phieuHoaDon);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(phieuHoaDon));
        }
        // GET: PhieuHoaDons/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PhieuHoaDon phieuHoaDon = db.PhieuHoaDons.Find(id);

            if (phieuHoaDon == null)
            {
                return(HttpNotFound());
            }
            return(View(phieuHoaDon));
        }