예제 #1
0
        void IntfDalProprietaire.insertToGridRecu(GridView gridView, string param, string paramLike, string valueLike, string numProprietaire)
        {
            #region declaration
            IntfDalProprietaire serviceProprietaire = new ImplDalProprietaire();
            #endregion

            #region implementation

            this.strCommande  = "SELECT (recuad.numRecuAD) AS numR, typeprelevement.commentaire, recuad.matriculeAgent,";
            this.strCommande += " recuad.libele, recuad.montant, recuad.dateRecu FROM proprietaire";
            this.strCommande += " Inner Join vehicule ON vehicule.numProprietaire = proprietaire.numProprietaire";
            this.strCommande += " Inner Join licence ON licence.numVehicule = vehicule.numVehicule";
            this.strCommande += " Inner Join verification ON verification.numLicence = licence.numLicence";
            this.strCommande += " Inner Join autorisationvoyage ON autorisationvoyage.idVerification = verification.idVerification";
            this.strCommande += " Inner Join fichebord ON fichebord.numerosAV = autorisationvoyage.numerosAV";
            this.strCommande += " Inner Join autorisationdepart ON autorisationdepart.numerosFB = fichebord.numerosFB";
            this.strCommande += " Inner Join prelevement ON prelevement.numAutorisationDepart = autorisationdepart.numAutorisationDepart";
            this.strCommande += " Inner Join recuad ON recuad.numPrelevement = prelevement.numPrelevement";
            this.strCommande += " Inner Join typeprelevement ON typeprelevement.typePrelevement = prelevement.typePrelevement";
            this.strCommande += " WHERE autorisationdepart.resteRegle > 0 AND";
            this.strCommande += " proprietaire.numProprietaire = '" + numProprietaire + "' AND";
            this.strCommande += " (" + paramLike + " LIKE  '%" + valueLike + "%')";
            this.strCommande += " ORDER BY " + param + " ASC";


            gridView.DataSource = serviceProprietaire.getDataTableRecu(this.strCommande);
            gridView.DataBind();
            #endregion
        }
예제 #2
0
        void IntfDalProprietaire.insertToGridListeVoyageVoitureProprietaire(GridView gridView, string param, string paramLike, string valueLike, string numProprietaire)
        {
            #region declaration
            IntfDalProprietaire serviceProprietaire = new ImplDalProprietaire();
            #endregion

            #region implementation

            this.strCommande  = "SELECT vehicule.matriculeVehicule, chauffeur.nomChauffeur, chauffeur.prenomChauffeur,";
            this.strCommande += " (autorisationdepart.numAutorisationDepart) AS numAD, vehicule.marqueVehicule, itineraire.numVilleItineraireDebut,";
            this.strCommande += " itineraire.numVilleItineraireFin, (fichebord.numerosFB) AS numFB, proprietaire.numProprietaire,";
            this.strCommande += " autorisationdepart.recetteTotale, autorisationdepart.resteRegle,";
            this.strCommande += " fichebord.dateHeurDepart FROM proprietaire";
            this.strCommande += " Inner Join vehicule ON vehicule.numProprietaire = proprietaire.numProprietaire";
            this.strCommande += " Inner Join licence ON licence.numVehicule = vehicule.numVehicule";
            this.strCommande += " Inner Join verification ON verification.numLicence = licence.numLicence";
            this.strCommande += " Inner Join autorisationvoyage ON autorisationvoyage.idVerification = verification.idVerification";
            this.strCommande += " Inner Join fichebord ON fichebord.numerosAV = autorisationvoyage.numerosAV";
            this.strCommande += " Inner Join autorisationdepart ON autorisationdepart.numerosFB = fichebord.numerosFB";
            this.strCommande += " Left Join assocautorisationdepartfacture ON assocautorisationdepartfacture.numAutorisationDepart = autorisationdepart.numAutorisationDepart";
            this.strCommande += " Inner Join chauffeur ON chauffeur.idChauffeur = verification.idChauffeur";
            this.strCommande += " Inner Join itineraire ON itineraire.idItineraire = verification.idItineraire";
            this.strCommande += " WHERE assocautorisationdepartfacture.numAutorisationDepart IS NULL AND";
            this.strCommande += " proprietaire.numProprietaire = '" + numProprietaire + "' AND";
            this.strCommande += " (" + paramLike + " LIKE  '%" + valueLike + "%')";
            this.strCommande += " ORDER BY " + param + " ASC";


            gridView.DataSource = serviceProprietaire.getDataTableVoyageVoitureProprietaire(this.strCommande);
            gridView.DataBind();
            #endregion
        }
