public ActionResult PersonalHelpCenters(int TitleID = -1, int page = 1)
        {
            List <ViewYogaDicItem> DicItemlist = method.listDicItem(2563);

            ViewBag.Diclist     = DicItemlist;
            ViewBag.SelectedDic = DicItemlist.OrderBy(p => p.ID).First().ItemName;
            string whereStr = "";
            int    pagesize = 150;
            int    count    = 0;

            whereStr += "IsFAQ!" + true + ",";
            whereStr += "IsDelete!" + false + ",";
            //whereStr += "BeFrom!" + 2 + ",";
            if (TitleID != -1)
            {
                ViewBag.SelectedDic = DicItemlist.First(p => p.ID == TitleID).ItemName;
                whereStr           += "TitleID!" + TitleID + ",";
            }
            else
            {
                whereStr += "TitleID!" + DicItemlist.OrderBy(p => p.ID).First().ID + ",";
            }
            tQuestionServiceClient client = new tQuestionServiceClient();
            List <ViewtQuestion>   list   = client.GetList(whereStr, page, pagesize, out count);

            ViewBag.ViewtQuestionList = list;
            ViewtQuestion model = new ViewtQuestion();

            model.UserName           = user.NickName;
            model.ContactInformation = user.UEmail;
            return(View(model));
        }
        public ActionResult HelpSearch(string questionContent, int page = 1)
        {
            ViewBag.QuestionContent = questionContent;
            List <ViewYogaDicItem> DicItemlist = method.listDicItem(2563);

            ViewBag.Diclist = DicItemlist;
            string whereStr = "";
            int    pagesize = 3;
            int    count    = 0;

            whereStr += "IsFAQ!" + true + ",";
            whereStr += "IsDelete!" + false + ",";
            if (!string.IsNullOrWhiteSpace(questionContent))
            {
                whereStr += "QuestionContent!" + questionContent + ",";
            }
            tQuestionServiceClient client = new tQuestionServiceClient();
            List <ViewtQuestion>   list   = client.GetList(whereStr, page, pagesize, out count);

            foreach (var item in list)
            {
                ViewtQuestion model        = item;
                Regex         regex        = new Regex(@"<[^>]+>|</[^>]+>");
                string        replyContent = regex.Replace(item.ReplyContent, "");
                model.ReplyContent = replyContent.Length > 300 ? replyContent.Substring(0, 297) + "..." : replyContent;
            }
            ViewBag.ViewtQuestionList  = list;
            ViewBag.ViewtQuestionCount = count;
            whereStr  = "";
            whereStr += "IsFAQ!" + true + ",";
            whereStr += "IsDelete!" + false + ",";
            whereStr += "Hot!" + true + ",";
            int count2 = 0;
            List <ViewtQuestion> hotList = client.GetList(whereStr, 1, 6, out count2);

            ViewBag.HotList = hotList;
            Webdiyer.WebControls.Mvc.PagedList <ViewtQuestion> pagelist = new Webdiyer.WebControls.Mvc.PagedList <ViewtQuestion>(list, page, pagesize, count);
            if (Request.IsAjaxRequest())
            {
                return(PartialView("HelpSearchList", pagelist));
            }
            return(View(pagelist));
        }
        public ActionResult Index(int page = 1)
        {
            List <ViewYogaDicItem> DicItemlist = method.listDicItem(2563);

            ViewBag.Diclist = DicItemlist;
            tQuestionServiceClient client = new tQuestionServiceClient();
            string whereStr = "";

            whereStr += "IsFAQ!" + true + ",";
            whereStr += "IsDelete!" + false + ",";
            whereStr += "BeFrom!" + 2 + ",";
            int pagesize = 120;
            int count    = 0;
            var list     = client.GetList(whereStr, page, pagesize, out count);

            return(View(list));
        }
        public ActionResult FAQDetail(int id)
        {
            List <ViewYogaDicItem> DicItemlist = method.listDicItem(2563);

            ViewBag.Diclist = DicItemlist;
            tQuestionServiceClient client = new tQuestionServiceClient();
            var    model    = client.GetById(id);
            string whereStr = "";
            int    count    = 0;

            whereStr += "IsFAQ!" + true + ",";
            whereStr += "IsDelete!" + false + ",";
            whereStr += "Hot!" + true + ",";
            List <ViewtQuestion> hotList = client.GetList(whereStr, 1, 6, out count);

            ViewBag.HotList = hotList;
            return(View(model));
        }
        public ActionResult UserQuestionIndex(int page = 1)
        {
            List <ViewYogaDicItem> DicItemlist = method.listDicItem(2563);

            ViewBag.Diclist = DicItemlist;
            tQuestionServiceClient client = new tQuestionServiceClient();
            string whereStr = "";

            whereStr += "IsFAQ!" + false + ",";
            whereStr += "IsDelete!" + false + ",";
            whereStr += "BeFrom!" + 1 + ",";
            int pagesize = 12;
            int count    = 0;
            List <ViewtQuestion> list = client.GetList(whereStr, page, pagesize, out count).OrderByDescending(p => p.QuestionTime).ToList();

            Webdiyer.WebControls.Mvc.PagedList <ViewtQuestion> pagelist = new Webdiyer.WebControls.Mvc.PagedList <ViewtQuestion>(list, page, pagesize, count);
            if (Request.IsAjaxRequest())
            {
                return(PartialView("UserQuestionIndexList", pagelist));
            }
            return(View(pagelist));
        }