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

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

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

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

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

                return(true);
            }

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

            return((refCertification)obj);
        }
コード例 #6
0
 protected override KeyValuePair <string, long> GetKeyForItem(refCertification item)
 {
     return(item.Key);
 }
コード例 #7
0
        public bool DeleteObject(refCertification item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

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

            return(true);
        }