示例#1
0
        /// <summary>
        /// Creates a cycle inside release
        /// <Para/>returns TDAPIOLELib.Cycle Object
        /// </summary>
        /// <param name="cycleName">Name of Cycle</param>
        /// <param name="startDate">Cycle Start Date</param>
        /// <param name="endDate">Cycle End Date</param>
        /// <param name="release">Release under which Cycle Should be created</param>
        /// <param name="post">Post this Cycle</param>
        /// <returns>TDAPIOLELib.Cycle Object</returns>
        public TDAPIOLELib.Cycle Create(String cycleName, DateTime startDate, DateTime endDate, TDAPIOLELib.Release release, Boolean post = true)
        {
            TDAPIOLELib.CycleFactory cycleFactory = release.CycleFactory;
            TDAPIOLELib.Cycle        cycle        = cycleFactory.AddItem(System.DBNull.Value);

            cycle.Name      = cycleName;
            cycle.EndDate   = endDate;
            cycle.StartDate = startDate;

            if (post)
            {
                cycle.Post();
            }

            return(cycle);
        }
示例#2
0
 /// <summary>
 /// Delete Cycle
 /// <para/> True if successfull
 /// </summary>
 /// <param name="cycle">TDAPIOLELib.Cycle Object</param>
 /// <returns>True if successfull</returns>
 public Boolean Delete(TDAPIOLELib.Cycle cycle)
 {
     TDAPIOLELib.CycleFactory cycleFactory = tDConnection.CycleFactory;
     cycleFactory.RemoveItem(cycle.ID);
     return(true);
 }