Exemple #1
0
        private void setOrder(TGzInfo gzinfo)
        {
            //getTakeOutTable
            string orderid = "";

            if (!RestClient.setorder(Globals.CurrTableInfo.tableNo, Globals.UserInfo.UserID, ref orderid))
            {
                Warning("开外卖台失败!");
                return;
            }
            try
            {
                Thread.Sleep(1000);
            }
            catch { }
            Globals.CurrOrderInfo.orderid = orderid;
            Globals.CurrTableInfo.tableid = RestClient.getTakeOutTableID();
            if (!bookOrder())
            {
                return;
            }
            RestClient.putOrder(Globals.CurrTableInfo.tableNo, orderid, gzinfo);
            Globals.ShoppTable.Clear();
            try
            {
                RestClient.caleTableAmount(Globals.UserInfo.UserID, orderid);
            }
            catch { }
            Warning("挂单成功,单号:" + orderid);
            //挂完单,把台关掉,再清掉购物车开新单
            //
        }
Exemple #2
0
        public static bool ShowWMInfo(out TGzInfo gzinfo)
        {
            frmWMInfo frm = new frmWMInfo();

            frm.ShowDialog();
            gzinfo            = frm.gzInfo;
            gzinfo.Gzname     = frm.edtdw.Text;
            gzinfo.Relaperson = frm.edtlinkman.Text;
            gzinfo.Telephone  = frm.edttele.Text;
            return(frm.DialogResult == DialogResult.OK);
        }
Exemple #3
0
        private void btnGd_Click(object sender, EventArgs e)
        {
            if (Globals.ShoppTable.Rows.Count <= 0)
            {
                return;
            }
            TGzInfo gzinfo = new TGzInfo();

            if (!frmWMInfo.ShowWMInfo(out gzinfo))
            {
                return;

                //if (!AskQuestion("确定要挂帐吗?"))
                //{
                //    return;
                // }
            }
            //挂帐 开台/下单/(关台,不结账)
            setOrder(gzinfo);
            //保存挂帐人信息到数据库
            string settleorderorderid = Globals.CurrOrderInfo.orderid;
        }