public void CreateSaleRefund(string money) { // 退单 if (string.IsNullOrEmpty(money)) { _currentShopCat.PayAmount = _currentShopCat.OrderAmount;; } else { var inputAmount = 0m; decimal.TryParse(money, out inputAmount); _currentShopCat.PayAmount = inputAmount; } if (_currentShopCat.Items.Count == 0) { MessageBox.Show("退单无明细为空", "系统信息", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } _currentShopCat.OrderType = 2; // 销售退单 _saleOrderService.CreateSaleRefund(_currentShopCat); this.lblOrderCode.Text = "订单号:" + _currentShopCat.OrderCode; this.txtBarCode.Text = ""; if (_currentShopCat.OrderAmount < 0) { frmRefund refundFrom = frmRefund.CreateForm(); refundFrom.CurrentOrder = _currentShopCat; refundFrom.PosForm = this; refundFrom.ShowDialog(this); } else { MessageBox.Show("退单金额必须小于 0", "系统信息", MessageBoxButtons.OK, MessageBoxIcon.Information); } }