Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 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);
         }
     }
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }