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

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

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

                return(true);
            }

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

            return((EquipHistory)obj);
        }
示例#4
0
        public bool DeleteObject(EquipHistory item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

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

            return(true);
        }