示例#1
0
        public ActionResult HasShared(int?page, string key)
        {
            PaginationInfo paging = new PaginationInfo();
            IList <Share>  shares = ishare.Get(null, UserName, null, null, null, null, 2, 1, page.HasValue ? page.Value : 1, null, out paging);

            foreach (Share share in shares)
            {
                share.Bady = ibady.Get(share.Bady.ID);
            }
            PagedList <Share> models = shares.ToPagedList <Share>(paging);

            return(View(models));
        }
示例#2
0
        public ActionResult WaitShare(int?page)
        {
            PaginationInfo paging  = new PaginationInfo();
            PaginationInfo paging2 = new PaginationInfo();
            IList <Task>   tasks   = itask.Get(null, UserName, null, "share", null, false, 0, 1, page.HasValue ? page.Value : 1, null, out paging);

            foreach (Task task in tasks)
            {
                Share share = ishare.Get(task.Taskid);
                task.Share = share;
                task.Bady  = ibady.Get(share.Bady.ID);
            }
            IList <Group>          groups = igroup.Get(null, UserName, 1, 0, null, out paging2);
            IList <SelectListItem> items  = new List <SelectListItem>();

            foreach (Group group in groups)
            {
                SelectListItem item = new SelectListItem();
                item.Text  = group.Name;
                item.Value = group.ID;
                items.Add(item);
            }
            ViewBag.GroupList = items;
            PagedList <Task> models = tasks.ToPagedList <Task>(paging);

            return(View(models));
        }
示例#3
0
        public ActionResult Index(int?page)
        {
            PaginationInfo paging = new PaginationInfo();
            IList <Share>  shares = ishare.Get(null, UserName, null, null, null, null, 2, 1, page.HasValue ? page.Value : 1, null, out paging);

            foreach (Share share in shares)
            {
                share.Bady = ibady.Get(share.Bady.ID);
            }
            PagedList <Share> models = shares.ToPagedList <Share>(paging);
            //ShareModel sharemodel = new ShareModel { PageInfo = paging , Records = shares };
            //IList<Bady> badys = ibady.Get(null, UserName, null, 1, page.HasValue ? page.Value : 1, null, out paging);
            //PagedList<Bady> models = badys.ToPagedList<Bady>(paging);
            IList <SettingGroup> groupsettings = iusersetting.GetByUsername(UserName);

            int likerate    = int.Parse(GetSettingVal(groupsettings, "3C309D27-C774-4E60-8706-17EA2C2B0691"));
            int recordrate  = int.Parse(GetSettingVal(groupsettings, "E038EAB0-9F3D-4967-BE16-06E04633D6C8"));
            int likedrate   = int.Parse(GetSettingVal(groupsettings, "6C715AE2-2D77-4827-B4C1-7E5352B7D00B"));
            int commentrate = int.Parse(GetSettingVal(groupsettings, "4E8E13CA-0726-4610-8CC5-1A5A3191A7BD"));

            ViewBag.likerate    = likerate;
            ViewBag.recordrate  = recordrate;
            ViewBag.likedrate   = likedrate;
            ViewBag.commentrate = commentrate;

            return(View(models));
        }