Ejemplo n.º 1
0
        private void Fixer_Budget_Load(object sender, EventArgs e)
        {
            txtMontantProvisoire.Enabled = false;
            txtBudgetCulturel.Enabled    = false;
            txtBudgetLoisir.Enabled      = false;
            comboAnnee.Items.Add((bc.MaxAnnee() + 1).ToString());
            viewResteBudget.Text = "" + (bcc.getMontantProvisoire("Activité culturel") + bcc.getMontantProvisoire("Activité de loisir"));
            btFixer.Enabled      = false;
            DateValue d = new DateValue();

            if ((d.getDayToday().Equals("29")) && (d.getMonthToday().Equals("04")))
            {
                //"Vrai"
            }
            else
            {
                //faux
            }
            if ((d.getDayToday().Equals("29") == true) && (!d.getMonthToday().Equals("04")) == true)
            {
                MessageBox.Show(d.getDayToday() + "  month" + d.getMonthToday());
                txtMontantFinal.Enabled   = true;
                txtBudgetCulturel.Enabled = false;
                txtBudgetLoisir.Enabled   = false;
                comboAnnee.Enabled        = true;
            }
            else
            {
                txtMontantFinal.Enabled   = false;
                txtBudgetCulturel.Enabled = false;
                txtBudgetLoisir.Enabled   = false;
                comboAnnee.Enabled        = false;
            }
        }
Ejemplo n.º 2
0
 private void rdActiviteCulturel_Click(object sender, EventArgs e)
 {
     viewMontant.Text = bcc.getMontantProvisoire("Activité culturel").ToString();
     dt.Show();
 }
Ejemplo n.º 3
0
 private void metroButton1_Click(object sender, EventArgs e)
 {
     try
     {
         if (rdList.Checked == true)
         {
             if (int.Parse(viewMontant.Text.ToString()) - int.Parse(txtMontantPrevu.Text.ToString()) >= 0)
             {
                 if (rdActiviteCulturel.Checked == true)
                 {
                     ac.AjouterActivite(comboNomActivite.SelectedItem.ToString(), int.Parse(txtCapacite.Text.ToString()), txtDateDebut.Text.ToString(), txtDatefin.Text.ToString(), double.Parse(txtPrixUnitaire.Text.ToString()), double.Parse(txtMontantPrevu.Text.ToString()), double.Parse(txtMontantPrevu.Text.ToString()), "Activité culturel", comboOrganisateur.SelectedItem.ToString(), txtDateDebutInscription.Text.ToString(), dateFinInscription.Text.ToString(), int.Parse(comboNbr_point.SelectedItem.ToString()));
                     PopupNotifier pn = new PopupNotifier();
                     pn.Image       = Properties.Resources.Information;
                     pn.TitleText   = "Information";
                     pn.ContentText = "Les emails sont envoyées avec succes pour s'informer les adhérents";
                     pn.Popup();
                 }
                 else
                 {
                     if (rdActiviteLoisir.Checked == true)
                     {
                         ac.AjouterActivite(comboNomActivite.SelectedItem.ToString(), int.Parse(txtCapacite.Text.ToString()), txtDateDebut.Text.ToString(), txtDatefin.Text.ToString(), double.Parse(txtPrixUnitaire.Text.ToString()), double.Parse(txtMontantPrevu.Text.ToString()), double.Parse(txtMontantPrevu.Text.ToString()), "Activité de loisir", comboOrganisateur.SelectedItem.ToString(), txtDateDebutInscription.Text.ToString(), dateFinInscription.Text.ToString(), int.Parse(comboNbr_point.SelectedItem.ToString()));
                         viewMontant.Text = bcc.getMontantProvisoire("Activité de loisir").ToString();
                         PopupNotifier pn = new PopupNotifier();
                         pn.Image       = Properties.Resources.Information;
                         pn.TitleText   = "Information";
                         pn.ContentText = "Les emails sont envoyées avec succes pour s'informer les adhérents";
                         pn.Popup();
                     }
                 }
             }
             else
             {
                 MessageBox.Show("Vous n'avez pas ajouter une nouvelle activité car le budget est inssuffisant !", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Stop);
             }
         }
         else
         {
             if (rdManuel.Checked == true)
             {
                 if (int.Parse(viewMontant.Text.ToString()) - int.Parse(txtMontantPrevu.Text.ToString()) >= 0)
                 {
                     if (rdActiviteCulturel.Checked == true)
                     {
                         ac.AjouterActivite(txtNomActivite.Text.ToString(), int.Parse(txtCapacite.Text.ToString()), txtDateDebut.Text.ToString(), txtDatefin.Text.ToString(), double.Parse(txtPrixUnitaire.Text.ToString()), double.Parse(txtMontantPrevu.Text.ToString()), double.Parse(txtMontantPrevu.Text.ToString()), "Activité culturel", comboOrganisateur.SelectedItem.ToString(), txtDateDebutInscription.Text.ToString(), dateFinInscription.Text.ToString(), int.Parse(comboNbr_point.SelectedItem.ToString()));
                     }
                     else
                     {
                         if (rdActiviteLoisir.Checked == true)
                         {
                             ac.AjouterActivite(txtNomActivite.Text.ToString(), int.Parse(txtCapacite.Text.ToString()), txtDateDebut.Text.ToString(), txtDatefin.Text.ToString(), double.Parse(txtPrixUnitaire.Text.ToString()), double.Parse(txtMontantPrevu.Text.ToString()), double.Parse(txtMontantPrevu.Text.ToString()), "Activité de loisir", comboOrganisateur.SelectedItem.ToString(), txtDateDebutInscription.Text.ToString(), dateFinInscription.Text.ToString(), int.Parse(comboNbr_point.SelectedItem.ToString()));
                             viewMontant.Text = bcc.getMontantProvisoire("Activité de loisir").ToString();
                         }
                     }
                 }
                 else
                 {
                     MessageBox.Show("Vous n'avez pas ajouter une nouvelle activité car le budget est inssuffisant !", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                 }
             }
         }
         this.Close();
     }
     catch (Exception ex)
     {
         MessageBox.Show("Il y a des champs vides", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }