Exemplo n.º 1
0
        public ActionResult Index(SecretaryMailboxCondition condition)
        {
            var news   = service.SearchAllSecretaryMailbox(condition);
            var models = new PagedList <SecretaryMailbox>(news, news.Paging);

            return(View(PluginHelper.GetViewPath(this.GetType(), "Index"), models));
        }
Exemplo n.º 2
0
        public IPagedList <SecretaryMailbox> SearchAllSecretaryMailbox(SecretaryMailboxCondition condition)
        {
            var query = repository.Table;

            if (!string.IsNullOrEmpty(condition.Title))
            {
                query = query.Where(t => t.Title.Contains(condition.Title));
            }



            query = query.Where(t => t.IsDelete == false);
            query = query.OrderByDescending(t => t.CreateDate);

            return(new PagedList <SecretaryMailbox>(query, condition.PageIndex, condition.PageSize));
        }