private void btnOrder_Click(object sender, EventArgs e) { if (dgvOrderDetail.SelectedRows.Count <= 0) { MessageBox.Show("还未点菜,无法下单!"); return; } OrderInfo oi = new OrderInfo(); TableInfo ti = tableItem.Tag as TableInfo; oi.TableId = Convert.ToInt32(ti.TId); oi.OMoney = Convert.ToDecimal(lblMoney.Text); if (odBll.Order(ti, oi, odInfoList)) { MessageBox.Show("下单成功!"); this.Close(); ChangeTabPageImage?.Invoke(); } else { MessageBox.Show("下单失败"); } }