Example #1
0
        void af_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (结账状态.state)
            {
                ListView   lvi = tabControl1.SelectedTab.Controls[0] as ListView;
                FrmEndBill fb  = new FrmEndBill();
                fb.TBID         = lvi.SelectedItems[0].Tag.ToString();
                fb.TBName       = lvi.SelectedItems[0].Text;
                fb.FormClosing += new FormClosingEventHandler(fb_FormClosing);
                结账状态.state      = false;

                fb.Show();
            }
        }
Example #2
0
        private void pictureBox4_Click(object sender, EventArgs e)
        {
            //顾客结账
            ListView lvi = tabControl1.SelectedTab.Controls[0] as ListView;

            if (lvi.SelectedItems.Count <= 0)
            {
                new Warning("尚未选中结账餐桌", 图标.Erro).Show();
                return;
            }
            餐台状态 c = (餐台状态)lvi.SelectedItems[0].ImageIndex;

            switch (c)
            {
            case 餐台状态.可用:
                new Warning("此餐桌还没有开单", 图标.Erro).Show();
                break;

            case 餐台状态.占用:
                FrmEndBill fb = new FrmEndBill();
                fb.TBID   = lvi.SelectedItems[0].Tag.ToString();
                fb.TBName = lvi.SelectedItems[0].Text;


                fb.FormClosing += new FormClosingEventHandler(fb_FormClosing);

                fb.ShowDialog();
                break;

            case 餐台状态.预订:
                new Warning("此餐桌已经被预定", 图标.Erro).Show();
                break;

            case 餐台状态.停用:
                new Warning("此餐桌已经被停用", 图标.Erro).Show();
                break;

            default:
                break;
            }
        }