Exemplo n.º 1
0
        public void execute(Form hander)
        {
            MainForm mf = hander as MainForm;

            if (ViewUtil.IsEmptyOrder(mf))
            {
                return;
            }

            PayListForm form = new PayListForm(showPayDialog);

            form.listBox1.SelectedValue = typeCode;
            DialogResult dr = form.ShowDialog();

            if (dr == DialogResult.Cancel)  //非正常关闭不做任何处理
            {
                logger.Debug("PayListForm close by esc");
            }
            else
            {
                SystemInfo.LastOrderId = SystemInfo.CurrentOrderId;
                saleOrderService.updateState(SystemInfo.CurrentOrderId, OrderState.Payed.ToString());
                SaleOrder order = saleOrderService.getOrderEntityById(SystemInfo.CurrentOrderId);
                if (SystemInfo.MQ_STATE)  //MQ连接存在发送同步消息
                {
                    logger.Debug("Send sync message Order code is " + order.ordercode);
                    MessageSender.getInstance().asyncSendMessage(order);
                }
                mf.presenter.init();
            }
            if (mf != null)
            {
                mf.barcodeInput.Text = "";
            }
        }
Exemplo n.º 2
0
 public PayListFormPresenter(PayListForm view)
 {
     this.view      = view;
     payTypeService = new PayTypeService();
     accountService = new AccountService();
     init();
 }
Exemplo n.º 3
0
 public void execute(Form hander)
 {
     PayListForm mf = hander as PayListForm;
     if (mf != null){
         DataRowView dr = mf.listBox1.SelectedItem as DataRowView;
         if (dr == null) return; //指定的支付类型不在列表之中不显示输入框
         PayForm form = new PayForm(dr);
         form.ShowDialog();
         mf.presenter.getTable();
     }
     
 }