예제 #3
0
        string IntfDalProprietaire.insertProprietaire(crlProprietaire proprietaire, string sigleAgence)
        {
            #region declaration
            string numProprietaire = "";
            IntfDalProprietaire serviceProprietaire = new ImplDalProprietaire();
            int    nombreInsert = 0;
            string numIndividu  = "";
            string numOrganisme = "";
            string numSociete   = "";
            #endregion

            #region implementation
            if (proprietaire != null)
            {
                if (proprietaire.NumIndividu != "")
                {
                    numIndividu = "'" + proprietaire.NumIndividu + "'";
                }
                else
                {
                    numIndividu = "NULL";
                }
                if (proprietaire.NumOrganisme != "")
                {
                    numOrganisme = "'" + proprietaire.NumOrganisme + "'";
                }
                else
                {
                    numOrganisme = "NULL";
                }
                if (proprietaire.NumSociete != "")
                {
                    numSociete = "'" + proprietaire.NumSociete + "'";
                }
                else
                {
                    numSociete = "NULL";
                }

                proprietaire.NumProprietaire = serviceProprietaire.getNumProprietaire(sigleAgence);
                this.strCommande             = "INSERT INTO `proprietaire` (`numProprietaire`,`typeProprietaire`,";
                this.strCommande            += " `numOrganisme`,`numSociete`,`numIndividu`,`numAgence`)";
                this.strCommande            += " VALUES ('" + proprietaire.NumProprietaire + "',";
                this.strCommande            += " '" + proprietaire.TypeProprietaire + "'," + numOrganisme + ",";
                this.strCommande            += " " + numSociete + "," + numIndividu + ",";
                this.strCommande            += " '" + proprietaire.NumAgence + "')";

                this.serviceConnection.openConnection();
                nombreInsert = this.serviceConnection.requete(this.strCommande);
                if (nombreInsert == 1)
                {
                    numProprietaire = proprietaire.NumProprietaire;
                }
                this.serviceConnection.closeConnection();
            }
            #endregion

            return(numProprietaire);
        }
예제 #4
0
        void IntfDalProprietaire.insertToGridProprietaireAll(GridView gridView, string param, string paramLike, string valueLike, string numAgence)
        {
            #region declaration
            IntfDalProprietaire serviceProprietaire = new ImplDalProprietaire();
            #endregion

            #region implementation

            this.strCommande  = "SELECT proprietaire.numProprietaire, proprietaire.typeProprietaire, proprietaire.numOrganisme,";
            this.strCommande += " proprietaire.numSociete, proprietaire.numIndividu, proprietaire.numAgence FROM proprietaire";
            this.strCommande += " Left Join organisme ON organisme.numOrganisme = proprietaire.numOrganisme";
            this.strCommande += " Left Join societe ON societe.numSociete = proprietaire.numSociete";
            this.strCommande += " Left Join Individu ON Individu.numIndividu = proprietaire.numIndividu";
            this.strCommande += " WHERE proprietaire.numAgence = '" + numAgence + "' AND";
            this.strCommande += " (" + paramLike + " LIKE  '%" + valueLike + "%')";
            this.strCommande += " ORDER BY " + param + " ASC";


            gridView.DataSource = serviceProprietaire.getDataTableProprietaireAll(this.strCommande);
            gridView.DataBind();
            #endregion
        }
