public static string tryGetVirturePortID(BLL.PortStationBLL portStationBLL, BLL.EqptBLL eqptBLL, string dest) { APORTSTATION port_station = portStationBLL.OperateCatch.getPortStation(dest); if (port_station == null) { return(dest); } var eqpt = port_station.GetEqpt(eqptBLL); if (eqpt is AGVStation) { var agv_station = eqpt as AGVStation; var virtrue_port = agv_station.getAGVVirtruePort(); if (agv_station.IsVirtrueUse) { return(SCUtility.Trim(virtrue_port.PORT_ID, true)); } else { return(dest); } } else { return(dest); } }