Ejemplo n.º 1
0
        void MessageBoxShow(string msg)
        {
            Form form = new FormMessage(msg);

            form.ShowDialog();
        }
Ejemplo n.º 2
0
        DialogResult MessageBoxShow(string msg, bool returnResult = false)
        {
            Form form = new FormMessage(msg, returnResult);

            return(form.ShowDialog());
        }
Ejemplo n.º 3
0
        private void FormCheckout_Load(object sender, EventArgs e)
        {
            Location         = new Point(m_X, m_Y);
            labelTotal.Text  = m_Total.ToString();
            labelIncome.Text = m_Total.ToString();

            btnNumber0.Click   += btnNumberX_Click;
            btnNumber1.Click   += btnNumberX_Click;
            btnNumber2.Click   += btnNumberX_Click;
            btnNumber3.Click   += btnNumberX_Click;
            btnNumber4.Click   += btnNumberX_Click;
            btnNumber5.Click   += btnNumberX_Click;
            btnNumber6.Click   += btnNumberX_Click;
            btnNumber7.Click   += btnNumberX_Click;
            btnNumber8.Click   += btnNumberX_Click;
            btnNumber9.Click   += btnNumberX_Click;
            btnNumber100.Click += btnNumberX_Click;
            if (FormCashier.memberScore != null)
            {
                if (FormCashier.memberScore.Bread > 0)
                {
                    int num = 0;
                    if (FormCashier.BreadNO >= FormCashier.memberScore.Bread)
                    {
                        num = (int)FormCashier.memberScore.Bread;
                    }
                    FormMessage form = new FormMessage("请输入兑换面包数不大于" + num, 2);
                    form.ShowDialog();
                    if (ExchangeNo > 0)
                    {
                        try
                        {
                            //对面包list进行价格降序排列
                            mylist = (FormCashier.listBread.OrderByDescending(o => o.Price)).ToList();
                            //计算出兑换优惠价格
                            double ExchangeOfMoney = Foo((double)ExchangeNo, 0);
                            textBoxDeduct.Text    = ExchangeOfMoney.ToString();
                            textBoxDeduct.Enabled = false;
                        }
                        catch (Exception ex)
                        {
                            FormMessage exForm = new FormMessage("兑换面包后台计算出错,请暂停兑换面包操作并通知技术人员" + ex);
                        }
                    }
                }
            }
            if (m_Form.PayCode != null && m_Form.PayCode != "")
            {
                textBoxCashGot.Enabled = false;
                btnCouponA.Enabled     = false;
                btnCash.Enabled        = false;
                btnCard.Enabled        = false;
                char c0 = m_Form.PayCode[0];
                char c1 = m_Form.PayCode[1];
                if (c0 == '1' && (c1 > '0' && c1 <= '5'))   // 11-15是微信
                {
                    textBoxCashGot.Text = "刷微信不收现金";
                    m_PayBy             = 'E';
                }
                else
                {
                    textBoxCashGot.Text = "刷支付宝不收现金";
                    m_PayBy             = 'C';
                }
            }
        }