private static bool IsNeedActive(string name, InboudRunType runType) { if (name == null) { return(false); } //共同使用的List //공통 사용 List List <string> commonList = new List <string>(new string[] { "ShiftTime", "IF_LOTHISTORY", "IF_MACHINE", "IF_OWNER_MAP", "IF_CT_FACILITYRESULTHISTORY", "RTS_EQP", "RTS_EQP_IN_OUT_ACT_IF", "RSL_RTS_EQP_IN_OUT_ACT_IF", "RTS_EQP_LAST_IN_ACT_IF", "RSL_RTS_EQP_LAST_IN_ACT_IF", "RTS_EQP_STATUS_IF", "RSL_RTS_EQP_STATUS_IF", "RTS_LOTHISTORY_IF", "RSL_RTS_LOTHISTORY_IF" }); if (commonList.Contains(name)) { return(true); } //INBOUND_IF 전용 List List <string> inboundOnlyList = new List <string>(new string[] { "" }); if (inboundOnlyList.Contains(name)) { return(runType == InboudRunType.INBOUND_IF); } else { return(runType != InboudRunType.INBOUND_IF); } }
private static void SetActiveAction(IDataLayer dataLayer, InboudRunType runType) { if (dataLayer == null) { return; } string[] names = dataLayer.GetItemList(); if (names == null) { return; } foreach (var name in names) { var item = dataLayer.GetItem(name); if (item == null) { continue; } //clear ActiveAction item.ActiveAction = null; if (IsNeedActive(name, runType)) { foreach (var dataAction in item.Actions) { item.SetActiveAction(dataAction.Name); } } else { item.ActiveAction = null; } } }
/// <summary> /// Input Table的数据DataAtion激活 /// Input Table의 DataAtion 활성화 /// 默认在所有Table有做Deactivation (item.ActiveAction = null) /// Default 로 모든 테이블이 Deactivation 되어 있음. (item.ActiveAction = null) /// 只有设置item.ActiveAction才能执行query /// item.ActiveAction을 설정해줘야 쿼리가 실행됨. /// </summary> public static void SetActiveAction(InboudRunType runType) { SetActiveAction(ModelContext.Current.Inputs, runType); SetActiveAction(ModelContext.Current.Outputs, runType); }