//我要提问 public ActionResult RaiseQuestion() { string strAppId = AppId.ToString(); string QUserId = ViewBag.WeChatUserID; if (string.IsNullOrEmpty(QUserId)) { return(Redirect("/notauthed.html")); } if (string.IsNullOrEmpty(strAppId) || !int.TryParse(strAppId, out AppId)) { return(Redirect("/notauthed.html")); } int appId = int.Parse(strAppId); //记录用户行为 ExecuteBehavior(appId, 7, "SERVICE_ONLINE"); QuestionManageView ResultViewModel = new QuestionManageView(); var lst = _objService.GetListByQUserId <QuestionManageView>(appId, QUserId, null); if (lst != null) { ResultViewModel.List = lst; } else { ResultViewModel.List = new List <QuestionManageView>(); } ViewBag.appid = AppId; return(View("../QuestionManage/RaiseQuestion", ResultViewModel)); }
public override ActionResult Index() { string strAppId = Request["appId"]; string category = Request["category"]; var qList = QuesitonConfig(category, "CommonQuestion"); if (qList == null) { return(ErrorNotification("QuesitonConfig字段值为空")); } int appId; string lillyId = ViewBag.LillyId; if (string.IsNullOrEmpty(lillyId)) { return(Redirect("/notauthed.html")); } if (string.IsNullOrEmpty(strAppId) || !int.TryParse(strAppId, out appId)) { return(Redirect("/notauthed.html")); } //记录用户行为 ExecuteBehavior(appId, 7, category); var resultViewModel = new QuestionManageView(); var lst = _objService.GetListByQUserId <QuestionManageView>(appId, lillyId, category); resultViewModel.List = lst ?? new List <QuestionManageView>(); ViewBag.appid = appId; ViewBag.category = category; ViewBag.Title = qList.title; resultViewModel.questionConfig = qList; return(View(resultViewModel)); }