         
         let successHandler = { (tickets:[QueryLeftNewDTO])->()  in
             self.ticketQueryResult = tickets
+            if self.trainFilterKey != "" {
+                self.filterQueryResult = self.ticketQueryResult.filter({item in return self.trainFilterKey.containsString(item.TrainCode!)})
+            }
+            else {
+                self.filterQueryResult = tickets
+            }
+                
             self.leftTicketTable.reloadData()
             self.loadingTipController.stop()
             

                    self.seatFilterKey = self.trainFilterWindowController.seatFilterKey
                    print(self.trainFilterKey)
                    print(self.seatFilterKey)
                }
            })
        }

    
    func receiveDidSendTrainFilterMessageNotification(note: NSNotification){
        print("receiveDidSendTrainFilterMessageNotification")
        if trainFilterKey == "" {
            trainFilterWindowController = TrainFilterWindowController()
        }
        trainFilterWindowController.trains = ticketQueryResult
        trainFilterWindowController.fromStationName = self.fromStationName!
        trainFilterWindowController.toStationName = self.toStationName!
