示例#1
0
 public frmBaoCaorpt(Entities.BCXuatNhapTonTheoLoaiHangChiTiet[] kct, string ky)
 {
     try
     {
         InitializeComponent();
         CongTy();
         GUI.Report.rptBCXuatNhapTonTheoLoaiHang report = new GUI.Report.rptBCXuatNhapTonTheoLoaiHang();
         report.SetDataSource(kct);
         crvReport.ReportSource = report;
         report.SetParameterValue("TenCongTy", CT.TenCongTy);
         report.SetParameterValue("DiaChiCongTy", CT.DiaChi);
         report.SetParameterValue("DienThoai", CT.SoDienThoai);
         report.SetParameterValue("FaxCongTy", CT.Fax);
         report.SetParameterValue("Web", CT.Website);
         report.SetParameterValue("TenBaoCao", "Báo Cáo Xuất Nhập Tồn Theo Loại Hàng " + ky);
         report.SetParameterValue("NgayTao", new Common.Utilities().XuLy(2, DateServer.Date().ToShortDateString()));
         report.SetParameterValue("MaNhanVien", Common.Utilities.User.TenNhanVien);
         report.SetParameterValue("Email", CT.Email);
         crvReport.Show();
     }
     catch
     {
     }
 }
示例#2
0
 public frmBaoCaorpt(Entities.BCXuatNhapTonTheoLoaiHangChiTiet[] kct, string ky, string path, string hanhDong)
 {
     try
     {
         InitializeComponent();
         CongTy();
         GUI.Report.rptBCXuatNhapTonTheoLoaiHang report = new GUI.Report.rptBCXuatNhapTonTheoLoaiHang();
         report.SetDataSource(kct);
         crvReport.ReportSource = report;
         report.SetParameterValue("TenCongTy", CT.TenCongTy);
         report.SetParameterValue("DiaChiCongTy", CT.DiaChi);
         report.SetParameterValue("DienThoai", CT.SoDienThoai);
         report.SetParameterValue("FaxCongTy", CT.Fax);
         report.SetParameterValue("Web", CT.Website);
         report.SetParameterValue("TenBaoCao", "Báo Cáo Xuất Nhập Tồn Theo Loại Hàng " + ky);
         report.SetParameterValue("NgayTao", new Common.Utilities().XuLy(2, DateServer.Date().ToShortDateString()));
         report.SetParameterValue("MaNhanVien", Common.Utilities.User.TenNhanVien);
         report.SetParameterValue("Email", CT.Email);
         if (hanhDong == "Excel")
         {
             new GUI.Report.ExportCrystalReport().Export(report, path, Report.ExportCrystalReport.TypeBC.Excel);
         }
         else if (hanhDong == "Word")
         {
             new GUI.Report.ExportCrystalReport().Export(report, path, Report.ExportCrystalReport.TypeBC.WordForWindows);
         }
         else if (hanhDong == "PDF")
         {
             new GUI.Report.ExportCrystalReport().Export(report, path, Report.ExportCrystalReport.TypeBC.PortableDocFormat);
         }
     }
     catch
     {
     }
 }