private void menuOrder_Click(object sender, EventArgs e) { if (listViewItem.Tag == null) { MessageBox.Show("请选择需要结账的餐桌"); return; } if (listViewItem.ImageIndex == 0) { MessageBox.Show("此卓还未开单"); return; } OrderPay op = OrderPay.Create(); op.Tag = listViewItem.Tag; op.ChangePictureEvent += ChangeFree; op.Show(); op.Focus(); }
private void menuOrder_Click(object sender, EventArgs e) { //判断当前选中的餐桌是否为空闲,如果是空闲则不需要结账 if (itemTable == null) { MessageBox.Show("请先选择需要结账的餐桌!再点击结账。"); return; } if (itemTable.ImageIndex == 0) { MessageBox.Show("当前餐桌并没有开单,无需结账!"); } else { OrderPay op = OrderPay.Create(); op.Tag = itemTable.Tag;//itemtable里面记录的是餐桌的编号,传递给结账窗口 op.SetTableFreeEvent += 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(); }