示例#1
0
        public OrderListSearchCriteria WithStatus(OrderStatus status)
        {
            OrderListSearchCriteria another = this.Clone <OrderListSearchCriteria>();

            another.Status = status;
            // need to reset page index
            another.PageIndex = 1;
            return(another);
        }
示例#2
0
        public OrderListQueryBuilder(OrderListSearchCriteria criteria)
            : base(criteria)
        {
            if (criteria.UserId.HasValue)
            {
                _user = _daoTemplate.FindByID <User>(criteria.UserId);
            }

            if (criteria.Status.HasValue)
            {
                status = criteria.Status.Value;
            }
        }
示例#3
0
 public ActionResult List(OrderListSearchCriteria criteria)
 {
     var queryBuilder = new OrderListQueryBuilder(criteria);
     var result = queryBuilder.Execute(daoTemplate.Session);
     return View(result);
 }