Пример #1
0
        public ActionResult Index(QuestionnaireCondition condition)
        {
            var news   = service.SearchQuestionnaire(condition);
            var models = new PagedList <QuestionnaireInfo>(news, news.Paging);

            return(View(PluginHelper.GetViewPath(this.GetType(), "Index"), models));
        }
Пример #2
0
        //
        // GET: /Questionnaire/

        public ActionResult Index(QuestionnaireCondition condition)
        {
            ServiceQuestionnair service = new ServiceQuestionnair();
            var list = service.GetAll();
            QuestionSurveyListModel model = new QuestionSurveyListModel(list);

            return(View(model));
        }
Пример #3
0
        public IPagedList <QuestionnaireInfo> SearchQuestionnaire(QuestionnaireCondition condition)
        {
            var query = repository.Table;

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

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

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