public void CashPay() { try { var payAmount = CurrentOrder.PayAmount; decimal.TryParse(txtPayAmount.Text, out payAmount); CurrentOrder.PayAmount = payAmount; CurrentOrder.OnlinePayAmount = 0m; _orderService.CashPay(CurrentOrder.OrderId, CurrentOrder.PayAmount); PosForm.ClearItems(); ClosePayForm(); MessageBox.Show("支付成功!", "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (AppException aex) { MessageBox.Show(aex.Message, "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Warning); } catch (Exception ex) { _log.Error(ex); MessageBox.Show(ex.Message, "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }