1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace DiggExample
.Controllers
17 using System
.Collections
.Generic
;
19 using Castle
.MonoRail
.Framework
;
20 using Castle
.MonoRail
.Framework
.Helpers
;
22 using DiggExample
.Model
;
23 using NHibernate
.Expression
;
25 [Layout("default"), Rescue("generalerror")]
26 public class HomeController
: SmartDispatcherController
32 public void IndexSelect1()
37 public void IndexSelect2()
42 public void IndexSelect3()
47 public void IndexSelect4()
86 public void Index8(bool desc
)
88 PropertyBag
["items"] = PaginationHelper
.CreatePagination
<MyEntity
>(
90 MyEntity
.FindAll(new Order("Index", (!desc
))),
93 PropertyBag
["desc"] = desc
;
101 private void CreatePageWith10()
103 PropertyBag
["items"] = PaginationHelper
.CreatePagination
<MyEntity
>(
105 MyEntity
.FindAll(new Order("Index", true)),
110 private void CreateRangedPage()
112 List
<MyEntity
> el
= new List
<MyEntity
>(MyEntity
.FindAll(new Order("Index", true)));
114 PropertyBag
["items"] = PaginationHelper
.CreatePagination
<MyEntity
>(