Ejemplo n.º 1
0
 /// <summary>
 /// 按ESC 取消订单
 /// </summary>
 public void CreateCancelOrder()
 {
     try
     {
         if (ShopCatIsEmpty())
         {
             return;
         }
         DialogResult result = MessageBox.Show("你确定作废订单?", "系统信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (result == DialogResult.No)
         {
             return;
         }
         if (this._currentShopCat.OrderId == 0)
         {
             if (_currentShopCat.OrderAmount < 0)
             {
                 _currentShopCat.OrderType = 2;
             }
             _currentShopCat.WorkScheduleCode = _currentWork.Code;
             _saleOrderService.CreateOrder(_currentShopCat);
         }
         _saleOrderService.CancelOrder(_currentShopCat.OrderId, ContextService.CurrentAccount.Id);
         MessageBox.Show("订单作废成功", "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Information);
         //显示历史单据信息
         ShowCancelOrderInfo();
         this.ClearAll();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 2
0
 public ActionResult Cancel(IList <Guid> idList)
 {
     try
     {
         SaleOrderService.CancelOrder(idList);
         return(new BetterJsonResult());
     }
     catch (Exception ex)
     {
         return(new BetterJsonResult(ex.Message));
     }
 }