示例#1
0
        void IntfDalVehicule.insertToGridRecuForVehicule(GridView gridView, string param, string paramLike, string valueLike, string numVehicule)
        {
            #region declaration
            IntfDalVehicule serviceVehicule = new ImplDalVehicule();
            #endregion

            #region implementation

            this.strCommande  = "SELECT (recuad.numRecuAD) AS numR, typeprelevement.commentaire, recuad.matriculeAgent,";
            this.strCommande += " recuad.libele, recuad.montant, recuad.dateRecu FROM vehicule";
            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 += " vehicule.numVehicule = '" + numVehicule + "' AND";
            this.strCommande += " (" + paramLike + " LIKE  '%" + valueLike + "%')";
            this.strCommande += " ORDER BY " + param + " ASC";


            gridView.DataSource = serviceVehicule.getDataTableRecuForVehicule(this.strCommande);
            gridView.DataBind();
            #endregion
        }
示例#2
0
        void IntfDalVehicule.insertToGridADForVehicule(GridView gridView, string param, string paramLike, string valueLike, string numVehicule)
        {
            #region declaration
            IntfDalVehicule serviceVehicule = new ImplDalVehicule();
            #endregion

            #region implementation
            this.strCommande  = "SELECT autorisationdepart.recetteTotale, autorisationdepart.resteRegle,";
            this.strCommande += " vehicule.matriculeVehicule, vehicule.marqueVehicule, vehicule.couleurVehicule,";
            this.strCommande += " chauffeur.nomChauffeur, chauffeur.prenomChauffeur, fichebord.dateHeurDepart,";
            this.strCommande += " autorisationdepart.dateAD, verification.idItineraire FROM autorisationdepart";
            this.strCommande += " Inner Join fichebord ON fichebord.numerosFB = autorisationdepart.numerosFB";
            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 chauffeur ON chauffeur.idChauffeur = verification.idChauffeur";
            this.strCommande += " WHERE " + paramLike + " LIKE '%" + valueLike + "%' AND";
            this.strCommande += " autorisationdepart.resteRegle > '0' AND";
            this.strCommande += " vehicule.numVehicule = '" + numVehicule + "'";
            this.strCommande += " ORDER BY " + param + " ASC";

            gridView.DataSource = serviceVehicule.getDataTableADForVehicule(this.strCommande);
            gridView.DataBind();
            #endregion
        }
示例#3
0
        string IntfDalVehicule.insertVehicule(crlVehicule vehicule, string sigleAgence)
        {
            #region declaration
            string          numVehicule      = "";
            string          numParamVehicule = "NULL";
            IntfDalVehicule serviceVehicule  = new ImplDalVehicule();
            int             nombreInsert     = 0;
            #endregion

            #region implementation
            if (vehicule != null)
            {
                if (vehicule.NumParamVehicule != "")
                {
                    numParamVehicule = "'" + vehicule.NumParamVehicule + "'";
                }

                if (sigleAgence != "")
                {
                    vehicule.NumVehicule = serviceVehicule.getNumVehicule(sigleAgence);

                    this.strCommande  = "INSERT INTO `vehicule` (`numVehicule`,`numParamVehicule`,`sourceEnergie`,";
                    this.strCommande += " `numProprietaire`,`matriculeVehicule`,`marqueVehicule`,`typeVehicule`,";
                    this.strCommande += " `numSerieVehicule`,`numMoteurVehicule`,`puissanceVehicule`,`couleurVehicule`,";
                    this.strCommande += " `placesAssiseVehicule`,`nombreColoneVehicule`,`poidsTotalVehicule`,`poidsVideVehicule`,";
                    this.strCommande += " `imageVehicule`) VALUES ('" + vehicule.NumVehicule + "', " + numParamVehicule + ",";
                    this.strCommande += " '" + vehicule.SourceEnergie + "','" + vehicule.NumProprietaire + "',";
                    this.strCommande += " '" + vehicule.MatriculeVehicule.ToUpper() + "','" + vehicule.MarqueVehicule + "','" + vehicule.TypeVehicule + "',";
                    this.strCommande += " '" + vehicule.NumSerieVehicule + "','" + vehicule.NumMoteurVehicule + "',";
                    this.strCommande += " '" + vehicule.PuissanceVehicule + "','" + vehicule.CouleurVehicule + "','" + vehicule.PlacesAssiseVehicule + "',";
                    this.strCommande += " '" + vehicule.NombreColoneVehicule + "','" + vehicule.PoidsTotalVehicule + "',";
                    this.strCommande += " '" + vehicule.PoidsVideVehicule + "','" + vehicule.ImageVehicule + "')";

                    this.serviceConnection.openConnection();
                    nombreInsert = this.serviceConnection.requete(this.strCommande);
                    if (nombreInsert == 1)
                    {
                        numVehicule = vehicule.NumVehicule;
                    }
                    this.serviceConnection.closeConnection();
                }
            }
            #endregion

            return(numVehicule);
        }
示例#4
0
        void IntfDalVehicule.insertToGridVehicule(GridView gridView, string param, string paramLike, string valueLike)
        {
            #region declaration
            IntfDalVehicule serviceVehicule = new ImplDalVehicule();
            #endregion

            #region implementation
            this.strCommande  = "SELECT vehicule.numVehicule, vehicule.sourceEnergie, vehicule.matriculeVehicule,";
            this.strCommande += " vehicule.marqueVehicule, vehicule.typeVehicule, vehicule.couleurVehicule,";
            this.strCommande += " Individu.nomIndividu, Individu.prenomIndividu FROM vehicule";
            this.strCommande += " Inner Join proprietaire ON proprietaire.numProprietaire = vehicule.numProprietaire";
            this.strCommande += " Inner Join Individu ON Individu.numIndividu = proprietaire.numIndividu";
            this.strCommande += " WHERE " + paramLike + " LIKE '%" + valueLike + "%'";
            this.strCommande += " ORDER BY " + param + " ASC";

            gridView.DataSource = serviceVehicule.getDataTableVehicule(this.strCommande);
            gridView.DataBind();
            #endregion
        }
示例#5
0
        void IntfDalVehicule.insertToGridVehiculeForFacture(GridView gridView, string param, string paramLike, string valueLike)
        {
            #region declaration
            IntfDalVehicule serviceVehicule = new ImplDalVehicule();
            #endregion

            #region implementation
            this.strCommande  = "SELECT vehicule.matriculeVehicule, vehicule.marqueVehicule,";
            this.strCommande += " vehicule.couleurVehicule, vehicule.numVehicule, proprietaire.numOrganisme,";
            this.strCommande += " proprietaire.numSociete, proprietaire.numIndividu FROM vehicule";
            this.strCommande += " Inner Join proprietaire ON proprietaire.numProprietaire = vehicule.numProprietaire";
            this.strCommande += " Left Join Individu ON Individu.numIndividu = proprietaire.numIndividu";
            this.strCommande += " Left Join societe ON societe.numSociete = proprietaire.numSociete";
            this.strCommande += " Left Join organisme ON organisme.numOrganisme = proprietaire.numOrganisme";
            this.strCommande += " WHERE " + paramLike + " LIKE '%" + valueLike + "%'";
            this.strCommande += " ORDER BY " + param + " ASC";

            gridView.DataSource = serviceVehicule.getDataTableVehiculeForFacture(this.strCommande);
            gridView.DataBind();
            #endregion
        }
示例#6
0
        crlLicence IntfDalLicence.selectLicence(string numLicence)
        {
            #region declaration
            IntfDalLicence serviceLicence = new ImplDalLicence();

            List <crlItineraire> Itineraires = null;
            crlLicence           Licence     = null;

            IntfDalCooperative serviceCooperative = new ImplDalCooperative();
            IntfDalZone        serviceZone        = new ImplDalZone();
            IntfDalVehicule    serviceVehicule    = new ImplDalVehicule();
            #endregion

            #region implementation
            if (numLicence != "")
            {
                Itineraires      = serviceLicence.selectItineraire(numLicence);
                this.strCommande = "SELECT * FROM licence WHERE (licence.numLicence = '" + numLicence + "')";

                this.serviceConnectBase.openConnection();
                reader = this.serviceConnectBase.select(this.strCommande);
                if (reader != null)
                {
                    if (reader.HasRows)
                    {
                        if (reader.Read())
                        {
                            Licence = new crlLicence();

                            Licence.NumLicence     = reader["numLicence"].ToString();
                            Licence.NumerosLicence = reader["numerosLicence"].ToString();
                            Licence.Zone           = reader["zone"].ToString();
                            Licence.NumCooperative = reader["numCooperative"].ToString();
                            Licence.NumVehicule    = reader["numVehicule"].ToString();
                            try
                            {
                                Licence.DatePremiereMiseCiculation = Convert.ToDateTime(reader["datePremiereMiseCiculation"].ToString());
                            }
                            catch (Exception) { }
                            try
                            {
                                Licence.DatePremiereExploitation = Convert.ToDateTime(reader["datePremiereExploitation"].ToString());
                            }
                            catch (Exception) { }

                            try
                            {
                                Licence.ValideAu = Convert.ToDateTime(reader["valideAu"].ToString());
                            }
                            catch (Exception)
                            {
                            }
                            try
                            {
                                Licence.ValideDu = Convert.ToDateTime(reader["valideDu"].ToString());
                            }
                            catch (Exception)
                            {
                            }
                            try
                            {
                                Licence.NombrePlacePayante = int.Parse(reader["nombrePlacePayante"].ToString());
                            }
                            catch (Exception)
                            {
                            }
                            try
                            {
                                Licence.IsProvisoire = int.Parse(reader["isProvisoire"].ToString());
                            }
                            catch (Exception)
                            {
                            }
                        }
                    }
                    reader.Dispose();
                }
                this.serviceConnectBase.closeConnection();
                if (Licence != null)
                {
                    if (Licence.Zone != "")
                    {
                        Licence.zoneObj = serviceZone.selectZone(Licence.Zone);
                    }
                    if (Licence.NumCooperative != "")
                    {
                        Licence.cooperative = serviceCooperative.selectCooperative(Licence.NumCooperative);
                    }
                    if (Licence.NumVehicule != "")
                    {
                        Licence.vehicule = serviceVehicule.selectVehicule(Licence.NumVehicule);
                    }
                    Licence.itineraires = serviceLicence.selectItineraire(Licence.NumLicence);
                }
            }
            #endregion

            return(Licence);
        }