示例#1
0
        //------------------------------------------paginacion-----------------------------------------------------
        public static int SearchProductoPaginacion(ref List <Producto> articulos, string where, int pageSize, int firstRow, string ordenar)
        {
            try
            {
                int?totalRows = 0;
                ProductoTableAdapter         localAdapter = new ProductoTableAdapter();
                ProductoDS.ProductoDataTable theTable     = localAdapter.GetSearchForProducto(where, pageSize, firstRow, ref totalRows, ordenar);

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