private static PandaPacket getVerifyLabelResponse(string clientID, PandaPacket request) { //Verify the requested carton PandaPacket response = null; try { //Find the carton string cartonID = request.MessageBody.Substring(0, PandaPacket.CartonIDLength).TrimEnd(); string verifyCode = request.MessageBody.Substring(PandaPacket.CartonIDLength, 1).TrimEnd(); string verifyFlag = CartonMgr.ProcessVerifyLabelRequest(cartonID, verifyCode); response = PandaPacket.Encode(clientID, RESPONSE_VERIFYLABEL, request, 0, 1, verifyFlag); } catch (Exception ex) { AppTrace.Instance().TheTrace.WriteLine(new TraceMessage("An error occurred while processing request to verify label." + ex.ToString(), AppLib.EVENTLOGNAME, LogLevel.Error, "PacketMgr")); response = PandaPacket.Encode(clientID, RESPONSE_VERIFYLABEL, request, 0, 1, "N"); } return(response); }