Exemplo n.º 1
0
 public virtual ActionResult Manage(BankAccountSearchFilter filter)
 {
     filter.UserId = User.GetUserId();
     if (!Request.IsAjaxRequest())
     {
         return(View(_BankAccountSrv.Get(filter)));
     }
     else
     {
         return(PartialView("Partials/_List", _BankAccountSrv.Get(filter)));
     }
 }
Exemplo n.º 2
0
        public PagingListDetails <BankAccount> Get(BankAccountSearchFilter filter)
        {
            Expression <Func <BankAccount, bool> > conditions = x => true;

            if (filter != null)
            {
                if (filter.UserId != null)
                {
                    conditions = conditions.And(x => x.UserId == filter.UserId);
                }
                if (filter.Name != null)
                {
                    conditions = conditions.And(x => x.BankName == filter.Name);
                }
            }

            return(_BankAccountRepo.Get(conditions, filter, x => x.OrderByDescending(u => u.BankAccountId)));;
        }