Exemplo n.º 1
0
 public void CashPay()
 {
     try
     {
         var payAmount = CurrentOrder.PayAmount;
         decimal.TryParse(txtPayAmount.Text, out payAmount);
         CurrentOrder.PayAmount = -payAmount;
         var lincenseCode = txtLicenseCode.Text;
         _orderService.CashRefund(CurrentOrder.OrderId, lincenseCode, CurrentOrder.PayAmount);
         PosForm.ClearItems();
         MessageBox.Show("退款成功!", "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Information);
         ClosePayForm();
     }
     catch (AppException aex)
     {
         MessageBox.Show(aex.Message, "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }