public ActionResult ScanFinished(string billNo) { try { var outboundService = new OutboundService(); string message; bool flag = outboundService.ScanFinished(billNo, out message); if (!flag) { return(Content(new JsonMessage { Success = false, Code = "-1", Message = message }.ToString())); } return(Content(new JsonMessage { Success = true, Code = "1", Message = message }.ToString())); } catch (Exception ex) { return(Content(new JsonMessage { Success = false, Code = "-1", Message = "操作失败:" + ex.Message }.ToString())); } }
void InitQueueListener() { log.Info("Starting outbound service..."); outboundService = new OutboundService(ListenQueue, DestinationUri); outboundService.Start(); }