Ejemplo n.º 1
0
        /// <summary>
        /// 右键清台操作
        /// </summary>
        private void toolStripMenuItem4_Click(object sender, EventArgs e)
        {
            if (PassValue.count_select_ordering == 1)//单张桌子的消台
            {
                HttpResult hr = httpReq.HttpDelete(string.Format("consumptions/{0}", PassValue.consumptionid));
                if ((int)hr.StatusCode == 0)
                {
                    MessageBox.Show(string.Format("{0}{1}", hr.StatusDescription, hr.OtherDescription), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    return;
                }
                else if ((int)hr.StatusCode == 409)
                {
                    MessageBox.Show("该桌子已被操作!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    return;
                }

                PassValue.selectedtableid.Clear();   //清空集合方便一下次存储值
                this.panelDesk.Controls.Clear();
                PassValue.ht.Clear();                //哈希表清空
                PassValue.count_select_ordering = 0; //被选中的桌子清空
                AddTables();                         //刷新
                CurrentChooseDesk.Clear();
                CurrentChooseDesk       = new Dictionary <string, string>();
                PassValue.consumptionid = "";
                this.lbInfor.Text       = this.lbInfor.Text.Split('[')[0] + "[空桌]";//餐台名称
                //人数
                this.lbPeople.Text = "0人";
            }
            else if (PassValue.count_select_ordering > 1)//多张桌子的消台
            {
                RemoveOrderingDesks rod = new RemoveOrderingDesks();
                rod.Owner = this;
                rod.ShowDialog();
            }
            else//其他情况
            {
                MessageBox.Show("请选择正在点菜的桌子", "天天100系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 右键清台操作
        /// </summary>
        private void toolStripMenuItem4_Click(object sender, EventArgs e)
        {
            if (PassValue.count_select_ordering == 1)//单张桌子的消台
            {
                HttpResult hr = httpReq.HttpDelete(string.Format("consumptions/{0}", PassValue.consumptionid));
                if ((int)hr.StatusCode == 0)
                {
                    MessageBox.Show(string.Format("{0}{1}", hr.StatusDescription, hr.OtherDescription), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    return;
                }
                else if ((int)hr.StatusCode == 409)
                {
                    MessageBox.Show("该桌子已被操作!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    return;
                }

                PassValue.selectedtableid.Clear();//清空集合方便一下次存储值
                this.panelDesk.Controls.Clear();
                PassValue.ht.Clear();//哈希表清空
                PassValue.count_select_ordering = 0;//被选中的桌子清空
                AddTables();//刷新
                CurrentChooseDesk.Clear();
                CurrentChooseDesk = new Dictionary<string, string>();
                PassValue.consumptionid = "";
                this.lbInfor.Text = this.lbInfor.Text.Split('[')[0] + "[空桌]";//餐台名称
                //人数
                this.lbPeople.Text = "0人";
            }
            else if (PassValue.count_select_ordering > 1)//多张桌子的消台
            {
                RemoveOrderingDesks rod = new RemoveOrderingDesks();
                rod.Owner = this;
                rod.ShowDialog();
            }
            else//其他情况
            {
                MessageBox.Show("请选择正在点菜的桌子", "天天100系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }