public Group(string account, string name, Member[] members) : base(GlobalConst.CodeAccountPreFlag_Publisher) { Account = account; Name = name; Members.AddRange(members); }
public StandardResult UpdateGroupMember(string account, Member[] ary_str_member, bool isremove) { if (!ComAcc.IsCommonAccount(account, GlobalConst.CodeAccountPreFlag_Group)) return Result(iTripExceptionCode.Error_Wrong_Account); var resp_group = GetRespository<Group>(); var group = resp_group.Get(g => g.Account == account); if (isremove) group.Members.RemoveAll(m => ary_str_member.Any(o => o.Account == m.Account)); else { ary_str_member.ForEach(delegate(Member member) { if (!group.Members.Exists(m => m.Account == member.Account)) group.Members.Add(member); }); } resp_group.Save(group); return Result(); }