Esempio n. 1
0
        public static List<Localidad> List(FiltroLocalidad f)
        {
            List<Localidad> resulList = new List<Localidad>();

            try
            {

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

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

                }

            }
            catch (Exception ex)
            {
                throw ex;
            }

            return resulList;
        }
Esempio n. 2
0
        public static DataTable ObtenerLocalidades()
        {
            DataTable dt = null;

            FiltroLocalidad f = new FiltroLocalidad();
            f.IsPaged = false;
            int rCount;

            LocalidadDS dataServices = new LocalidadDS();
            DataSet ds = dataServices.ListUbicaciones(f, out rCount);

            if (ds.Tables.Count > 0)
            {
                dt = ds.Tables[0];
                dt.TableName = "UBICACIONES";
            }

            return dt;
        }