示例#1
0
        public UsersInGroup GetObjectByKey(object keypair)
        {
            if (this.Contains(GetKey(keypair)) == false)
            {
                return(null);
            }
            UsersInGroup ob = this[GetKey(keypair)];

            return((UsersInGroup)ob);
        }
示例#2
0
        public UsersInGroup GetObjectByKey(long k_AccountID, long k_UserGroupID)
        {
            if (this.Contains(GetKey(k_AccountID, k_UserGroupID)) == false)
            {
                return(null);
            }
            UsersInGroup ob = this[GetKey(k_AccountID, k_UserGroupID)];

            return((UsersInGroup)ob);
        }
示例#3
0
        public UsersInGroup GetObjectByKey(KeyValuePair <KeyValuePair <string, long>, KeyValuePair <string, long> > keypair)
        {
            if (this.Contains(keypair) == false)
            {
                return(null);
            }
            UsersInGroup ob = this[keypair];

            return((UsersInGroup)ob);
        }
示例#4
0
        public bool ChangeItem(KeyValuePair <KeyValuePair <string, long>, KeyValuePair <string, long> > keypair, UsersInGroup item)
        {
            UsersInGroup orig = this.GetObjectByKey(keypair);

            if (orig != null)
            {
                int index = this.IndexOf(orig);
                this.SetItem(index, item);

                return(true);
            }

            return(false);
        }
示例#5
0
        public UsersInGroup GetObjectByKey(long k_AccountID, long k_UserGroupID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_AccountID, k_UserGroupID)) == false)
            {
                UsersInGroup ob = repository.GetQuery <UsersInGroup>().FirstOrDefault(o => o.AccountID == k_AccountID && o.UserGroupID == k_UserGroupID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            UsersInGroup obj = this[GetKey(k_AccountID, k_UserGroupID)];

            return((UsersInGroup)obj);
        }
示例#6
0
        public bool DeleteObject(UsersInGroup item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

            return(true);
        }
示例#7
0
        public bool AddObject(UsersInGroup item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Add(item);

            return(true);
        }
示例#8
0
 protected override KeyValuePair <KeyValuePair <string, long>, KeyValuePair <string, long> > GetKeyForItem(UsersInGroup item)
 {
     return(item.Key);
 }