Beispiel #1
0
        public static RouteStationConfiguration GetConfigurationFor(RouteStation station, Part part)
        {
            ICollection <RouteStationConfiguration> configurations;
            BinaryOperator op1 = new BinaryOperator("Part", part);
            BinaryOperator op2 = new BinaryOperator("Station", station);

            ContainsOperator containsOperator = new ContainsOperator("Config.ConfigurationParts", op1);
            GroupOperator    groupOperator    = new GroupOperator(op2, containsOperator);

            configurations =
                Repository
                .GetList <RouteStationConfiguration>(part.Session)
                .ByCriteria(groupOperator);

            if (configurations.Count == 0)
            {
                return(null);
            }

            foreach (RouteStationConfiguration config in configurations)
            {
                if (config != null)
                {
                    return(config);
                }
            }

            return(null);
        }
Beispiel #2
0
 public void SetFirstStation(RouteStation station)
 {
     foreach (RouteStation routeStation in Stations)
     {
         routeStation.IsFirstStation = false;
     }
     station.IsFirstStation = true;
 }
Beispiel #3
0
        public RouteStationProcess CreateRouteStationProcess(RouteStation station, InventoryItem item)
        {
            RouteStationProcess process = Scout.Core.Data.CreateEntity <RouteStationProcess>(item.Session);

            process.Station          = station;
            process.Item             = item;
            item.CurrentProcess      = process;
            process.ShopfloorProgram = item.ShopfloorProgram;
            return(process);
        }
Beispiel #4
0
        public override bool Equals(object obj)
        {
            RouteStation station = obj as RouteStation;

            if (station == null)
            {
                return(false);
            }

            return(station.Station.Id == m_station.Id);
        }
Beispiel #5
0
        public bool IsTransitionStation(RouteStation station)
        {
            foreach (RouteStation routeStation in Stations)
            {
                foreach (StationOutcomeTransition transition in routeStation.OutcomeTransitions)
                {
                    RouteStation nextStation = transition.NextStation;
                    if (nextStation != null)
                    {
                        if (nextStation.Equals(station))
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
Beispiel #6
0
 public RouteStationConfiguration GetConfigurationFor(RouteStation station, Part part)
 {
     return(RoutingRepository.GetConfigurationFor(station, part));
 }
Beispiel #7
0
        public static ICollection <StationMaterialsTask> GetStationMaterialTasks(IUnitOfWork uow, RouteStation station)
        {
            BinaryOperator op1 = new BinaryOperator("RouteStation", station);

            return(Repository
                   .GetList <StationMaterialsTask>(uow)
                   .ByCriteria(op1));
        }