예제 #1
0
        public static List<TMetier> findAll()
        {
            DataSQLDataContext db = new DataSQLDataContext();

            var q = from m in db.T_METIER
                    select m;

            List<TMetier> mesMetiers = new List<TMetier>();

            foreach (var m in q)
            {
                TMetier mM = new TMetier((int)m.ID_METIER);
                mM.id_type_metier = (int)m.ID_TYPE_METIER;
                mM.metier = m.METIER;
                mM.typeMetier = TTypeMetier.findById((int)mM.id_type_metier)[0];
                mesMetiers.Add(mM);
            }
            return mesMetiers;
        }
예제 #2
0
 public InfoMetier(TMetier m)
 {
     this.ID = m.Id_metier;
     this.Type = new InfoType(m.TypeMetier);
     this.Nom = m.Metier;
 }