예제 #1
0
        public MRParagraph GetObjectByKey(object keypair)
        {
            if (this.Contains(GetKey(keypair)) == false)
            {
                return(null);
            }
            MRParagraph ob = this[GetKey(keypair)];

            return((MRParagraph)ob);
        }
예제 #2
0
        public MRParagraph GetObjectByKey(long k_ParID)
        {
            if (this.Contains(GetKey(k_ParID)) == false)
            {
                return(null);
            }
            MRParagraph ob = this[GetKey(k_ParID)];

            return((MRParagraph)ob);
        }
예제 #3
0
        public MRParagraph GetObjectByKey(KeyValuePair <string, long> keypair)
        {
            if (this.Contains(keypair) == false)
            {
                return(null);
            }
            MRParagraph ob = this[keypair];

            return((MRParagraph)ob);
        }
예제 #4
0
        public bool ChangeItem(KeyValuePair <string, long> keypair, MRParagraph item)
        {
            MRParagraph orig = this.GetObjectByKey(keypair);

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

                return(true);
            }

            return(false);
        }
예제 #5
0
        public MRParagraph GetObjectByKey(long k_ParID, LV.Core.DAL.Base.IRepository repository)
        {
            if (this.Contains(GetKey(k_ParID)) == false)
            {
                MRParagraph ob = repository.GetQuery <MRParagraph>().FirstOrDefault(o => o.ParID == k_ParID);
                if (ob != null)
                {
                    this.Add(ob);
                }
                return(ob);
            }
            MRParagraph obj = this[GetKey(k_ParID)];

            return((MRParagraph)obj);
        }
예제 #6
0
        public bool DeleteObject(MRParagraph item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Update(item);

            return(true);
        }
예제 #7
0
        public bool AddObject(MRParagraph item, LV.Core.DAL.Base.IRepository repository)
        {
            repository.Add(item);

            return(true);
        }
예제 #8
0
 protected override KeyValuePair <string, long> GetKeyForItem(MRParagraph item)
 {
     return(item.Key);
 }