Beispiel #1
0
        public void CreateSaleOrder(string money)
        {
            var inputAmount = 0m;

            decimal.TryParse(money, out inputAmount);
            _currentShopCat.PayAmount = inputAmount;
            if (_currentShopCat.Items.Count == 0)
            {
                MessageBox.Show("商品明细为空", "系统信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            _saleOrderService.CreateOrder(_currentShopCat);
            this.lblOrderCode.Text = "订单号:" + _currentShopCat.OrderCode;
            this.txtBarCode.Text   = "";

            // 显示支付窗体
            if (_currentShopCat.CheckCanPay())
            {
                frmPay payForm = frmPay.CreateForm();
                payForm.CurrentOrder = _currentShopCat;
                payForm.PosForm      = this;
                payForm.ShowDialog(this);
            }
            else
            {
                MessageBox.Show("有商品项数量为0,不能支付!请调整数量或ESC作废订单。", "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #2
0
 public static frmPay CreateForm()
 {
     //判断是否存在该窗体,或时候该字窗体是否被释放过,如果不存在该窗体,则 new 一个字窗体
     if (_instance == null || _instance.IsDisposed)
     {
         _instance = new frmPay();
     }
     return(_instance);
 }