public ActionResult Index(OnlineInterviewQuestionAskCondition condition)
        {
            var news   = service.SearchAllOnlineInterviewQuestionAsk(condition);
            var models = new PagedList <OnlineInterviewQuestionAsk>(news, news.Paging);

            return(View(PluginHelper.GetViewPath(this.GetType(), "Index"), models));
        }
Esempio n. 2
0
        public ActionResult Display(Guid id, OnlineInterviewQuestionAskCondition condition)
        {
            OnlineInterviewModel model = new OnlineInterviewModel();
            var info = service.GetById(id);


            ViewBag.Id = info.Id;


            ViewBag.theme   = info.theme;
            ViewBag.Guest   = info.Guest;
            ViewBag.shijian = info.shijian;
            ViewBag.Address = info.Address;
            //是否开启网友提问
            ViewBag.IsEnabled = info.IsEnabled;

            condition.OnlineInterviewId = info.Id;
            var news   = IOnlineInterviewQuestionAskService.SearchAllOnlineInterviewQuestionAsk(condition);
            var models = new PagedList <OnlineInterviewQuestionAsk>(news, news.Paging);



            return(View(PluginHelper.GetViewPath(this.GetType(), "Display"), models));
        }
        public IPagedList <OnlineInterviewQuestionAsk> SearchAllOnlineInterviewQuestionAsk(OnlineInterviewQuestionAskCondition condition)
        {
            var query = repository.Table;



            if (condition.OnlineInterviewId != null)
            {
                query = query.Where(t => t.OnlineInterviewId == condition.OnlineInterviewId);
            }

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

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