Esempio n. 1
0
        /// <summary>
        /// 内部管理-在线会员
        /// </summary>
        /// <param name="id">1: admin, 2:总代理, 3: 代理, 4: 会员</param>
        /// <returns></returns>
        public ActionResult Internal(int id)
        {
            var roleId = (id > 1 && id <= 4) ? id : 4;

            ViewBag.UserType     = roleId;
            ViewBag.UserTypeName = RoleConst.GetRoleName(roleId);

            return(View());
        }
Esempio n. 2
0
        public ActionResult Rebate(int id, int cid = 0)
        {
            ViewBag.UserType     = id;
            ViewBag.UserId       = cid;
            ViewBag.UserTypeName = RoleConst.GetRoleName(id);
            ViewBag.RebateUser   = new UserService().GetUserOnly(cid);

            return(View());
        }
Esempio n. 3
0
        private List <RoleModel> GetOnlineStatistics()
        {
            var statistics = PKBag.OnlineUserRecorder.GetUserList().GroupBy(u => u.UserDegree).Select(g => new RoleModel
            {
                RoleId   = g.Key,
                RoleName = RoleConst.GetRoleName(g.Key),
                Count    = g.Count()
            }).OrderBy(r => r.RoleId).ToList();

            return(statistics);
        }
Esempio n. 4
0
        private List <RoleModel> GetOnlineStatistics()
        {
            var allUsers   = GetOnlineUsers();
            var statistics = allUsers.Where(u => u.UniqueID == LoginUser.UserId || u.ParentUserId == LoginUser.UserId || u.GrandUserId == LoginUser.UserId).GroupBy(u => u.UserDegree).Select(g => new RoleModel
            {
                RoleId   = g.Key,
                RoleName = RoleConst.GetRoleName(g.Key),
                Count    = g.Count()
            }).OrderBy(r => r.RoleId).ToList();

            return(statistics);
        }