private void btThem_Click(object sender, EventArgs e) { string maxuat, manv, makh, tenxe; int soluong, dongia; maxuat = txtMaXuat.Text.Trim(); manv = txtMaNV.Text.Trim(); makh = txtMaKH.Text.Trim(); tenxe = txtTenXe.Text.Trim(); soluong = int.Parse(txtSoLuong.Text.Trim()); dongia = int.Parse(txtDonGia.Text.Trim()); HoaDonXuat emp = new HoaDonXuat(maxuat, manv, makh, tenxe, soluong, dongia); try { int i = new HoaDonXuatBUS().Add(emp); dgvHoaDonXuat.DataSource = GetHoaDonXuat(); } catch (SqlException ex) { MessageBox.Show(ex.Message); } }
private void CRHoaDonNhanVien_Load(object sender, EventArgs e) { ReportDocument rp = new ReportDocument(); rp.Load(@"C:\Users\Ron\Desktop\Tốt Nghiệp\CHTapHoa\CHTapHoa\Reports\HoaDonNhanVien.rpt"); HoaDonXuatBUS _hdxBus = new HoaDonXuatBUS(); List <HoaDonXuatDTO> lst = new List <HoaDonXuatDTO>(); List <HoaDonXuatDTO> lshdxdto = _hdxBus.LayHDTheoMaNhanVien(maNV); rp.SetDataSource(lshdxdto); crystalReportViewer1.ReportSource = rp; this.crystalReportViewer1.Show(); this.crystalReportViewer1.RefreshReport(); }
private void CRKhoangThoiGianHD_Load(object sender, EventArgs e) { HoaDonXuatBUS _hdxBus = new HoaDonXuatBUS(); List <HoaDonXuatDTO> lshdx = new List <HoaDonXuatDTO>(); lshdx = _hdxBus.TimDanhSachHoaDon(tungay, denngay); ReportDocument rp = new ReportDocument(); rp.Load(@"C:\Users\Ron\Desktop\Tốt Nghiệp\CHTapHoa\CHTapHoa\Reports\KhoangThoiGianHD.rpt"); rp.SetDataSource(lshdx); crystalReportViewer1.ReportSource = rp; this.crystalReportViewer1.Show(); this.crystalReportViewer1.Refresh(); }
private void frmHoaDonThang_Load(object sender, EventArgs e) { HoaDonXuatBUS _hdxBus = new HoaDonXuatBUS(); List <HoaDonXuatDTO> lshdx = new List <HoaDonXuatDTO>(); lshdx = _hdxBus.DanhSachHoaDonXuat(); ReportDocument rp = new ReportDocument(); rp.Load(@"C:\Users\Ron\Desktop\Tốt Nghiệp\CHTapHoa\CHTapHoa\Reports\TatCaHoaDon.rpt"); rp.SetDataSource(lshdx); crystalReportViewer1.ReportSource = rp; this.crystalReportViewer1.Show(); this.crystalReportViewer1.Refresh(); }