Example #1
0
        string IntfDalVerification.insertVerification(crlVerification Verification, string sigleAgence)
        {
            #region declaration
            int    nombreInsertion = 0;
            string idVerification  = "";
            IntfDalVerification serviceVerification = new ImplDalVerification();
            #endregion

            #region implementation
            if (Verification != null)
            {
                Verification.IdVerification = serviceVerification.getIdVerification(sigleAgence);

                this.strCommande  = "INSERT INTO `verification` (`idVerification`,`numLicence`,`idItineraire`,";
                this.strCommande += " `idChauffeur`,`matriculeAgent`,`verificationTechnique`,`aVoireVT`,`verificationPapier`,`aVoireVP`,`dateVerification`,`planDepart`) ";
                this.strCommande += " VALUES ('" + Verification.IdVerification + "','" + Verification.NumLicence + "','" + Verification.IdItineraire + "'";
                this.strCommande += " ,'" + Verification.IdChauffeur + "','" + Verification.MatriculeAgent + "'";
                this.strCommande += " ,'" + Verification.VerificationTechnique + "', '" + Verification.AVoireVT + "'";
                this.strCommande += " ,'" + Verification.VerificationPapier + "', '" + Verification.AVoireVP + "', '" + Verification.DateVerification.ToString("yyyy-MM-dd") + "','" + Verification.PlanDepart + "')";

                this.serviceConnectBase.openConnection();
                nombreInsertion = this.serviceConnectBase.requete(this.strCommande);
                if (nombreInsertion == 1)
                {
                    idVerification = Verification.IdVerification;
                }
                this.serviceConnectBase.closeConnection();
            }
            #endregion

            return(idVerification);
        }
Example #2
0
        void IntfDalVerification.insertToGridVerificationNonValider(GridView gridView, string param, string paramLike, string valueLike)
        {
            #region declaration
            IntfDalVerification serviceVerification = new ImplDalVerification();
            #endregion

            #region implementation

            this.strCommande  = "SELECT chauffeur.idChauffeur, chauffeur.nomChauffeur, chauffeur.prenomChauffeur,";
            this.strCommande += " chauffeur.cinChauffeur, chauffeur.adresseChauffeur, chauffeur.telephoneChauffeur,";
            this.strCommande += " chauffeur.telephoneMobileChauffeur, chauffeur.imageChauffeur, chauffeur.numCooperative,";
            this.strCommande += " chauffeur.situationFamilialeChauffeur, chauffeur.dateNaissanceChauffeur, verification.dateVerification,";
            this.strCommande += " chauffeur.lieuNaissanceChauffeur, verification.idVerification, vehicule.numVehicule,";
            this.strCommande += " vehicule.numParamVehicule, vehicule.sourceEnergie, vehicule.numProprietaire,";
            this.strCommande += " vehicule.matriculeVehicule, vehicule.marqueVehicule, vehicule.typeVehicule,";
            this.strCommande += " vehicule.numSerieVehicule, vehicule.numMoteurVehicule, vehicule.puissanceVehicule,";
            this.strCommande += " vehicule.couleurVehicule, vehicule.placesAssiseVehicule, vehicule.nombreColoneVehicule,";
            this.strCommande += " vehicule.poidsTotalVehicule, vehicule.poidsVideVehicule, vehicule.imageVehicule,";
            this.strCommande += " itineraire.numVilleItineraireDebut, itineraire.numVilleItineraireFin FROM verification";
            this.strCommande += " Inner Join chauffeur ON chauffeur.idChauffeur = verification.idChauffeur";
            this.strCommande += " Inner Join licence ON licence.numLicence = verification.numLicence";
            this.strCommande += " Inner Join vehicule ON vehicule.numVehicule = licence.numVehicule";
            this.strCommande += " Left Join autorisationvoyage ON autorisationvoyage.idVerification = verification.idVerification";
            this.strCommande += " Inner Join itineraire ON itineraire.idItineraire = verification.idItineraire";
            this.strCommande += " WHERE autorisationvoyage.idVerification IS NULL AND";
            this.strCommande += " (" + paramLike + " LIKE  '%" + valueLike + "%')";
            this.strCommande += " ORDER BY " + param + " DESC";


            gridView.DataSource = serviceVerification.getDataTableVerificationNonValider(this.strCommande);
            gridView.DataBind();
            #endregion
        }
Example #3
0
        crlAutorisationVoyage IntfAutorisationVoyage.selectAutorisationVoyage(string numerosAV)
        {
            #region declaration
            IntfDalAgent        serviceAgent        = new ImplDalAgent();
            IntfDalVerification serviceVerification = new ImplDalVerification();

            crlAutorisationVoyage AutorisationVoyage = null;
            #endregion

            #region implementation
            if (numerosAV != "")
            {
                this.strCommande = "SELECT * FROM `autorisationvoyage` WHERE (`numerosAV`='" + numerosAV + "')";

                this.serviceConnectBase.openConnection();
                reader = this.serviceConnectBase.select(this.strCommande);
                if (reader != null)
                {
                    if (reader.HasRows)
                    {
                        if (reader.Read())
                        {
                            AutorisationVoyage                  = new crlAutorisationVoyage();
                            AutorisationVoyage.NumerosAV        = reader["numerosAV"].ToString();
                            AutorisationVoyage.MatriculeAgent   = reader["matriculeAgent"].ToString();
                            AutorisationVoyage.IdVerification   = reader["idVerification"].ToString();
                            AutorisationVoyage.DatePrevueDepart = Convert.ToDateTime(reader["datePrevueDepart"].ToString());
                        }
                    }
                    reader.Dispose();
                }
                this.serviceConnectBase.closeConnection();
                if (AutorisationVoyage != null)
                {
                    AutorisationVoyage.Verification = serviceVerification.selectVerification(AutorisationVoyage.IdVerification);
                    AutorisationVoyage.Agent        = serviceAgent.selectAgent(AutorisationVoyage.MatriculeAgent);
                }
            }
            #endregion

            return(AutorisationVoyage);
        }