internal ProductionLeg(ProductionShift shift, DateTime productionStart, long counterStart) { if (counterStart < 0) throw new ArgumentException("The value cannot be negative", "counterStart"); this.shift = shift; this.productionStopRegistrationList = new List<ProductionStopRegistration>(); this.productionStart = productionStart; this.productionEnd = productionStart; this.counterStart = counterStart; this.counterEnd = counterStart; this.discardedItems = 0; }
public virtual void RemoveProductionShift(ProductionShift shift) { shiftList.Remove(shift); }
public virtual ProductionShift AddProductionShift(ProductionTeam team, DateTime date) { foreach (ProductionShift shift in shiftList) { if (shift.Date.Equals(date.Date) && shift.Team.Equals(team)) return shift; } ProductionShift result = new ProductionShift(this, team, date); shiftList.Add(result); return result; }