public void Reload(MESDBHelper.OleExec SFCDB, MESDataObject.DB_TYPE_ENUM _DBType) { try { DBType = _DBType; T_R_PANEL_SN TRWB = new T_R_PANEL_SN(SFCDB, DBType); RPanelList = TRWB.GetPanel(this.PanelNo, SFCDB); foreach (R_PANEL_SN item in RPanelList) { this.PanelCollection.Add(item); } } catch (Exception e) { throw e; } }
/// <summary> /// 從輸入加載Panel /// </summary> /// <param name="Station"></param> /// <param name="Input"></param> /// <param name="Paras">1個參數,Panel的保存位置</param> public static void PanelFromInputDataloader(MESStation.BaseClass.MESStationBase Station, MESStation.BaseClass.MESStationInput Input, List <MESDataObject.Module.R_Station_Action_Para> Paras) { if (Paras.Count != 1) { throw new Exception(MESReturnMessage.GetMESReturnMessage("MES00000050")); } string strPanel = Input.Value.ToString().Trim().ToUpper(); MESStationSession PanelSession = Station.StationSession.Find(t => t.MESDataType == Paras[0].SESSION_TYPE && t.SessionKey == Paras[0].SESSION_KEY); if (PanelSession == null) { PanelSession = new MESStationSession() { MESDataType = Paras[0].SESSION_TYPE, InputValue = Input.Value.ToString(), SessionKey = Paras[0].SESSION_KEY, ResetInput = Input }; Station.StationSession.Add(PanelSession); } else //add by LLF 2018-02-06 { PanelSession.InputValue = strPanel; PanelSession.ResetInput = Input; } MESDBHelper.OleExec SFCDB = Station.SFCDB; MESDataObject.Module.T_R_PANEL_SN TRPS = new T_R_PANEL_SN(SFCDB, MESDataObject.DB_TYPE_ENUM.Oracle); List <R_PANEL_SN> PanelSNs = TRPS.GetPanel(strPanel, SFCDB); if (PanelSNs.Count == 0) { string errMsg = MESReturnMessage.GetMESReturnMessage("MES00000038", new string[] { strPanel }); throw new MESReturnMessage(errMsg); } Panel panel = new Panel(strPanel, SFCDB, DB_TYPE_ENUM.Oracle); PanelSession.Value = panel; }