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

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

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

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

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

                return(true);
            }

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

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

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

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