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

            return((refAdmReferralType)ob);
        }
コード例 #2
0
        public refAdmReferralType GetObjectByKey(long k_IAdmReferralTypeID)
        {
            if (this.Contains(GetKey(k_IAdmReferralTypeID)) == false)
            {
                return(null);
            }
            refAdmReferralType ob = this[GetKey(k_IAdmReferralTypeID)];

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

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

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

                return(true);
            }

            return(false);
        }
コード例 #5
0
        public refAdmReferralType GetObjectByKey(long k_IAdmReferralTypeID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_IAdmReferralTypeID)) == false)
            {
                refAdmReferralType ob = repository.GetQuery <refAdmReferralType>().FirstOrDefault(o => o.IAdmReferralTypeID == k_IAdmReferralTypeID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            refAdmReferralType obj = this[GetKey(k_IAdmReferralTypeID)];

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

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

            return(true);
        }
コード例 #8
0
 protected override KeyValuePair <string, long> GetKeyForItem(refAdmReferralType item)
 {
     return(item.Key);
 }