Exemple #1
0
        public async Task <IActionResult> LatestDiscussion(
            [FromQuery] int p         = 1,
            [FromQuery] string filter = "")
        {
            var getFilter = new GetMessGroupDTO
            {
                Filter         = filter,
                MaxResultCount = 5,
                SkipCount      = (p - 1) * 5
            };

            var res = await _MessGroupService.GetListAsync(getFilter);

            string listRes = string.Format("Showing {0} to {1} of {2} discussion",
                                           res.TotalCount > 0 ? getFilter.SkipCount + 1 : 0, getFilter.SkipCount + res.Items.Count, res.TotalCount);

            if (!filter.IsNullOrEmpty())
            {
                listRes += string.Format(" for \"{0}\"", getFilter.Filter);
            }
            ViewBag.ListState = listRes;

            ViewBag.Filter     = filter;
            ViewBag.Pagination = PaginateHelper.Generate(
                "javascript:syncVt('{0}', '" + filter + "');",
                p, res.TotalCount, AppTheme.Limit);

            return(PartialView("~/Pages/Discussions/Partials/LatestDiscussion.cshtml", res));
        }
Exemple #2
0
        public async Task <IActionResult> SyncAlertCenter()
        {
            var getFilter = new GetMessGroupDTO
            {
                MaxResultCount = 5,
                SkipCount      = 0
            };

            var res = await _MessGroupService.GetListAsync(getFilter);

            return(PartialView("~/Pages/_Common/MessageCenter/MessageCenter.cshtml", res));
        }