Пример #1
0
        public void CargarListado(FiltroUpload filtro, int pageNumber)
        {
            int totalRegistros;

            filtro.PageSize = PAGE_SIZE;
            filtro.IsPaged = true;
            filtro.StartRow = ((pageNumber - 1) * PAGE_SIZE) + 1;

            List<Entities.InterAsisst.Upload> listaAfiliados = Upload.List(filtro, out totalRegistros);

            this.Filtro.FiltredRowsQtty = totalRegistros;

            this.ShowList(totalRegistros > 0);
            this.lbltxtCantidadRegistros.Text = totalRegistros.ToString();

            this.dtgUploads.CurrentPageIndex = pageNumber - 1;
            this.dtgUploads.VirtualItemCount = totalRegistros;
            this.dtgUploads.DataSource = listaAfiliados;
            this.dtgUploads.DataBind();

            this.lnkHuerfanos.NavigateUrl = Classes.Views.AFILIADOS_UNSYNC;
        }
Пример #2
0
        public static List<Upload> List(FiltroUpload f, out int RecordCount)
        {
            List<Upload> resultList = new List<Upload>();

            try
            {
                UploaDS dataservice = new UploaDS();
                DataSet ds = dataservice.List(f, out RecordCount);

                if (ds.Tables.Count > 0)

                    foreach (DataRow r in ds.Tables[0].Rows)
                    {
                        Upload a = new Upload();
                        ORM(a, r);
                        resultList.Add(a);
                    }
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return resultList;
        }