当前位置: 首页>>代码示例>>C#>>正文


C# GroupMember类代码示例

本文整理汇总了C#中GroupMember的典型用法代码示例。如果您正苦于以下问题:C# GroupMember类的具体用法?C# GroupMember怎么用?C# GroupMember使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GroupMember类属于命名空间,在下文中一共展示了GroupMember类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Register

 public void Register(GroupMember member)
 {
     if (! members.Contains(member)) {
         count++;
         members.Add(member);
     }
 }
开发者ID:naturalistcharlie,项目名称:BuckthornBash,代码行数:7,代码来源:Group.cs

示例2: OnLoad

        /// <summary>
        /// Raises the <see cref="E:System.Web.UI.Control.Load" /> event.
        /// </summary>
        /// <param name="e">The <see cref="T:System.EventArgs" /> object that contains the event data.</param>
        protected override void OnLoad( EventArgs e )
        {
            base.OnLoad( e );

            if ( !Page.IsPostBack )
            {
                string groupId = PageParameter( "GroupId" );
                string groupMemberId = PageParameter( "GroupMemberId" );
                if ( !string.IsNullOrWhiteSpace( groupMemberId ) )
                {
                    if ( string.IsNullOrWhiteSpace( groupId ) )
                    {
                        ShowDetail( "GroupMemberId", int.Parse( groupMemberId ) );
                    }
                    else
                    {
                        ShowDetail( "GroupMemberId", int.Parse( groupMemberId ), int.Parse( groupId ) );
                    }
                }
                else
                {
                    upDetail.Visible = false;
                }
            }
            else
            {
                var groupMember = new GroupMember { GroupId = hfGroupId.ValueAsInt() };
                if ( groupMember != null )
                {
                    groupMember.LoadAttributes();
                    phAttributes.Controls.Clear();
                    Rock.Attribute.Helper.AddEditControls( groupMember, phAttributes, false );
                }
            }
        }
开发者ID:jondhinkle,项目名称:Rock,代码行数:39,代码来源:GroupMemberDetail.ascx.cs

示例3: Build

 /// <summary>
 /// Builds and returns the GroupMember object.
 /// </summary>
 /// <returns>the GroupMember object</returns>
 public GroupMember Build()
 {
     GroupMember groupMember = new GroupMember
     {
         Email = this.email
     };
     return groupMember;
 }
开发者ID:smartsheet-platform,项目名称:smartsheet-csharp-sdk,代码行数:12,代码来源:GroupMember.cs

示例4: DeleteGroupMember

 public void DeleteGroupMember(GroupMember groupMember)
 {
     using (SPKTDataContext dc = conn.GetContext())
     {
         dc.GroupMembers.Attach(groupMember, true);
         dc.GroupMembers.DeleteOnSubmit(groupMember);
         dc.SubmitChanges();
     }
 }
开发者ID:ngocpq,项目名称:MHX2,代码行数:9,代码来源:GroupMemberRepository.cs

示例5: GroupMemberPlacedElsewhereTransaction

 /// <summary>
 /// Initializes a new instance of the <see cref="GroupMemberPlacedElsewhereTransaction" /> class.
 /// </summary>
 /// <param name="groupMember">The group member of the current group they are in (before being deleted and processed) </param>
 /// <param name="note">The note.</param>
 /// <param name="trigger">The GroupMemberWorkflowTrigger.</param>
 public GroupMemberPlacedElsewhereTransaction( GroupMember groupMember, string note, GroupMemberWorkflowTrigger trigger )
 {
     this.Trigger = trigger;
     this.GroupId = groupMember.GroupId;
     this.PersonId = groupMember.PersonId;
     this.GroupMemberStatusName = groupMember.GroupMemberStatus.ConvertToString();
     this.GroupMemberRoleName = groupMember.GroupRole.ToString();
     groupMember.LoadAttributes();
     this.GroupMemberAttributeValues = groupMember.AttributeValues.ToDictionary( k => k.Key, v => v.Value.Value );
     this.Note = note;
 }
开发者ID:NewSpring,项目名称:Rock,代码行数:17,代码来源:GroupMemberPlacedElsewhereTransaction.cs

示例6: UpdateCharacterGroup

 public static void UpdateCharacterGroup(GroupMember pMember)
 {
     using (var client = Program.DatabaseManager.GetClient())
     {
         string q = string.Format(UpdateCharacterGroupQuery,
                     pMember.Group.Id,
                     pMember.Role == GroupRole.Master,
                     pMember.Character.ID);
         client.ExecuteQuery(q);
     }
 }
