コード例 #1
0
        public ActionResult Index(PagerParameters pagerParameters, PushSearch search)
        {
            Pager   pager      = new Pager(_orchardServices.WorkContext.CurrentSite, pagerParameters);
            var     tuple      = _pushNotificationService.SearchPushNotification(search.Expression, pager.GetStartIndex(), pager.PageSize);
            var     AllRecord  = tuple.Item1;
            var     totRecord  = tuple.Item2;
            dynamic pagerShape = _orchardServices.New.Pager(pager).TotalItemCount(totRecord);
            var     model      = new PushIndex(AllRecord, search, pagerShape);

            return(View(model));
        }
コード例 #2
0
        public ActionResult Index(PagerParameters pagerParameters, PushSearch search)
        {
            if (search.Operation == "Rename")
            {
                _pushNotificationService.ReassignDevices(search.SelectedMachineName, search.ActualMachineName);
            }
            else if (search.Operation == "Clear")
            {
                search.Expression = "";
            }
            Pager   pager      = new Pager(_orchardServices.WorkContext.CurrentSite, pagerParameters);
            var     tuple      = _pushNotificationService.SearchPushNotification(search.Expression, pager.GetStartIndex(), pager.PageSize);
            var     AllRecord  = tuple.Item1;
            var     totRecord  = tuple.Item2;
            dynamic pagerShape = _orchardServices.New.Pager(pager).TotalItemCount(totRecord);
            var     model      = new PushIndex(AllRecord, search, pagerShape);

            model.MachineNames = _pushNotificationService.GetMachineNames();
            return(View(model));
        }