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

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

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

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

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

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

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