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

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

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

            return((AllergyIntolerance)ob);
        }
Ejemplo n.º 4
0
        public bool ChangeItem(KeyValuePair <string, long> keypair, AllergyIntolerance item)
        {
            AllergyIntolerance 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 AllergyIntolerance GetObjectByKey(long k_AllergyID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_AllergyID)) == false)
            {
                AllergyIntolerance ob = repository.GetQuery <AllergyIntolerance>().FirstOrDefault(o => o.AllergyID == k_AllergyID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            AllergyIntolerance obj = this[GetKey(k_AllergyID)];

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

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

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