public ReporteVehiculos(DataSourcesEnum dataSourcesEnum, int userId = 0, object dataSource = null) { _datasource = dataSource; _userId = userId; _dataSourcesEnum = dataSourcesEnum; InitializeComponent(); }
private void SetBindingSource(DataSourcesEnum dataSourcesEnum) { switch (dataSourcesEnum) { case DataSourcesEnum.Vehiculos: SetReportData("DataSet1", _datasource, "RentACar.vehiculosReport.rdlc"); break; case DataSourcesEnum.TipoVehiculos: SetReportData("DataSet1", _datasource, "RentACar.TipoVehiculoReport.rdlc"); break; case DataSourcesEnum.TipoCombustible: SetReportData("TCDataSet", _datasource, "RentACar.tipoCombustibleReport.rdlc"); break; case DataSourcesEnum.Marcas: SetReportData("MarcaDataSet", _datasource, "RentACar.marcaReport.rdlc"); break; case DataSourcesEnum.Modelos: SetReportData("ModeloDataSet", _datasource, "RentACar.modeloReport.rdlc"); break; case DataSourcesEnum.Renta: SetReportData("RentaDataSet", _datasource, "RentACar.RentaReport.rdlc"); break; case DataSourcesEnum.Inspeccion: SetReportData("InspeccionDataSet", _datasource, "RentACar.inspeccionReport.rdlc"); break; case DataSourcesEnum.Empleado: SetReportData("EmpleadoDataSet", _datasource, "RentACar.empleadoReport.rdlc"); break; case DataSourcesEnum.Cliente: SetReportData("ClienteDataSet", _datasource, "RentACar.clienteReport.rdlc"); break; } }