开发者ID:Dextan,项目名称:Estrella,代码行数:11,代码来源:DatabaseHelper.cs

示例7: Deregister

 /*
 This needs to be static because if the Group is destroyed before
 all of its members, then it might be inadvertently recreated.
   */
 public static void Deregister(GroupMember member)
 {
     var o = GameObject.Find(member.groupName);
     if (o != null) {
         Group group = Group.GetGroup(member.groupName);
         if (group.members.Contains(member)) {
             group.count--;
             group.members.Remove(member);
         }
     }
 }
开发者ID:naturalistcharlie,项目名称:BuckthornBash,代码行数:15,代码来源:Group.cs

示例8: GroupMember

        internal static GroupMemberEntity GroupMember(GroupMember ent)
        {
            GroupMemberEntity data = new GroupMemberEntity();

            data.groupMemberId = ent.Id;
            data.groupFK = ent.GroupFK;
            data.memberFK = ent.MemberFK;
            data.isAdmin = ent.IsAdmin;
            data.updateTimestamp = ent.UpdateTimestamp;
            data.updatePersonFK = ent.UpdatePersonFK;

            return data;
        }
开发者ID:greinedt,项目名称:GiftList,代码行数:13,代码来源:GroupMember.cs

示例9: RequestMembership

 public void RequestMembership()
 {
     if (_webContext.CurrentUser != null)
     {
         GroupMember gm = new GroupMember();
         gm.AccountID = _webContext.CurrentUser.AccountID;
         gm.GroupID = _webContext.GroupID;
         gm.CreateDate = DateTime.Now;
         gm.IsAdmin = false;
         gm.IsApproved = false;
         _groupMemberRepository.SaveGroupMember(gm);
         ShowMessage("Yêu cầu thành công!Cảm ơn bạn đã quan tâm đến nhóm! Chờ Admin Group chấp nhận yêu cầu của bạn");
     }
 }
开发者ID:SPKT,项目名称:MHX2,代码行数:14,代码来源:GroupHeader.ascx.cs

示例10: InviteMember

        public GroupMember InviteMember( GroupId groupId, GroupMember groupMember ) {
            string path = template.UrlFor (UrlTemplate.GROUPS_MEMBER_PATH)
				.Replace("{groupId}", groupId.Id )
                .Build ();
			Silanis.ESL.API.GroupMember apiGroupMember = new GroupMemberConverter(groupMember).ToAPIGroupMember();
            try {
				string json = JsonConvert.SerializeObject (apiGroupMember, settings);
                string response = restClient.Post(path, json);              
				Silanis.ESL.API.GroupMember apiResponse = JsonConvert.DeserializeObject<Silanis.ESL.API.GroupMember> (response);
				return new GroupMemberConverter( apiResponse ).ToSDKGroupMember();
            } catch (Exception e) {
                throw new EslException ("Could not create a new package." + " Exception: " + e.Message);
            }
        }
开发者ID:janstadt,项目名称:esl.sdk.net,代码行数:14,代码来源:GroupService.cs

示例11: GetSmallGroupMembers

        public Contracts.GenericListResult<Contracts.SmallGroupMember> GetSmallGroupMembers(int groupID, int start, int max)
        {
            Contracts.GenericListResult<Contracts.SmallGroupMember> list = new Contracts.GenericListResult<Contracts.SmallGroupMember>();
            Contracts.SmallGroupMemberMapper mapper = new Contracts.SmallGroupMemberMapper();
            Group group = new Group(groupID);
            GroupMember leader = new GroupMember(groupID, group.Leader);
            leader.Role = new Lookup(new Guid("029B270C-7B7A-499F-8006-CC3211C91E95"));
            group.Members.Add(leader);

            Boolean accessDenied = false;
            // If this person isn't the outright leader and they don't have view access
            if (group.Leader.PersonID != ArenaContext.Current.Person.PersonID &&
                RestApi.GroupClusterOperationAllowed(ArenaContext.Current.Person.PersonID, group.GroupClusterID, OperationType.View) == false) {

                accessDenied = true;

                // Do a deeper dive into each member of the group
                foreach(GroupMember gm in group.Members) {
                    if (gm.Active && gm.Role.Value == "Leader")
                    {
                        accessDenied = false;
                        break;
                    }
                }
            }
            if (accessDenied) {
                throw new Exception("Access denied.");
            }

            list.Start = start;
            list.Max = max;
            list.Total = group.Members.Count;
            list.Items = new List<Contracts.SmallGroupMember>();

            int i;
            for (i = start; i < group.Members.Count && (max <= 0 || i < (start + max)); i++)
            {
                list.Items.Add(mapper.FromArena(group.Members[i]));
            }

            return list;
        }
