public static void SNLinkPassAction_Old(MESPubLab.MESStation.MESStationBase Station, MESPubLab.MESStation.MESStationInput Input, List <R_Station_Action_Para> Paras) { SN SN = null; string ErrMessage = string.Empty; string wo = Station.Inputs.Find(s => s.DisplayName == "WO").Value.ToString(); string sn = Station.Inputs.Find(s => s.DisplayName == "SUB_SN").Value.ToString(); if (Paras.Count == 0) { throw new Exception("參數數量不正確!"); } MESStationSession SNLoadPoint = Station.StationSession.Find(t => t.MESDataType == Paras[0].SESSION_TYPE && t.SessionKey == Paras[0].SESSION_KEY); if (SNLoadPoint == null) { ErrMessage = MESReturnMessage.GetMESReturnMessage("MES00000052", new string[] { Paras[0].SESSION_TYPE + Paras[0].SESSION_KEY }); throw new MESReturnMessage(ErrMessage); } SN = (SN)SNLoadPoint.Value; T_R_SN TRS = new T_R_SN(Station.SFCDB, DB_TYPE_ENUM.Oracle); Row_R_SN RRS = (Row_R_SN)TRS.NewRow(); T_R_SN_STATION_DETAIL tr_sd = new T_R_SN_STATION_DETAIL(Station.SFCDB, DB_TYPE_ENUM.Oracle); Row_R_SN_STATION_DETAIL rr_sd = (Row_R_SN_STATION_DETAIL)tr_sd.NewRow(); RRS = TRS.getR_SNbySN(sn, Station.SFCDB); RRS.CURRENT_STATION = Station.StationName; RRS.NEXT_STATION = TRS.GetNextStation(SN.RouteID, Station.StationName, Station.SFCDB); RRS.VALID_FLAG = "0"; RRS.EDIT_EMP = Station.LoginUser.EMP_NO; RRS.EDIT_TIME = DateTime.Now; if (RRS.NEXT_STATION.ToUpper() == "JOBFINISH") { RRS.COMPLETED_FLAG = "1"; RRS.COMPLETED_TIME = DateTime.Now; } Station.SFCDB.ExecSQL(RRS.GetUpdateString(DB_TYPE_ENUM.Oracle)); TRS.RecordPassStationDetail(sn, Station.Line, Station.StationName, Station.StationName, Station.BU, Station.SFCDB); }