Ejemplo n.º 1
0
 public Intervenant(int id, Dossier dossier, string nom, string prenom, string adresse, string ville, string codePostal, string telephone, string mail, bool statut, bool presence, string qualite, string typeLieu, string utilite, string etat, string etage, string remarque, string numeroContrat, string numeroSinistre, Representant representant, Compagnie compagnie, Assureur assureur, Expert expert, int idDossier)
 {
     this._id             = id;
     this._nom            = nom;
     this._prenom         = prenom;
     this._adresse        = adresse;
     this._ville          = ville;
     this._codePostal     = codePostal;
     this._telephone      = telephone;
     this._mail           = mail;
     this._statut         = statut;
     this._presence       = presence;
     this._qualite        = qualite;
     this._typeLieu       = typeLieu;
     this._utilite        = utilite;
     this._etat           = etat;
     this._etage          = etage;
     this._remarque       = remarque;
     this._numeroContrat  = numeroContrat;
     this._numeroSinistre = numeroSinistre;
     this._representant   = representant;
     this._compagnie      = compagnie;
     this._assureur       = assureur;
     this._expert         = expert;
     this._idDossier      = idDossier;
 }
Ejemplo n.º 2
0
 public Intervenant()
 {
     this._id             = 0;
     this._nom            = "";
     this._prenom         = "";
     this._adresse        = "";
     this._ville          = "";
     this._codePostal     = "";
     this._telephone      = "";
     this._mail           = "";
     this._statut         = true;
     this._presence       = true;
     this._qualite        = "";
     this._typeLieu       = "";
     this._utilite        = "";
     this._etat           = "";
     this._etage          = "";
     this._remarque       = "";
     this._numeroContrat  = "";
     this._numeroSinistre = "";
     this._representant   = new Representant();
     this._compagnie      = new Compagnie();
     this._assureur       = new Assureur();
     this._expert         = new Expert();
     // this._idDossier = 0;
 }
Ejemplo n.º 3
0
        public Assureur RechercherAssureurParId(int id)
        {
            // Récupération de idRepresentant
            int idRepresentant;

            _connexion.Open();
            _requete = new MySqlCommand("SELECT idRepresentant FROM Assureur WHERE id=@id", _connexion);
            _requete.Parameters.Add(new MySqlParameter("@id", id));
            idRepresentant = Convert.ToInt32(_requete.ExecuteScalar());
            _connexion.Close();

            // Création du représentant
            Representant representant = RechercherRepresentantParId(idRepresentant);

            // Création de l'assureur (passage du représentant en paramètre)
            Assureur assureur;

            _connexion.Open();
            _requete = new MySqlCommand("SELECT * FROM Assureur WHERE id=@id", _connexion);
            _requete.Parameters.Add(new MySqlParameter("@id", id));

            MySqlDataReader dr = _requete.ExecuteReader();

            dr.Read();
            assureur = new Assureur(Convert.ToInt32(dr["id"]), dr["raisonSociale"].ToString(), dr["adresse"].ToString(), dr["ville"].ToString(), dr["codePostal"].ToString(), dr["telephone"].ToString(), dr["mail"].ToString(), representant);

            _connexion.Close();
            return(assureur);
        }
Ejemplo n.º 4
0
 public void MettreAJourAssureur(Assureur assureur)
 {
     _connexion.Open();
     _requete = new MySqlCommand("UPDATE Assureur SET raisonSociale=@raisonSociale, adresse=@adresse, ville=@ville, codePostal=@codePostal, telephone=@telephone, mail=@mail, idRepresentant=@idRepresentant WHERE id=@id ", _connexion);
     _requete.Parameters.Add(new MySqlParameter("@raisonSociale", assureur.RaisonSociale));
     _requete.Parameters.Add(new MySqlParameter("@adresse", assureur.Adresse));
     _requete.Parameters.Add(new MySqlParameter("@ville", assureur.Ville));
     _requete.Parameters.Add(new MySqlParameter("@codePostal", assureur.CodePostal));
     _requete.Parameters.Add(new MySqlParameter("@telephone", assureur.Telephone));
     _requete.Parameters.Add(new MySqlParameter("@mail", assureur.Mail));
     _requete.Parameters.Add(new MySqlParameter("@idRepresentant", assureur.Representant.Id));
     _requete.Parameters.Add(new MySqlParameter("@id", assureur.Id));
     _requete.ExecuteNonQuery();
     _connexion.Close();
 }
Ejemplo n.º 5
0
 // public Contrat(int id, string type, string formule, DateTime effetDu, string numeroContrat, string numeroCg, string intercalaire, double franchise, string detailFranchise, double indiceSouscription, double indiceIndemnisation, string optionUn, string optionDeux, string optionTrois, string detailOptionUn, string detailOptionDeux, string detailOptionTrois, Compagnie compagnie, Assureur assureur, Representant representant)
 public Contrat(int id, string type, string formule, DateTime effetDu, string numeroContrat, string numeroCg, string intercalaire, double franchise, string detailFranchise, double indiceSouscription, double indiceIndemnisation, string optionUn, string optionDeux, string optionTrois, string detailOptionUn, string detailOptionDeux, string detailOptionTrois, Compagnie compagnie, Assureur assureur)
 {
     this._id                  = id;
     this._type                = type;
     this._formule             = formule;
     this._effetDu             = effetDu;
     this._numeroContrat       = numeroContrat;
     this._numeroCg            = numeroCg;
     this._intercalaire        = intercalaire;
     this._franchise           = franchise;
     this._detailFranchise     = detailFranchise;
     this._indiceSouscription  = indiceSouscription;
     this._indiceIndemnisation = indiceIndemnisation;
     this._optionUn            = optionUn;
     this._optionDeux          = optionDeux;
     this._optionTrois         = optionTrois;
     this._detailOptionUn      = detailOptionUn;
     this._detailOptionDeux    = detailOptionDeux;
     this._detailOptionTrois   = detailOptionTrois;
     this._compagnie           = compagnie;
     this._assureur            = assureur;
     // this._representant = representant;
 }
Ejemplo n.º 6
0
        // private Representant _representant;

        public Contrat()
        {
            this._id      = 0;
            this._type    = "";
            this._formule = "";
            //
            this._numeroContrat = "";
            this._numeroCg      = "";
            this._intercalaire  = "";
            // this._franchise = 0.0;
            this._detailFranchise = "";
            // this._indiceSouscription = 0.0;
            // this._indiceIndemnisation = 0.0;
            this._optionUn          = "";
            this._optionDeux        = "";
            this._optionTrois       = "";
            this._detailOptionUn    = "";
            this._detailOptionDeux  = "";
            this._detailOptionTrois = "";
            this._compagnie         = new Compagnie();
            this._assureur          = new Assureur();
            //  this._representant = new Representant();
        }