public HospitalFeeTransaction GetObjectByKey(object keypair)
        {
            if (this.Contains(GetKey(keypair)) == false)
            {
                return(null);
            }
            HospitalFeeTransaction ob = this[GetKey(keypair)];

            return((HospitalFeeTransaction)ob);
        }
        public HospitalFeeTransaction GetObjectByKey(long k_HosFeeTransID)
        {
            if (this.Contains(GetKey(k_HosFeeTransID)) == false)
            {
                return(null);
            }
            HospitalFeeTransaction ob = this[GetKey(k_HosFeeTransID)];

            return((HospitalFeeTransaction)ob);
        }
        public HospitalFeeTransaction GetObjectByKey(KeyValuePair <string, long> keypair)
        {
            if (this.Contains(keypair) == false)
            {
                return(null);
            }
            HospitalFeeTransaction ob = this[keypair];

            return((HospitalFeeTransaction)ob);
        }
        public bool ChangeItem(KeyValuePair <string, long> keypair, HospitalFeeTransaction item)
        {
            HospitalFeeTransaction orig = this.GetObjectByKey(keypair);

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

                return(true);
            }

            return(false);
        }
        public HospitalFeeTransaction GetObjectByKey(long k_HosFeeTransID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_HosFeeTransID)) == false)
            {
                HospitalFeeTransaction ob = repository.GetQuery <HospitalFeeTransaction>().FirstOrDefault(o => o.HosFeeTransID == k_HosFeeTransID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            HospitalFeeTransaction obj = this[GetKey(k_HosFeeTransID)];

            return((HospitalFeeTransaction)obj);
        }
        public bool DeleteObject(HospitalFeeTransaction item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

            return(true);
        }
        public bool AddObject(HospitalFeeTransaction item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Add(item);

            return(true);
        }
 protected override KeyValuePair <string, long> GetKeyForItem(HospitalFeeTransaction item)
 {
     return(item.Key);
 }