Ejemplo n.º 1
0
        public PrescriptionHistory GetObjectByKey(object keypair)
        {
            if (this.Contains(GetKey(keypair)) == false)
            {
                return(null);
            }
            PrescriptionHistory ob = this[GetKey(keypair)];

            return((PrescriptionHistory)ob);
        }
Ejemplo n.º 2
0
        public PrescriptionHistory GetObjectByKey(long k_KeepTrackID)
        {
            if (this.Contains(GetKey(k_KeepTrackID)) == false)
            {
                return(null);
            }
            PrescriptionHistory ob = this[GetKey(k_KeepTrackID)];

            return((PrescriptionHistory)ob);
        }
Ejemplo n.º 3
0
        public PrescriptionHistory GetObjectByKey(KeyValuePair <string, long> keypair)
        {
            if (this.Contains(keypair) == false)
            {
                return(null);
            }
            PrescriptionHistory ob = this[keypair];

            return((PrescriptionHistory)ob);
        }
Ejemplo n.º 4
0
        public bool ChangeItem(KeyValuePair <string, long> keypair, PrescriptionHistory item)
        {
            PrescriptionHistory orig = this.GetObjectByKey(keypair);

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

                return(true);
            }

            return(false);
        }
Ejemplo n.º 5
0
        public PrescriptionHistory GetObjectByKey(long k_KeepTrackID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_KeepTrackID)) == false)
            {
                PrescriptionHistory ob = repository.GetQuery <PrescriptionHistory>().FirstOrDefault(o => o.KeepTrackID == k_KeepTrackID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            PrescriptionHistory obj = this[GetKey(k_KeepTrackID)];

            return((PrescriptionHistory)obj);
        }
Ejemplo n.º 6
0
        public bool DeleteObject(PrescriptionHistory item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

            return(true);
        }
Ejemplo n.º 7
0
        public bool AddObject(PrescriptionHistory item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Add(item);

            return(true);
        }
Ejemplo n.º 8
0
 protected override KeyValuePair <string, long> GetKeyForItem(PrescriptionHistory item)
 {
     return(item.Key);
 }