Пример #1
0
 public Access.Stories FilterByStoryType(StoryType StoryType)
 {
     Access.Stories tmp = this.SelectByStoryType(StoryType);
     this.Clear();
     this.AddRange(tmp);
     return(this);
 }
Пример #2
0
        public Int32 CompareTo(StoryType other, System.ComponentModel.PropertyDescriptor Prop)
        {
            Object propertyX;
            Object propertyY;

            if (Prop != null)
            {
                propertyX = Prop.GetValue(this);
                propertyY = Prop.GetValue(other);
                if (propertyX != null && propertyY != null)
                {
                    if (propertyX.Equals(propertyY))
                    {
                        return(1);
                    }
                    else
                    {
                        return(0);
                    }
                }
                else
                {
                    return(0);
                }
            }
            else
            {
                return(0);
            }
        }
Пример #3
0
 public override bool Equals(object obj)
 {
     if (typeof(StoryType) == obj.GetType())
     {
         StoryType xT = null;
         xT = (Access.StoryType)obj;
         return(xT.StoryTypeID.Equals(this.StoryTypeID));
     }
     else
     {
         return(base.Equals(obj));
     }
 }
Пример #4
0
 public Access.Stories SelectByStoryType(StoryType StoryType)
 {
     return(new Stories(this.Where(f => f.StoryTypeID.StoryTypeID == StoryType.StoryTypeID)));
 }