views:

43

answers:

0

Hello, I want to create a simple page. Page has table with some product information(id,Name,Order, Size etc), page listener, filter form(products from date1 to date2, products size...). what is best way to organize such pages? Also i want to use ajax, but it's not necessary.

My vision:

  1. PageListener<T> class with method List<t> GetPage(int pageNumber)
  2. ProductsViewModel class with List<product> field, current page, page info, so on
  3. Filter class. This class i will be able to use for filter and validation data.

    class Filter { Datetime date1; Datetime date2; int maxSize; int minSize; .... public List FilterData(List data); }

  4. One action method with two parametrs

    ActionResult Show(Filter filter,int pageNumber){}

Is it good solution?