Exemple #1
0
        public static List<Empresa> List(FiltroEmpresa f)
        {
            List<Empresa> resulList = new List<Empresa>();

            try
            {

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

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

                }

            }
            catch (Exception ex)
            {
                throw ex;
            }

            return resulList;
        }
Exemple #2
0
        public static List <Empresa> List(FiltroEmpresa f)
        {
            List <Empresa> resulList = new List <Empresa>();

            try
            {
                EmpresaDS dataservice = new EmpresaDS();
                DataSet   listado     = dataservice.List(f);

                if (listado.Tables.Count > 0)
                {
                    foreach (DataRow d in listado.Tables[0].Rows)
                    {
                        Empresa e = new Empresa();
                        ORM(e, d);
                        resulList.Add(e);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(resulList);
        }