private void cbxPraticien_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (cbxPraticien.SelectedIndex != -1)
            {
                PRATICIEN p = (PRATICIEN)cbxPraticien.SelectedItem;
                ucPraticien1.LePraticien = p;
                ucPraticien1.Visible     = true;

                Int16 Idpraticient = Int16.Parse(ucPraticien1.txtNUM.Text.ToString());
                List <RAPPORT_VISITE> a;
                a = Manager.ChargerSiRapportsExistent(UserId, Idpraticient);
                TYPE_PRATICIEN type = Manager.ChargerTypeParticien(ucPraticien1.txtCODE.Text.ToString());
                tbxType.Text = type.TYP_LIBELLE.ToString();
                tbxLieu.Text = type.TYP_LIEU.ToString();
                if (a.Count != 0)
                {
                    btn_voirRapport.Show();
                }
                else
                {
                    btn_voirRapport.Hide();
                }
                if (cbxPraticien.SelectedIndex > 1)
                {
                    panelPraticien.Visible = true;
                }
            }
        }
Exemple #2
0
 private void cbxPraticien_SelectedIndexChanged(object sender, EventArgs e)
 {
     lePraticien      = Manager.ChargerLePraticien(Convert.ToInt32(cbxPraticien.SelectedItem));
     txtNom.Text      = lePraticien.PRA_NOM;
     txtPrenom.Text   = lePraticien.PRA_PRENOM;
     txtAdresse.Text  = lePraticien.PRA_ADRESSE;
     txtVille.Text    = lePraticien.PRA_CP + " " + lePraticien.PRA_VILLE;
     type             = Manager.ChargerLeTypeDuPraticien(lePraticien.TYP_CODE);
     txtType.Text     = type.TYP_LIBELLE;
     txtTypeLieu.Text = type.TYP_LIEU;
 }
Exemple #3
0
        /// <summary>
        /// Permet de rechercher un type de praticien avec son code
        /// </summary>
        /// <param code="TYP_CODE">Type code praticien</param>
        /// <returns>TYPE PRATICIEN</returns>
        public TYPE_PRATICIEN FindById(string code)
        {
            TYPE_PRATICIEN typ = null;

            using (var context = new GSB_VisiteEntities())
            {
                var req = from t in context.TYPE_PRATICIEN
                          where t.TYP_CODE == code
                          select t;
                typ = req.SingleOrDefault <TYPE_PRATICIEN>();
            }
            return(typ);
        }
        /// <summary>
        /// Retourne le type de praticien en fonction de son code
        /// </summary>
        /// <param name="code">Code du Type de Praticien</param>
        /// <returns>TYPE_PRATICIEN</returns>
        public TYPE_PRATICIEN FindById(string code)
        {
            TYPE_PRATICIEN type = null;

            using (var context = new GSB_visite_LEGUILLIEREntities()) {
                var request = from tp in context.TYPE_PRATICIEN
                              where tp.TYP_CODE == code
                              select tp;

                type = request.SingleOrDefault <TYPE_PRATICIEN>();
            }

            return(type);
        }
        public static TYPE_PRATICIEN FindById(string code)
        {
            //A faire : rechercher un type praticien par son code
            TYPE_PRATICIEN typ = null;

            using (var context = new GSB_VisiteEntities())
            {
                //context.Configuration.LazyLoadingEnabled = false;
                var req = from t in context.TYPE_PRATICIEN
                          where t.TYP_CODE == code
                          select t;
                typ = req.SingleOrDefault <TYPE_PRATICIEN>();
            }
            return(typ);
        }
        /// <summary>
        /// Charge un type de praticien par son code
        /// </summary>
        /// <param name="code"></param>
        /// <returns></returns>
        public TYPE_PRATICIEN FindById(string code)
        {
            // Recherche un type de praticien par son code
            TYPE_PRATICIEN pra = null;

            using (var context = new GSB_visite_groupe1Entities())
            {
                //désactiver le chargement différé
                //context.Configuration.LazyLoadingEnabled = false;
                var req = from r in context.TYPE_PRATICIEN
                          where r.TYP_CODE == code
                          select r;
                pra = req.SingleOrDefault <TYPE_PRATICIEN>();
            }
            return(pra);
        }
Exemple #7
0
        public TYPE_PRATICIEN FindById(string code)
        {
            //A faire : rechercher un type praticien par son code
            TYPE_PRATICIEN typ = null;

            using (var context = new gsb_visite_groupe3Entities())
            {
                //désactiver le chargement différé
                context.Configuration.LazyLoadingEnabled = false;
                var req = from t in context.TYPE_PRATICIEN.Include("LePraticien")
                          where t.TYP_CODE == code
                          select t;
                typ = req.SingleOrDefault <TYPE_PRATICIEN>();
            }
            return(typ);
        }
        public static TYPE_PRATICIEN FindById(string code)
        {
            //A faire : rechercher un type praticien par son code
            TYPE_PRATICIEN type = null;

            using (var context = new GSB_VisiteEntities())
            {
                //désactiver le chargement différé
                //context.Configuration.LazyLoadingEnabled = false;
                var req = from p in context.TYPE_PRATICIEN.Include("LesPraticiens")
                          where p.TYP_CODE == code
                          select p;
                type = req.SingleOrDefault <TYPE_PRATICIEN>();
            }
            return(type);
        }
Exemple #9
0
        /// <summary>
        /// Permet de charger le type praticien a partir du code
        /// <param name="code">chaine de caracteres</param>
        /// </summary>
        public static TYPE_PRATICIEN ChargerTypeParticien(string code)
        {
            TYPE_PRATICIEN tr = TypePraticienDAO.FindById(code);

            return(tr);
        }
Exemple #10
0
        public static TYPE_PRATICIEN ChargerLeTypeDuPraticien(string type)
        {
            TYPE_PRATICIEN tp = TypePraticienDAO.FindById(type);

            return(tp);
        }