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

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

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

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

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

                return(true);
            }

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

            return((refReligion)obj);
        }
Пример #6
0
 protected override KeyValuePair <string, long> GetKeyForItem(refReligion item)
 {
     return(item.Key);
 }
Пример #7
0
        public bool DeleteObject(refReligion item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

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

            return(true);
        }