private void btnThanhToan_Click(object sender, EventArgs e) { if (IsInputErr()) return; using (QuanLyBanBUS bus = new QuanLyBanBUS()) { BanHangDTO info = new BanHangDTO { Msnv = ThuNgan.MsnvLogin, MaSoBan = QuanLyBanBUS.Masoban, SoHoaDon = Convert.ToInt32(txtSoHoaDon.Text), GioRa = DateTime.Now, GhiChu = txtGhiChu.Text, KhuyenMai = nudThue.Value, TongTien = int.Parse(lblTongTien.Text, NumberStyles.AllowThousands, CultureInfo.CreateSpecificCulture("vi-VN")), ChiTiet = bus.LoadHangHoa() }; bus.BanHang(info); } using (QuanLyBanBUS bus = new QuanLyBanBUS()) bus.ClearHangHoa(); RefreshHangHoa(); }
private void btnHuyBan_Click(object sender, EventArgs e) { using (QuanLyBanBUS bus = new QuanLyBanBUS()) bus.ClearHangHoa(); RefreshHangHoa(); }