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

            return((WardInDept)ob);
        }
Esempio n. 2
0
        public WardInDept GetObjectByKey(long k_WDID)
        {
            if (this.Contains(GetKey(k_WDID)) == false)
            {
                return(null);
            }
            WardInDept ob = this[GetKey(k_WDID)];

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

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

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

                return(true);
            }

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

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

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

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