private void thanhToanTile_Click(object sender, EventArgs e) { DialogResult dialog = MetroMessageBox.Show(this, "Bạn muốn thanh toán hóa đơn cho bàn " + (selectedIndex + 1) + " ?", "Pay", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialog == DialogResult.Yes) { metroTileList[selectedIndex].Style = MetroColorStyle.Green; tableList[selectedIndex].TinhTrang = "Còn trống"; TableBUS.UpdateStatus(tableList[selectedIndex]); thanhToanTile.Visible = false; themMonTile.Visible = false; tongTienLabel.Visible = false; label.Visible = false; dgv.DataSource = BillDetailBUS.LoadAll(0); BillBUS.UpdateInvoicingTime(currentBill); Refresh(); DialogResult dialog2 = MetroMessageBox.Show(this, "Thanh toán thành công, bạn có muốn in hóa đơn ?", "Print receipt", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dialog2 == DialogResult.Yes) { frmThanhToan form = new frmThanhToan(currentBill.MaHoaDon, selectedIndex + 1, login.MaNhanVien); form.Show(); } } }
private void inHoaDonTile_Click(object sender, EventArgs e) { if (dgv3.Rows.Count > 0) { int maHoaDon = (int)dgv3.CurrentRow.Cells[0].Value; int maBan = (int)dgv3.CurrentRow.Cells[1].Value; int maNhanVien = (int)dgv3.CurrentRow.Cells[2].Value; frmThanhToan form = new frmThanhToan(maHoaDon, maBan, maNhanVien); form.Show(); } }