private void btnThanhToan_Click_1(object sender, EventArgs e) { if (ban != null && BLL.HOA_DON_BLL.Instance.checkHoaDon(ban.ID_BAN)) { if (txtPhoneCustomer.Text != "") { int dtl = Convert.ToInt32(txtThanhTien.Text) / 10000; KHACHHANG kh = Customer_BLL.Instance.GetKHByInfo(txtPhoneCustomer.Text); if (kh != null) { Customer_BLL.Instance.updateDTL(kh, dtl); } else { Customer_BLL.Instance.AddCustomer_BLL(txtPhoneCustomer.Text, dtl); } } BILL bill = new BILL(BLL.HOA_DON_BLL.Instance.GetIdByTable(ban.ID_BAN), 1, txtPhoneCustomer.Text); txtPhoneCustomer.Text = ""; button1_Click(new object(), new EventArgs()); bill.ShowDialog(); } else { MessageBox.Show("Chua chon ban can thanh toan hoac ban khong co du lieu!!!"); } }
private void btnTamThanhToan_Click_1(object sender, EventArgs e) { if (ban != null && BLL.HOA_DON_BLL.Instance.checkHoaDon(ban.ID_BAN)) { BILL bill = new BILL(BLL.HOA_DON_BLL.Instance.GetIdByTable(ban.ID_BAN), 0, txtPhoneCustomer.Text); bill.ShowDialog(); } else { MessageBox.Show("Chua chon ban can thanh toan hoac ban khong co du lieu!!!"); } }