Example #1
0
        private void menuOrder_Click(object sender, EventArgs e)
        {
            if (itemTable == null)
            {
                MessageBox.Show("请先选择餐桌!");
                return;
            }
            if (itemTable.ImageIndex == 0)
            {
                MessageBox.Show("当前餐桌未开单!");
                return;
            }
            var op = FormFactory.CreateOrderPay();

            op.Tag = itemTable.Tag;
            op.SetTableFreeEvent += Op_SetTableFree;
            op.Show();
            op.Focus();
        }
        private void menuOrder_Click(object sender, EventArgs e)
        {
            //如果没有餐桌选中,则提示
            if (itemTable == null)
            {
                MessageBox.Show("请选择要结账的餐桌!!!");
                return;
            }
            //判断当前选中的餐桌是否为空闲,如果是不则需要结账
            if (itemTable.ImageIndex == 0)
            {
                MessageBox.Show("当前餐桌并未开单,无需结账!!!");
                return;
            }
            OrderPay orderPay = FormFactory.GreateOP();

            orderPay.Tag = itemTable.Tag;
            orderPay.SetTableFreeEvent += SetTableFree;
            orderPay.Show();
            orderPay.Focus();
        }
Example #3
0
        private void ListView_DoubleClick(object sender, EventArgs e)
        {
            var listView = sender as ListView;
            var item     = listView.SelectedItems[0];
            var tableId  = Convert.ToInt32(item.Tag);

            //0状态为空闲 开单
            //1状态为非空闲 加菜
            if (item.ImageIndex == 0)
            {
                //更改餐桌显示状态
                item.ImageIndex = 1;
                var oiBll = new OrderInfoBll();
                oiBll.KaiDan(tableId);
            }

            //显示界面
            var oiList = FormFactory.CreateOrderInfoList();

            oiList.Tag = tableId;
            oiList.Show();
            oiList.Focus();
        }