public List <string> OpenLines() { List <string> lines = new List <string>(); foreach (var source in ChildrenLogic.Where(l => !l.IsFull())) { lines.Add(source.CoatingLine); } return(lines); }
public override void PushUpChildren(ICoatingScheduleLogic upChild) { if (upChild.GetType() == typeof(CoatingScheduleProduct)) { var shifts = ChildrenLogic.Where(x => x.CoatingLine == ((CoatingScheduleProduct)upChild).CoatingLine); foreach (var shift in shifts) { shift.PushUpChildren(upChild); } } }
public double UnitsConsumed(ProductMasterItem item) { double consumed = 0; foreach (var coatingScheduleLogic in ChildrenLogic.Where(l => l is CoatingScheduleProduct)) { var product = ((CoatingScheduleProduct)coatingScheduleLogic); var config = product.Config; consumed += config.GetUnitsConsumed(item, product.Units, product.MasterID); } return(consumed); }
public double UnitsProduced(ProductMasterItem item) { double produced = 0; foreach (var coatingScheduleLogic in ChildrenLogic.Where(l => l is CoatingScheduleProduct)) { var product = ((CoatingScheduleProduct)coatingScheduleLogic); if (product.MasterID == item.MasterID) { double temp = 0; Double.TryParse(product.Units, out temp); produced += temp; } } return(produced); }