public IActionResult ChangeProgress(int id, int status) { GioHang gh = db.GioHang.SingleOrDefault(x => x.MaGioHang == id); gh.TrangThai = status; GioHangViewModel query = new GioHangViewModel(db); query.EditGioHang(gh); return(Json(true)); }
public IActionResult CancelOrder(string id) { GioHang gh = db.GioHang.Single(x => x.MaGioHang == int.Parse(id)); gh.TrangThai = -1; GioHangViewModel query = new GioHangViewModel(db); query.EditGioHang(gh); return(RedirectToAction("Index")); }