public void MettreAJourContrat(Contrat contrat) { _connexion.Open(); _requete = new MySqlCommand("UPDATE Contrat SET type=@type, formule=@formule, effetDu=@effetDu, numeroContrat=@numeroContrat, numeroCg=@numeroCg, intercalaire=@intercalaire, franchise=@franchise, detailFranchise=@detailFranchise, indiceSouscription=@indiceSouscription, indiceIndemnisation = @indiceIndemnisation, optionUn = @optionUn, optionDeux = @optionDeux, optionTrois = @optionTrois, detailOptionUn = @detailOptionUn, detailOptionDeux = @detailOptionDeux, detailOptionTrois = @detailOptionTrois, idCompagnie = @idCompagnie, idAssureur = @idAssureur WHERE id=@id ", _connexion); _requete.Parameters.Add(new MySqlParameter("@type", contrat.Type)); _requete.Parameters.Add(new MySqlParameter("@formule", contrat.Formule)); _requete.Parameters.Add(new MySqlParameter("@effetDu", contrat.EffetDu)); _requete.Parameters.Add(new MySqlParameter("@numeroContrat", contrat.NumeroContrat)); _requete.Parameters.Add(new MySqlParameter("@numeroCg", contrat.NumeroCg)); _requete.Parameters.Add(new MySqlParameter("@intercalaire", contrat.Intercalaire)); _requete.Parameters.Add(new MySqlParameter("@franchise", contrat.Franchise)); _requete.Parameters.Add(new MySqlParameter("@detailFranchise", contrat.DetailFranchise)); _requete.Parameters.Add(new MySqlParameter("@indiceSouscription", contrat.IndiceSouscription)); _requete.Parameters.Add(new MySqlParameter("@indiceIndemnisation", contrat.IndiceIndemnisation)); _requete.Parameters.Add(new MySqlParameter("@optionUn", contrat.OptionUn)); _requete.Parameters.Add(new MySqlParameter("@optionDeux", contrat.OptionDeux)); _requete.Parameters.Add(new MySqlParameter("@optionTrois", contrat.OptionTrois)); _requete.Parameters.Add(new MySqlParameter("@detailOptionUn", contrat.DetailOptionUn)); _requete.Parameters.Add(new MySqlParameter("@detailOptionDeux", contrat.DetailOptionDeux)); _requete.Parameters.Add(new MySqlParameter("@detailOptionTrois", contrat.DetailOptionTrois)); _requete.Parameters.Add(new MySqlParameter("@idCompagnie", contrat.Compagnie.Id)); _requete.Parameters.Add(new MySqlParameter("@idAssureur", contrat.Assureur.Id)); _requete.Parameters.Add(new MySqlParameter("@id", contrat.Id)); _requete.ExecuteNonQuery(); _connexion.Close(); }
public Dossier(int id, Mission mission, Contrat contrat, Sinistre sinistre, Risque risque, bool estModifiable) { this._id = id; this._estModifiable = estModifiable; this._mission = mission; this._contrat = contrat; this._sinistre = sinistre; this._risque = risque; }
public Dossier() { this._id = 0; this._estModifiable = true; this._mission = new Mission(); this._contrat = new Contrat(); this._sinistre = new Sinistre(); this._risque = new Risque(); this._listeIntervenants = new List <Intervenant>(); }