Ejemplo n.º 1
0
        /// <summary>
        /// Finds and removes a conflict based on shift
        /// </summary>
        /// <param name="username">employee to check</param>
        /// <param name="remove">Shift to find in conflicts</param>
        public void RemoveConflict(string username, Shift remove)
        {
            // maximum number of times to loop
            int maxLoop = this._conflicts[username].Count;

            // search through all conflicts for this user
            for (int x = 0; x < maxLoop; x++)
            {
                // get target conflict
                Conflict target = this._conflicts[username][x];

                // if this conflict contains this shift
                if (target.Contains(remove))
                {
                    // remove it
                    this.RemoveConflict(username, target);

                    // modify loop values
                    maxLoop--;
                    x--;
                }
            }
        }
Ejemplo n.º 2
0
 public void RemoveConflict(string username, Conflict remove)
 {
     this._conflicts[username].Remove(remove);
 }