Beispiel #1
0
        public ActionResult CancelOrder()
        {
            if (!AppData.IsManagerLogin)
            {
                return(Json(new { success = false, msg = "您未登录后台或会话已过期" }));
            }
            if (PrivilegeBLL.HasNotPrivilege(AppData.SessionUserID, 1104))
            {
                return(Json(new { success = false, msg = "您没有执行该操作的权限" }));
            }

            Validation validation = new Validation();
            int        orderId    = validation.GetInt("orderId");

            OrderBLL orderBLL = new OrderBLL();
            OrderObj orderObj = orderBLL.GetOrderByID(orderId);

            if (orderObj == null)
            {
                return(Json(new { success = false, msg = "该订单不存在" }));
            }
            if (orderObj.Status == 2)
            {
                return(Json(new { success = false, msg = "该订单已被取消了" }));
            }

            orderBLL.CancelOrder(orderObj);

            return(Json(new { success = true }));
        }
Beispiel #2
0
        private void btnİptal_Click(object sender, EventArgs e)
        {
            var donen = OrderBLL.CancelOrder(masaID);


            if (donen.Item1)
            {
                MessageBox.Show(donen.Item2);
                //Masayı boş set et.
                TableBLL.SetTableFree(masaID);
            }
            else
            {
                MessageBox.Show(donen.Item2);
            }
        }
 public OperationResult <Boolean> DeleteStaffCancelOrder(UserInfo user)
 {
     return(orderBLL.CancelOrder(user.UserName));
 }