开发者

Organize simple form

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. ProductsVi开发者_高级运维ewModel 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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