Esempio n. 1
0
        public void Init(C_Input Cmodel, R_Station_Input Rmodel)
        {
            BaseModel   = Cmodel;
            RecordModel = Rmodel;
            OleExec SFCDB = Station.SFCDB;

            try
            {
                //調用處理邏輯
                T_c_station_action      TCSA          = new T_c_station_action(SFCDB, DB_TYPE_ENUM.Oracle);
                T_R_Input_Action        TRIA          = new T_R_Input_Action(SFCDB, DB_TYPE_ENUM.Oracle);
                T_R_Station_Action      TRSA          = new T_R_Station_Action(SFCDB, DB_TYPE_ENUM.Oracle);
                T_R_Station_Input       TRSI          = new T_R_Station_Input(SFCDB, DB_TYPE_ENUM.Oracle);
                T_R_Station_Action_Para TRSAP         = new T_R_Station_Action_Para(SFCDB, DB_TYPE_ENUM.Oracle);
                List <R_Input_Action>   _InputActions = TRIA.GetActionByInputID(InputID, SFCDB);
                //_InputActions.Sort();
                _InputActions.OrderBy(r => r.SEQ_NO);
                for (int i = 0; i < _InputActions.Count; i++)
                {
                    StationAction Action = new StationAction(_InputActions[i], this);
                    InputActions.Add(Action);
                }

                List <R_Station_Action> _StationActions = TRSA.GetActionByInputID(RecordModel.ID, SFCDB);
                for (int i = 0; i < _StationActions.Count; i++)
                {
                    StationAction Action = new StationAction(_StationActions[i], this);
                    InputActions.Add(Action);
                }
            }
            catch (Exception ee)
            {
                throw ee;
            }
        }
Esempio n. 2
0
 bool CheckRun(List <StationAction> actions, int j, string ActionID)
 {
     if (j == RunActionSEQ.Length - 1)
     {
         return(true);
     }
     for (int i = j + 1; i < RunActionSEQ.Length; i++)
     {
         StationAction A = actions.Find(t => t.AddFlag == 0 && t.CActionID == ActionID);
         if (A != null)
         {
             return(false);
         }
     }
     return(true);
 }