Пример #1
0
 public static List<Categoria> ListAll()
 {
     FiltroCategorias f = new FiltroCategorias();
     return List(f);
 }
Пример #2
0
        public static List<Categoria> List(FiltroCategorias f)
        {
            List<Categoria> resulList = new List<Categoria>();

            try
            {

                CategoriaDS dataservice = new CategoriaDS();
                DataSet listado = dataservice.List(f);

                if (listado.Tables.Count > 0)
                {
                    foreach (DataRow d in listado.Tables[0].Rows)
                    {
                        Categoria c = new Categoria();
                        ORM(c, d);
                        resulList.Add(c);
                    }

                }

            }
            catch (Exception ex)
            {
                throw ex;
            }

            return resulList;
        }