예제 #1
0
        /// <summary>
        /// Removes class from list by primary key
        /// </summary>
        public bool Remove(int imageId)
        {
            bool result = false;
            SliderImagePrimaryKey key = new SliderImagePrimaryKey();

            key.ImageId = imageId;

            if (m_Items.ContainsKey(key))
            {
                result = Remove(m_Items[key]);
            }
            return(result);
        }
예제 #2
0
        /// <summary>
        /// Finds class by primary key
        /// </summary>
        public SliderImage Find(int imageId)
        {
            SliderImage           result = null;
            SliderImagePrimaryKey key    = new SliderImagePrimaryKey();

            key.ImageId = imageId;

            if (m_Items.ContainsKey(key))
            {
                result = m_Items[key];
            }
            return(result);
        }
예제 #3
0
        /// <summary>
        /// Finds class by primary key
        /// </summary>
        public SliderImage Find(int imageId)
        {
            SliderImage           result = null;
            SliderImagePrimaryKey key    = new SliderImagePrimaryKey();

            key.ImageId = imageId;


            // Loop through our list until we find the match
            foreach (SliderImage item in m_Items)
            {
                if (item.PrimaryKey.CompareTo(key) == 0)
                {
                    result = item;
                    break;
                }
            }

            return(result);
        }
예제 #4
0
        /// <summary>
        /// Removes class from list by primary key values
        /// </summary>
        public bool Remove(int imageId)
        {
            bool result = false;
            SliderImagePrimaryKey key = new SliderImagePrimaryKey();

            key.ImageId = imageId;


            // Loop through our list until we find the match
            for (int i = 0; i < m_Items.Count; i++)
            {
                if (m_Items[i].PrimaryKey.CompareTo(key) == 0)
                {
                    m_Items.RemoveAt(i);
                    result = true;
                    break;
                }
            }

            return(result);
        }