Esempio n. 1
0
 private void initUI()
 {
     cbStatut.Items.Add("Choisissez");
     cbTypeEpargne.Items.Add("Choisissez");
     cbPeriodicite.Items.Add("Choisissez");
     cbStatut.Items.AddRange(Contrat.getStatutJuridique());
     cbStatut.SelectedIndex = 0;
     cbTypeEpargne.Items.AddRange(ContratEpargne.ValuesTypeEpargne);
     cbTypeEpargne.SelectedIndex = 0;
     cbPeriodicite.Items.AddRange(ContratEpargne.ValuesPeriodicite);
     cbPeriodicite.SelectedIndex = 0;
     dtVersement.MinDate         = DateTime.Today;
     rbTypeContrat_Checked(rbCredit, null);
 }
Esempio n. 2
0
 private void initData()
 {
     txt_intitule.Text = contrat.Intitule;
     cbStatut.Items.AddRange(Contrat.getStatutJuridique());
     cbStatut.SelectedItem     = contrat.StatutJuridiqueStr;
     lbl_idClient.Text         = contrat.Client.IdClient.ToString();
     lbl_idContrat.Text        = contrat.IdContrat.ToString();
     lbl_idCompte.Text         = contrat.Compte.IdCompte.ToString();
     lbl_dateSouscription.Text = contrat.DateSouscription.ToShortDateString();
     cbPeriodicite.Items.AddRange(ContratEpargne.ValuesPeriodicite);
     if (contrat.Type == Contrat.TypeContrat.Credit)
     {
         gb_credit.Visible     = true;
         gb_epargne.Visible    = false;
         contratCredit         = BSGestionClient.getContratCredit(contrat.IdContrat);
         contratCredit.Client  = contrat.Client;
         contratCredit.Compte  = contrat.Compte;
         txtCreditMontant.Text = contratCredit.MontantCredit.ToString();
         txtObjet.Text         = contratCredit.ObjectifCredit;
         txtTaux.Text          = contratCredit.Taux.ToString();
         txtDuree.Text         = contratCredit.Duree.ToString();
         txtCreditMontant.Text = contratCredit.MontantCredit.ToString();
     }
     else if (contrat.Type == Contrat.TypeContrat.Epargne)
     {
         gb_credit.Visible          = false;
         gb_epargne.Visible         = true;
         contratEpargne             = BSGestionClient.getContratEpargne(contrat.IdContrat);
         contratEpargne.Client      = contrat.Client;
         contratEpargne.Compte      = contrat.Compte;
         txtEpargneMontant.Text     = contratEpargne.MontantEpargne.ToString();
         dtVersement.Value          = contratEpargne.DateVersement;
         cbTypeEpargne.Text         = contratEpargne.TypeEpargne;
         txtEpargneMontant.Text     = contratEpargne.MontantEpargne.ToString();
         cbPeriodicite.SelectedItem = contratEpargne.Periodicite;
         cbTypeEpargne.Items.AddRange(ContratEpargne.ValuesTypeEpargne);
         cbTypeEpargne.SelectedItem = contratEpargne.TypeEpargne;
         if (contratEpargne.TypeVersement.Equals("Ponctuel"))
         {
             rbPonctuel.Checked = true;
         }
         else
         {
             rbPeriodique.Checked = true;
         }
     }
 }