예제 #1
0
        public Donnee getDonnee()
        {
            if (this.donnee == null)
            {
                this.donnee = new Donnee();
                this.donnee.setIdchamp(idchamp);
            }

            return(donnee);
        }
예제 #2
0
 public Champ(long idchamp, String libelle, bool multivaleur, long iddatatype, Donnee donnee, DataType datatype,
              List <String> preselection, bool accueil)
 {
     this.idchamp      = idchamp;
     this.libelle      = libelle;
     this.multivaleur  = multivaleur;
     this.iddatatype   = iddatatype;
     this.donnee       = donnee;
     this.datatype     = datatype;
     this.preselection = preselection;
     this.accueil      = accueil;
 }
예제 #3
0
        private static List <ContactEntity.Donnee> SetListeDonnees(System.Collections.Specialized.IOrderedDictionary newValues)
        {
            List <EvalEntity.Champ>     listeChamp = dao.DaoChamp.GetChamps();
            List <ContactEntity.Donnee> donnees    = new List <ContactEntity.Donnee>();
            int idChamp = 0;

            foreach (string key in newValues.Keys)
            {
                string valeur = newValues[key] as string;

                //recherche l'idChamp
                EvalEntity.Champ ch = null;

                if (key == "Prenom")
                {
                    ch = listeChamp.Where(x => x.libelle == "Prénom").FirstOrDefault();
                }
                else if (key == "DateNaissance")
                {
                    try
                    {
                        ch = listeChamp.Where(x => x.libelle == "Date de naissance").FirstOrDefault();
                        DateTime d = DateTime.Parse(valeur);
                        valeur = d.ToString("yyyy-MM-dd");
                    }
                    catch
                    {
                        valeur = null;
                    }
                }
                else
                {
                    ch = listeChamp.Where(x => x.libelle == key).FirstOrDefault();
                }

                if (ch != null)
                {
                    idChamp = ch.idchamp;
                    ContactEntity.Donnee d = new ContactEntity.Donnee();
                    d.setIdchamp(idChamp);
                    d.setValeur(valeur);
                    donnees.Add(d);
                }
            }
            return(donnees);
        }
예제 #4
0
 public void setDonnee(Donnee donnee)
 {
     this.donnee = donnee;
 }