public ActionResult ConfirmAmount(int orderId)
        {
            var order = _da.GetById(orderId);

            if (order.Status != (int)StatusWarehouse.Pending)
            {
                return(Json(0, JsonRequestBehavior.AllowGet));
            }

            order.Status = (int)StatusWarehouse.WattingConfirm;
            _da.Save();
            return(Json(1, JsonRequestBehavior.AllowGet));
        }
Ejemplo n.º 2
0
        public async Task <ActionResult> ChangeStatus(int orderId, int status)
        {
            var lst   = _supplierDa.GetItems(EnterprisesItem.ID);
            var order = _storageWareHouseDa.GetById(orderId);

            if (!order.DN_RequestWare.Any(m => m.DN_RequestWareSupplier.Any(n => lst.Any(c => n.SupplierId == c.ID))))
            {
                return(Json(new JsonMessage(true, "Not authen")));
            }

            order.Status = status;
            _storageWareHouseDa.Save();

            return(Json(new JsonMessage(false, "Cập nhật thành công"), JsonRequestBehavior.AllowGet));
        }