Example #1
0
        //------------------------------------------paginacion-----------------------------------------------------
        public static int SearchFiles(ref List <Imagen> articulos, string where, int pageSize, int firstRow, string ordenar)
        {
            try
            {
                int?totalRows = 0;
                ImagenTableAdapter       localAdapter = new ImagenTableAdapter();
                ImagenDS.ImagenDataTable theTable     = localAdapter.GetSearchForImagen(where, pageSize, firstRow, ref totalRows, ordenar);

                if (theTable != null && theTable.Rows.Count > 0)
                {
                    foreach (ImagenDS.ImagenRow row in theTable.Rows)
                    {
                        articulos.Add(FillImagenRecord(row));
                    }
                }
                return((int)totalRows);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }