private void InBillThread(PrinterBillOrder.PrinterBillOrderType type,int banHangID)
 {
     lock (mXuliMayIn)
     {
         var list = mXuliMayIn.AllPrintingBill().ToList();
         foreach (var item in list)
         {
             PrinterBillOrder mayInHoaDon = new PrinterBillOrder(type, banHangID, item, mXuliMayIn);
             mayInHoaDon.Print();
         }
     }
 }
 private void InBillThread(PrinterBillOrder.PrinterBillOrderType type, int banHangID)
 {
     lock (mXuliMayIn)
     {
         var list = mXuliMayIn.AllPrintingBill().ToList();
         foreach (var item in list)
         {
             PrinterBillOrder mayInHoaDon = new PrinterBillOrder(type, banHangID, item, mXuliMayIn);
             mayInHoaDon.Print();
         }
     }
 }
 public void InBill(PrinterBillOrder.PrinterBillOrderType type, int banHangID)
 {
     System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ThreadStart(delegate { InBillThread(type,banHangID); }));
     thread.Start();
 }