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

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

            return((DrMedicineAdvice)ob);
        }
示例#3
0
        public DrMedicineAdvice GetObjectByKey(long k_DMAID)
        {
            if (this.Contains(GetKey(k_DMAID)) == false)
            {
                return(null);
            }
            DrMedicineAdvice ob = this[GetKey(k_DMAID)];

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

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

                return(true);
            }

            return(false);
        }
示例#5
0
        public DrMedicineAdvice GetObjectByKey(long k_DMAID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_DMAID)) == false)
            {
                DrMedicineAdvice ob = repository.GetQuery <DrMedicineAdvice>().FirstOrDefault(o => o.DMAID == k_DMAID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            DrMedicineAdvice obj = this[GetKey(k_DMAID)];

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

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

            return(true);
        }