Пример #1
0
        public AdvancedSpecialist GetObjectByKey(object keypair)
        {
            if (this.Contains(GetKey(keypair)) == false)
            {
                return(null);
            }
            AdvancedSpecialist ob = this[GetKey(keypair)];

            return((AdvancedSpecialist)ob);
        }
Пример #2
0
        public AdvancedSpecialist GetObjectByKey(long k_ASpecID)
        {
            if (this.Contains(GetKey(k_ASpecID)) == false)
            {
                return(null);
            }
            AdvancedSpecialist ob = this[GetKey(k_ASpecID)];

            return((AdvancedSpecialist)ob);
        }
Пример #3
0
        public AdvancedSpecialist GetObjectByKey(KeyValuePair <string, long> keypair)
        {
            if (this.Contains(keypair) == false)
            {
                return(null);
            }
            AdvancedSpecialist ob = this[keypair];

            return((AdvancedSpecialist)ob);
        }
Пример #4
0
        public bool ChangeItem(KeyValuePair <string, long> keypair, AdvancedSpecialist item)
        {
            AdvancedSpecialist orig = this.GetObjectByKey(keypair);

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

                return(true);
            }

            return(false);
        }
Пример #5
0
        public AdvancedSpecialist GetObjectByKey(long k_ASpecID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_ASpecID)) == false)
            {
                AdvancedSpecialist ob = repository.GetQuery <AdvancedSpecialist>().FirstOrDefault(o => o.ASpecID == k_ASpecID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            AdvancedSpecialist obj = this[GetKey(k_ASpecID)];

            return((AdvancedSpecialist)obj);
        }
Пример #6
0
        public bool DeleteObject(AdvancedSpecialist item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

            return(true);
        }
Пример #7
0
        public bool AddObject(AdvancedSpecialist item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Add(item);

            return(true);
        }
Пример #8
0
 protected override KeyValuePair <string, long> GetKeyForItem(AdvancedSpecialist item)
 {
     return(item.Key);
 }