private void btnGoimon_Click(object sender, EventArgs e) { uctMonDaGoi uctMDG = new uctMonDaGoi(); uctGoiMon_Load(sender, e); nhung(uctMDG); }
private void btnTinhtien_Click(object sender, EventArgs e) { try { DialogResult ok = new DialogResult(); ok = MessageBox.Show("Bạn có muốn tính tiền " + label1.Text + " Không ?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (ok == DialogResult.Yes) { MessageBox.Show("TỔNG SỐ TIỀN THANH TOÁN CỦA " + " [ " + label1.Text + " ] " + " LÀ " + lblTongTien.Text, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); tinhtien(); // tính tiền những món đã gọi uctMonDaGoi uctMDG = new uctMonDaGoi(); nhung(uctMDG); string _IdBan = lvDanhSachBan.SelectedItems[0].SubItems[1].Text; dgvGoiMon.DataSource = Controllers.GoiMonCtrl.DeleteGoiMon(_IdBan); uctGoiMon_Load(sender, e); } else { return; } } catch { MessageBox.Show("Bạn chưa chọn bàn thanh toán", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information); } uctGoiMon_Load(sender, e); }