Esempio n. 1
0
        public ActionResult Tag(string etiket, int?page)
        {
            FrmViewData frm = new FrmViewData();
            int         totalCount;

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

            ViewData["tag"] = etiket;
            return(View(frm.WithPaging(pager).WithTags(_repoTag.GetAll())));
        }
Esempio n. 2
0
        public ActionResult Index(int?page)
        {
            FrmViewData frm = new FrmViewData();
            int         totalCount;

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

            ViewBag.SiteName = _repoSet[SettingKey.SiteName];
            //string str = Request.ServerVariables["HTTP_REFERER"];//Request.UrlReferrer.AbsoluteUri;//Request.ServerVariables["REQUEST_URI"];

            InsertPageIstatik(0, AnaSayfaId);
            return(View(frm.WithPaging(pager).WithTags(_repoTag.GetAll())));
        }
Esempio 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())));
        }