Beispiel #1
0
        //顾客开单
        private void button1_Click(object sender, EventArgs e)
        {
            //显示开单窗体
            // TabPage tp=tabMain.SelectedTab;//.Control[0];
            // ListView lv=(ListView)tp.Controls[0];
            ListView lv = (ListView)(tabMain.SelectedTab.Controls[0]);
            //房间的对象
            RoomInfo room = (RoomInfo)tabMain.SelectedTab.Tag;

            //餐桌的对象
            if (lv.SelectedItems.Count <= 0)//没选中餐桌
            {
                md.MsgDivShow("请选中要点餐的餐桌", 1);
                return;
            }
            DeskInfo dk = (lv.SelectedItems[0].Tag as DeskInfo);

            if (dk.DeskState == 1)
            {
                md.MsgDivShow("请选择其余没在就餐的餐桌", 1);
                return;
            }
            FrmBilling fbi = FrmBilling.Single(dk.DeskId, dk.DeskName, room);

            fbi.FormClosed += new FormClosedEventHandler(fbi_FormClosed);
            fbi.Show();//显示开单窗体
        }
Beispiel #2
0
        private void btnBilling_Click(object sender, EventArgs e)
        {
            if (tabMain.TabCount <= 0)
            {
                md.MsgDivShow("sorry啊,店内装修,暂不营业", 1);
                return;
            }
            ListView lv = (ListView)tabMain.SelectedTab.Controls[0];

            if (lv.SelectedItems.Count <= 0)
            {
                md.MsgDivShow("亲,请先选择餐桌哦", 1);
                return;
            }
            RoomInfo room = (RoomInfo)tabMain.SelectedTab.Tag;
            DeskInfo desk = (DeskInfo)lv.SelectedItems[0].Tag;

            if (desk.DeskState == 1)
            {
                md.MsgDivShow("亲,请选择空闲的餐桌哦", 1);
                return;
            }
            FrmBilling fb = FrmBilling.Single(room, desk);

            fb.Main        = this;
            fb.TabMain     = tabMain;
            fb.FormClosed += fb_FormClosed;
            fb.Show();
        }
Beispiel #3
0
        //顾客开单
        private void button1_Click(object sender, EventArgs e)
        {
            ListView lv = (ListView)tabMain.SelectedTab.Controls[0];
            //房间对象
            RoomInfo room = (RoomInfo)(tabMain.SelectedTab.Tag);

            if (lv.SelectedItems.Count <= 0)
            {
                msg.MsgDivShow("请选择要开单的餐桌", 1);
                return;
            }
            DeskInfo desk = (lv.SelectedItems[0].Tag as DeskInfo);

            if (desk.DeskState == 1)//因为只允许单选,所以是tiems[0];
            {
                msg.MsgDivShow("您选择的餐桌这在就餐", 1);
                return;
            }

            FrmBilling f = FrmBilling.Single(desk.DeskId, desk.DeskName, room);

            f.Show();
        }