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; }
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; }
public void MettreAJourCompagnie(Compagnie compagnie) { _connexion.Open(); _requete = new MySqlCommand("UPDATE Compagnie SET raisonSociale=@raisonSociale, adresse=@adresse, ville=@ville, codePostal=@codePostal WHERE id=@id ", _connexion); _requete.Parameters.Add(new MySqlParameter("@raisonSociale", compagnie.RaisonSociale)); _requete.Parameters.Add(new MySqlParameter("@adresse", compagnie.Adresse)); _requete.Parameters.Add(new MySqlParameter("@ville", compagnie.Ville)); _requete.Parameters.Add(new MySqlParameter("@codePostal", compagnie.CodePostal)); _requete.Parameters.Add(new MySqlParameter("@id", compagnie.Id)); _requete.ExecuteNonQuery(); _connexion.Close(); }
public Compagnie RechercherCompagnieParId(int id) { Compagnie compagnie; _connexion.Open(); _requete = new MySqlCommand("SELECT * FROM Compagnie WHERE id=@id", _connexion); _requete.Parameters.Add(new MySqlParameter("@id", id)); MySqlDataReader dr = _requete.ExecuteReader(); dr.Read(); compagnie = new Compagnie(Convert.ToInt32(dr["id"]), dr["raisonSociale"].ToString(), dr["adresse"].ToString(), dr["ville"].ToString(), dr["codePostal"].ToString()); _connexion.Close(); return(compagnie); }
private void FormDossier_Load(object sender, EventArgs e) { // ############################################################################################################## \\ // INITIALISATION DES OBJETS DE FormDossier \\ // ############################################################################################################## \\ // MISSION\\ dtpMissionDateSurvenanceSinistre.Format = DateTimePickerFormat.Custom; dtpMissionDateSurvenanceSinistre.CustomFormat = "dd-MM-yyyy"; _BDD.RemplirComboBox(cbMissionTypeSinistre, "sinistre"); pnlMissionRepresentantClient.Hide(); lblMissionErreurRepresentant.Hide(); lblMissionErreurNouveauClientParticulier.Hide(); pnlMissionRepresentantValiditeNom.Hide(); pnlMissionRepresentantValiditePrenom.Hide(); pnlMissionRepresentantValiditeTelephone.Hide(); pnlMissionRepresentantValiditeMail.Hide(); btMissionNouveauTypeSinistre.Hide(); btMissionMettreAJourSinistre.Hide(); lblMissionErreurSinistre.Hide(); btMissionMettreAJourClientParticulier.Hide(); btMissionMettreAJourRepresentant.Hide(); btMissionMettreAJourClientProfessionnel.Hide(); lblMissionErreurNouveauClientProfessionnel.Hide(); pnlMissionNouveauClientProfessionnel.Hide(); pnlMissionRechercheClientParticulier.Hide(); pnlMissionRechercheClientProfessionnel.Hide(); // Si le dossier est un dossier existant alors on remplit les textbox, coche les boutons radios ... //sinon : // MISSION \\ rbtMissionClientNouveau.Checked = true; rbtMissionClientParticulier.Checked = true; rbtMissionRepresentantAucun.Checked = true; pnlMissionNouveauClientParticulier.Show(); // Client exp = _BDD.RechercherClientParId(2); // MessageBox.Show(exp.ToString()+exp.Representant.Nom); Compagnie r = _BDD.RechercherCompagnieParId(17); MessageBox.Show(r.ToString()); }
// 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; }
// 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(); }