DataTable IntfDalCalendar.getDataTableForCalendar(string idItineraire, string numAgence) { #region declaration IntfDalCalendar intfDServiceCalendar = new ImplDalCalendar(); DataTable dataTable = null; #endregion #region implementation this.strCommande = "SELECT fichebord.dateHeurPrevue, fichebord.numerosFB AS numFB,"; this.strCommande += " vehicule.matriculeVehicule FROM fichebord"; this.strCommande += " Inner Join autorisationvoyage ON autorisationvoyage.numerosAV = fichebord.numerosAV"; this.strCommande += " Inner Join verification ON verification.idVerification = autorisationvoyage.idVerification"; this.strCommande += " Inner Join licence ON licence.numLicence = verification.numLicence"; this.strCommande += " Inner Join vehicule ON vehicule.numVehicule = licence.numVehicule"; this.strCommande += " Inner Join agent ON agent.matriculeAgent = fichebord.matriculeAgent"; this.strCommande += " WHERE verification.idItineraire LIKE '%" + idItineraire + "%' AND"; this.strCommande += " agent.numAgence = '" + numAgence + "'"; this.strCommande += " GROUP BY fichebord.numerosFB"; dataTable = intfDServiceCalendar.getDataTable(this.strCommande); dataTable.PrimaryKey = new DataColumn[] { dataTable.Columns["id"] }; #endregion return(dataTable); }
DataTable IntfDalCalendar.getDTCalendarFBADIsNotNull(string idItineraire, string numAgence) { #region declaration IntfDalCalendar intfDServiceCalendar = new ImplDalCalendar(); DataTable dataTable = null; #endregion #region implementation this.strCommande = "SELECT fichebord.dateHeurPrevue, fichebord.numerosFB AS numFB,"; this.strCommande += " vehicule.matriculeVehicule, Sum(placefb.isOccuper) AS nbOccuper, (paramvehicule.nbPassagerMin) AS nbPlaceMin,"; this.strCommande += " Count(placefb.numerosFB) AS nbPlace, (autorisationdepart.numAutorisationDepart) AS numAD FROM fichebord"; this.strCommande += " Inner Join autorisationvoyage ON autorisationvoyage.numerosAV = fichebord.numerosAV"; this.strCommande += " Inner Join verification ON verification.idVerification = autorisationvoyage.idVerification"; this.strCommande += " Inner Join licence ON licence.numLicence = verification.numLicence"; this.strCommande += " Inner Join vehicule ON vehicule.numVehicule = licence.numVehicule"; this.strCommande += " Inner Join placefb ON placefb.numerosFB = fichebord.numerosFB"; this.strCommande += " Left Join autorisationdepart ON autorisationdepart.numerosFB = fichebord.numerosFB"; this.strCommande += " Inner Join agent ON agent.matriculeAgent = fichebord.matriculeAgent"; this.strCommande += " Inner Join paramvehicule ON paramvehicule.numParamVehicule = vehicule.numParamVehicule"; this.strCommande += " WHERE verification.idItineraire LIKE '%" + idItineraire + "%' AND"; this.strCommande += " agent.numAgence = '" + numAgence + "' AND"; this.strCommande += " autorisationdepart.numerosFB IS NOT NULL"; this.strCommande += " GROUP BY fichebord.numerosFB"; dataTable = intfDServiceCalendar.getDTCalendarFBADIsNotNullSQL(this.strCommande); dataTable.PrimaryKey = new DataColumn[] { dataTable.Columns["id"] }; #endregion return(dataTable); }