public static List <Prestador> List(FiltroPrestador filtro, out int RecordCount) { List <Prestador> prestadorList = new List <Prestador>(); try { PrestadorDS dataService = new PrestadorDS(); DataSet ds = dataService.List(filtro, out RecordCount); if (ds.Tables.Count > 0) { foreach (DataRow r in ds.Tables[0].Rows) { Prestador p = new Prestador(); ORM(p, r); prestadorList.Add(p); } } }catch (Exception ex) { throw ex; } return(prestadorList); }
public override DataSet List(Filter f, out int RecordCount) { DataSet ds = new DataSet(); try { FiltroPrestador filtro = (FiltroPrestador)f; DBRepository repository = DBRepository.GetDbRepository(); List <IDbDataParameter> paramlist = new List <IDbDataParameter>(); paramlist.Add(repository.DbFactory.getDataParameter("P_ID_PRESTADOR", DbType.Int32, filtro.ID)); paramlist.Add(repository.DbFactory.getDataParameter("P_NOMBRE", DbType.String, filtro.Nombre)); paramlist.Add(repository.DbFactory.getDataParameter("P_DESCRIPCION", DbType.String, filtro.Descripcion)); paramlist.Add(repository.DbFactory.getDataParameter("P_ESTADO", DbType.Int32, filtro.ESTADO)); paramlist.Add(repository.DbFactory.getDataParameter("P_ID_PAIS", DbType.Int32, filtro.IdPais)); paramlist.Add(repository.DbFactory.getDataParameter("P_ID_PROVINCA", DbType.Int32, filtro.IdProvincia)); paramlist.Add(repository.DbFactory.getDataParameter("P_LOCALIDAD_NOMBRE", DbType.String, filtro.Localidad)); paramlist.Add(repository.DbFactory.getDataParameter("P_SEARCH", DbType.String, filtro.Search)); repository.ExecuteListProcedure(CONST_LIST_PROCEDURE_NAME, paramlist, f, ds, out RecordCount); } catch (Exception ex) { throw ex; } return(ds); }
public void CargarListado(FiltroPrestador filtro, int pageNumber) { int totalRegistros; filtro.PageSize = PAGE_SIZE; filtro.IsPaged = true; filtro.StartRow = ((pageNumber - 1) * PAGE_SIZE) + 1; List <Entities.InterAsisst.Prestador> listaAfiliados = Entities.InterAsisst.Prestador.List((FiltroPrestador)filtro, out totalRegistros); this.Filtro.FiltredRowsQtty = totalRegistros; this.ShowList(totalRegistros > 0); this.lbltxtCantidadRegistros.Text = totalRegistros.ToString(); this.dtgPrestador.CurrentPageIndex = pageNumber - 1; this.dtgPrestador.VirtualItemCount = totalRegistros; this.dtgPrestador.DataSource = listaAfiliados; this.dtgPrestador.DataBind(); }
public static List <Prestador> List(FiltroPrestador filtro) { int RecordCount; return(List(filtro, out RecordCount)); }