Ejemplo n.º 1
0
 public HomeController()
 {
     _repQues  = new RepositoryQuestion("", DbType.SqLite);
     _repoTag  = new RepositoryTag("", DbType.SqLite);
     _repoSet  = new RepositorySetting("", DbType.SqLite);
     _repoIst  = new RepositoryQuestionVisit("", DbType.SqLite);
     _repoUser = new RepositoryUser("", DbType.SqLite);
 }
Ejemplo n.º 2
0
 public SoruController()
 {
     _repoAns     = new RepositoryAnswers("", DbType.SqLite);
     _repoQues    = new RepositoryQuestion("", DbType.SqLite);
     _repoTag     = new RepositoryTag("", DbType.SqLite);
     _repoUser    = new RepositoryUser("", DbType.SqLite);
     _repoIst     = new RepositoryQuestionVisit("", DbType.SqLite);
     _repoQuesTag = new RepositoryQuestionTag("", DbType.SqLite);
 }
Ejemplo n.º 3
0
        //
        // GET: /Ara/

        public ActionResult Index(int?page, string q)
        {
            RepositoryQuestion _repQues = new RepositoryQuestion("", DbType.SqLite);
            RepositorySetting  _repoSet = new RepositorySetting("", DbType.SqLite);
            RepositoryTag      _repoTag = new RepositoryTag("", DbType.SqLite);
            int totalCount;

            if (!string.IsNullOrEmpty(q))
            {
                q = q.Replace("'", "%t%");
            }
            FrmViewData frm = new FrmViewData();

            frm.Questions = _repQues.GetListQueryByDate(q, PagerCount(), page ?? 1, out totalCount);
            PaginatedList pager = new PaginatedList((page ?? 1), PagerCount(), totalCount);

            ViewBag.SiteName      = _repoSet[SettingKey.SiteName];
            ViewData["queryData"] = q;
            return(View(frm.WithPaging(pager).WithTags(_repoTag.GetAll())));
        }
Ejemplo n.º 4
0
 public EtiketController()
 {
     _repQues = new RepositoryQuestion("", DbType.SqLite);
     _repoTag = new RepositoryTag("", DbType.SqLite);
 }
Ejemplo n.º 5
0
 public QuestionController()
 {
     _repQues  = new RepositoryQuestion("", DbType.SqLite);
     _repAns   = new RepositoryAnswers("", DbType.SqLite);
     _repQuTag = new RepositoryQuestionTag("", DbType.SqLite);
 }