예제 #5
0
        void IntfDalProprietaire.insertToGridProprietaire(GridView gridView, string param, string paramLike, string valueLike, string typeProprietaire)
        {
            #region declaration
            IntfDalProprietaire serviceProprietaire = new ImplDalProprietaire();
            #endregion

            #region implementation

            this.strCommande  = "SELECT proprietaire.numProprietaire, Individu.numIndividu, Individu.civiliteIndividu,";
            this.strCommande += " Individu.nomIndividu, Individu.prenomIndividu, Individu.cinIndividu,";
            this.strCommande += " Individu.adresse, Individu.profession, Individu.telephoneFixeIndividu,";
            this.strCommande += " Individu.telephoneMobileIndividu FROM proprietaire";
            this.strCommande += " Inner Join Individu ON Individu.numIndividu = proprietaire.numIndividu";
            this.strCommande += " WHERE proprietaire.typeProprietaire = '" + typeProprietaire + "' AND";
            this.strCommande += " (" + paramLike + " LIKE  '%" + valueLike + "%')";
            this.strCommande += " ORDER BY " + param + " ASC";


            gridView.DataSource = serviceProprietaire.getDataTableProprietaire(this.strCommande);
            gridView.DataBind();
            #endregion
        }
예제 #6
0
        crlVehicule IntfDalVehicule.selectVehicule(string numVehicule)
        {
            #region declaration
            crlVehicule vehicule = null;

            IntfDalProprietaire  serviceProprietaire  = new ImplDalProprietaire();
            IntfDalSourceEnergie serviceSourceEnergie = new ImplDalSourceEnergie();
            IntfDalParamVehicule serviceParamVehicule = new ImplDalParamVehicule();
            #endregion

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

                this.serviceConnection.openConnection();
                if (this.serviceConnection.IsConnection)
                {
                    this.reader = this.serviceConnection.select(this.strCommande);
                    if (this.reader != null)
                    {
                        if (this.reader.HasRows)
                        {
                            if (this.reader.Read())
                            {
                                vehicule = new crlVehicule();
                                vehicule.MarqueVehicule    = this.reader["marqueVehicule"].ToString();
                                vehicule.NumParamVehicule  = this.reader["numParamVehicule"].ToString();
                                vehicule.MatriculeVehicule = this.reader["matriculeVehicule"].ToString();
                                try
                                {
                                    vehicule.NombreColoneVehicule = int.Parse(this.reader["nombreColoneVehicule"].ToString());
                                }
                                catch (Exception)
                                {
                                }
                                vehicule.NumMoteurVehicule = this.reader["numMoteurVehicule"].ToString();
                                vehicule.NumProprietaire   = this.reader["numProprietaire"].ToString();
                                vehicule.NumSerieVehicule  = this.reader["numSerieVehicule"].ToString();
                                vehicule.NumVehicule       = this.reader["numVehicule"].ToString();
                                vehicule.CouleurVehicule   = this.reader["couleurVehicule"].ToString();
                                try
                                {
                                    vehicule.PlacesAssiseVehicule = int.Parse(this.reader["placesAssiseVehicule"].ToString());
                                }
                                catch (Exception)
                                {
                                }
                                try
                                {
                                    vehicule.PoidsTotalVehicule = double.Parse(this.reader["poidsTotalVehicule"].ToString());
                                }
                                catch (Exception)
                                {
                                }
                                try
                                {
                                    vehicule.PoidsVideVehicule = double.Parse(this.reader["poidsVideVehicule"].ToString());
                                }
                                catch (Exception)
                                {
                                }
                                vehicule.PuissanceVehicule = this.reader["puissanceVehicule"].ToString();
                                vehicule.SourceEnergie     = this.reader["sourceEnergie"].ToString();
                                vehicule.TypeVehicule      = this.reader["typeVehicule"].ToString();
                                vehicule.ImageVehicule     = this.reader["imageVehicule"].ToString();
                            }
                        }
                        this.reader.Dispose();
                    }

                    while (this.serviceConnection.IsConnection)
                    {
                        this.serviceConnection.closeConnection();
                    }
                }

                if (vehicule != null)
                {
                    if (vehicule.SourceEnergie != "")
                    {
                        vehicule.sourceEnergieObj = serviceSourceEnergie.selectSourceEnergie(vehicule.SourceEnergie);
                    }
                    if (vehicule.NumProprietaire != "")
                    {
                        vehicule.proprietaire = serviceProprietaire.selectProprietaire(vehicule.NumProprietaire);
                    }
                    if (vehicule.NumParamVehicule != "")
                    {
                        vehicule.paramVehicule = serviceParamVehicule.selectParamVehicule(vehicule.NumParamVehicule);
                    }
                }
            }
            #endregion

            return(vehicule);
        }