开发者ID:secc,项目名称:arena-secc-webservice,代码行数:42,代码来源:SmallGroupAPI.cs

示例12: ReceiveBadgeList

        private void ReceiveBadgeList(GroupMember member)
        {
            uint count = 0;
            if (!currentUsers.TryGetValue(member.Group, out count))
            {
                currentUsers.Add(member.Group, 1);

                ServerMessage message = PacketHandelingManager.GetRecycledItem(OutputCode.SendGroup);
                message.AddInt32(1);
                message.AddUInt32(member.Group.ID);
                message.AddString(member.Group.image);
                broadcaster.SendMessage(message);
            }
            else
            {
                currentUsers[member.Group] = ++count;
            }

            GameClient client = ButterflyEnvironment.GetGame().GetClientManager().GetClient(member.data.Id);
            if (client != null)
                client.SendMessage(SerializeList());
        }
开发者ID:BjkGkh,项目名称:R106,代码行数:22,代码来源:GroupMembershipHandler.cs

示例13: Init

            public override void Init(StoC_0x16_VariousUpdate pak)
            {
                groupMembers = new GroupMember[pak.SubCount];

                m_oids = new ushort[pak.SubCount];
                for (int i = 0; i < pak.SubCount; i++)
                {
                    GroupMember member = new GroupMember();

                    member.level = pak.ReadByte();
                    member.health = pak.ReadByte();
                    member.mana = pak.ReadByte();
                    member.endurance = pak.ReadByte(); // new in 1.69
                    member.status = pak.ReadByte();
                    member.oid = pak.ReadShort();
                    member.name = pak.ReadPascalString();
                    member.classname = pak.ReadPascalString();
                    m_oids[i] = member.oid;

                    groupMembers[i] = member;
                }
            }
开发者ID:Dawn-of-Light,项目名称:PacketLogConverter,代码行数:22,代码来源:StoC_0x16_VariousUpdate_169.cs

示例14: AddGroupMember

        /// <summary>
        /// Adds the group member.
        /// </summary>
        /// <param name="familyGroup">The family group.</param>
        /// <param name="person">The person.</param>
        /// <returns></returns>
        protected GroupMember AddGroupMember( int familyGroupId, Person person )
        {
            var rockContext = new RockContext();

            GroupMember groupMember = new GroupMember();
            groupMember.IsSystem = false;
            groupMember.GroupId = familyGroupId;
            groupMember.PersonId = person.Id;
            if ( person.Age >= 18 )
            {
                groupMember.GroupRoleId = new GroupTypeRoleService( rockContext ).Get( new Guid( Rock.SystemGuid.GroupRole.GROUPROLE_FAMILY_MEMBER_ADULT ) ).Id;
            }
            else
            {
                groupMember.GroupRoleId = new GroupTypeRoleService( rockContext ).Get( new Guid( Rock.SystemGuid.GroupRole.GROUPROLE_FAMILY_MEMBER_CHILD ) ).Id;
            }

            GroupMemberService groupMemberService = new GroupMemberService( rockContext );
            groupMemberService.Add( groupMember );
            rockContext.SaveChanges();

            return groupMember;
        }
开发者ID:CentralAZ,项目名称:Rockit-CentralAZ,代码行数:29,代码来源:FamilySelect.ascx.cs

示例15: UserLeaving

        private void UserLeaving(GroupMember member)
        {
            // unload fix

            uint count = 0;

            if (currentUsers != null)
            {
                if (member != null)
                {
                    if (member.Group != null)
                    {
                        if (currentUsers.TryGetValue(member.Group, out count))
                        {
                            if (count > 1)
                                currentUsers[member.Group] = --count;
                            else
                                currentUsers.Remove(member.Group);
                        }
                    }
                }
            }
        }
开发者ID:BjkGkh,项目名称:R106,代码行数:23,代码来源:GroupMembershipHandler.cs


注:本文中的GroupMember类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。