Beispiel #1
0
        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));
        }
Beispiel #2
0
        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"));
        }