예제 #1
0
        public void AcceptGroupJoinRequest(long groupId, long userId)
        {
            if (!IsHeadman(groupId))
            {
                throw new Exception("只有组长才能同意进组请求");
            }
            GroupMember m = member_repo.GetFirstOrDefaultObject(g => g.GroupId == groupId && g.MemberId == userId);

            m.IsAccepted = true;
            member_repo.Save(m);
        }
예제 #2
0
        public void AcceptGroupJoinRequest(long groupId, long userId)
        {
            Account account = Server.HttpContext.Session["Account"] as Account;
            Group   gp      = GetObject(groupId);

            if (gp.HeadmanId != account.Id)
            {
                throw new Exception("只有组长才能同意进组请求");
            }
            GroupMember m = member_repo.GetFirstOrDefaultObject(g => g.GroupId == groupId && g.MemberId == userId);

            m.IsAccepted = true;
            member_repo.Save(m);
        }