示例#1
0
        public IHttpActionResult GetFaqs()
        {
            var faqs = faqService.GetFaqs();

            if (faqs != null)
            {
                return(Ok(faqs));
            }
            return(NotFound());
        }
示例#2
0
        private void setInitialModel(LoginModel model)
        {
            model.AllLanguages = _userManagerService.GetLanguages().OrderBy(o => o.IdLanguage).ToList();

            string lang = (string)Request.RequestContext.RouteData.Values["lang"];

            if (lang != null)
            {
                foreach (var lingua in model.AllLanguages)
                {
                    if (lingua.InitialsLanguage == lang)
                    {
                        model.ActualLanguage = lingua;
                        break;
                    }
                }
            }
            else
            {
                model.ActualLanguage = model.AllLanguages.FirstOrDefault();
            }

            model.Faqs = _faqService.GetFaqs();
        }
示例#3
0
        public async Task <FaqViewModel> GetAllFaqs(int pageIndex)
        {
            Faqs = await _faqService.GetFaqs(pageIndex, 100000);

            return(this);
        }