public void Setup() { QuestionRY = new DataRepository.DO.questionR(); UserinfoRY = new DataRepository.DO.userinfoR(); TagRY = new DataRepository.DO.tagR(); QuestiontagRY = new DataRepository.DO.questiontagR(); AnswerRY = new DataRepository.DO.answerR(); homeProblemIndex = new ProblemIndex(QuestionRY,UserinfoRY,AnswerRY); }
public ActionResult Index(long? id, string other) { if (id == null) { id = 0; } ProblemIndex Tmodel = new ProblemIndex(QuestionRY, UserinfoRY, answerRy); Tmodel.questionNow= Tmodel.getquestionByid(id.Value); Tmodel.founder= Tmodel.setFounderuserinfo(Tmodel.questionNow); var ans = Tmodel.getanswers(id.Value); Tmodel.answerAndUserNow = Tmodel.setUserForanswer(ans); #region MyRegion Tmodel._pagetitle = Tmodel.questionNow.title; Tmodel._pagesysName = "ProblemTag".ToLower(); Tmodel._pageMianbao = Tmodel.questionNow.tags; #endregion return View(Tmodel); }