コード例 #1
0
 public Access.Stories FilterByIterationTimePeriod(IterationTimePeriod IterationTimePeriod)
 {
     Access.Stories tmp = this.SelectByIterationTimePeriod(IterationTimePeriod);
     this.Clear();
     this.AddRange(tmp);
     return(this);
 }
コード例 #2
0
        public Int32 CompareTo(IterationTimePeriod 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(IterationTimePeriod) == obj.GetType())
     {
         IterationTimePeriod xT = null;
         xT = (Access.IterationTimePeriod)obj;
         return(xT.IterationTimePeriodID.Equals(this.IterationTimePeriodID));
     }
     else
     {
         return(base.Equals(obj));
     }
 }
コード例 #4
0
        public void addNewIterationTimePeriods()
        {
            Access.IterationTimePeriod aITP = this.IterationTimePeriods.getNewestTimePeriod();
            DateTime fiveWeekAhead          = DateTime.Now.AddDays(35);

            if (fiveWeekAhead >= aITP.IterationTimePeriodEndDate)
            {
                Access.IterationTimePeriod newITP = new IterationTimePeriod();
                newITP.IterationTimePeriodStartDate = aITP.IterationTimePeriodEndDate.AddDays(1);
                if (this.DefaultIterationTimePeriod.HasValue)
                {
                    newITP.IterationTimePeriodEndDate = newITP.IterationTimePeriodStartDate.AddDays(((double)this.DefaultIterationTimePeriod) * 7);
                }
                else
                {
                    newITP.IterationTimePeriodEndDate = newITP.IterationTimePeriodStartDate.AddDays(7);
                }

                newITP.Insert();
            }
        }
コード例 #5
0
 public Access.Stories SelectByIterationTimePeriod(IterationTimePeriod IterationTimePeriod)
 {
     return(new Stories(this.Where(f => f.IterationTimePeriodID != null).Where(f => f.IterationTimePeriodID.IterationTimePeriodID == IterationTimePeriod.IterationTimePeriodID)));
 }