Ejemplo n.º 1
0
        private void lblMenuVisites_Click(object sender, EventArgs e)
        {
            FrmModuleListeVisites frm = new FrmModuleListeVisites();

            frm.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
        private void btnAddVisite_Click(object sender, EventArgs e)
        {
            if (ValidateChildren(ValidationConstraints.Enabled))
            {
                System.DateTime dt;
                System.DateTime dateVisite = this.dateVisite.SelectionStart.Date;
                dt = dateVisite;
                string date = dt.ToString("yyyy-MM-dd");

                bool vHopital  = false;
                bool parentsP  = false;
                bool retourDom = false;

                if (VHradioOui.Checked == true)
                {
                    vHopital  = true;
                    retourDom = false;
                }
                else if (RDradioOui.Checked == true)
                {
                    vHopital  = false;
                    retourDom = true;
                }
                else if (RRadioButton.Checked == true)
                {
                    retourDom = false;
                    vHopital  = false;
                }

                if (PPCheckBox.Checked == true)
                {
                    parentsP = true;
                }
                //int idClasse = Convert.ToInt32(listeClasse.SelectedValue);
                Eleve unEleve;
                unEleve = new Eleve(idDunEleve);


                Medicament unMedicament;
                unMedicament = new Medicament(Int32.Parse(comboBoxPrescrire.SelectedValue.ToString()));

                string heureSortie = comboBoxHeureSortie.Text + ":" + comboBoxMinuteSortie.Text;
                string heureArrivé = comboBoxHeureArrivee.Text + ":" + comboBoxMinuteArrivee.Text;
                GestionVisites.AjoutVisite(motiftextBox.Text, comtextbox.Text, heureArrivé, heureSortie, date, parentsP, vHopital, retourDom, poulstextbox.Text, unEleve);
                Visite uneVisite = GestionVisites.InfoDerniereVisite();
                GestionPrescrires.AjoutPrescription(uneVisite, Int32.Parse(comboBoxQuantite.Text), unMedicament);
                FrmModuleListeVisites frm = new FrmModuleListeVisites();
                frm.Show();
                this.Hide();
                MessageBox.Show("Votre visite a bien été ajoutée !");
            }
        }