Beispiel #1
0
 public void receiveTime(OrderClass orderObj, Double amountOfCharge)
 {
     orderObj.setReceiveTime(DateTime.Now);
     Console.WriteLine();
     Console.WriteLine("Order ID: {0}, Agency ID: {1}, UnitPrice of Room: {2}, Amount of Room: {3}, Amount of Charge: {4}, Start Time: {5}, Completed Time: {6}, Time to process the order: {7}", orderObj.getOrderId(), orderObj.getSenderId() + 1, orderObj.getUnitPrice().ToString("f0"), orderObj.getAmt(), amountOfCharge.ToString("f0"), orderObj.getSenderTime(), orderObj.getReceiveTime(), (orderObj.getReceiveTime() - orderObj.getSenderTime()));
     pricecutLockCounter++;
     if (pricecutLockCounter == 10)
     {
         pricecutLock.Event.Set();
         pricecutLockCounter = 0;
         //            Console.WriteLine("Order ID: {0}, Agency ID: {1}, Unit Price: {3}, Amount of Room: {2}, Amount of Charge: {4}, Start Time: {5}, Completed Time: {6}, Time to process the order: {7}", orderObj.getOrderId(), orderObj.getSenderId() + 1, orderObj.getAmt(), roomPrice.price, amountOfCharge, orderObj.getSenderTime(), orderObj.getReceiveTime(), (orderObj.getReceiveTime() - orderObj.getSenderTime()));
         //            if (orderObj.getPriceCutId()<10)
         //                Console.WriteLine("No.{8} Price-cut, Order ID: {0}, Agency ID: {1}, Unit Price: {3}, Amount of Room: {2}, Amount of Charge: {4}, Start Time: {5}, Completed Time: {6}, Time to process the order: {7}", orderObj.getOrderId(), orderObj.getSenderId() + 1, orderObj.getAmt(), roomPrice.price, amountOfCharge, orderObj.getSenderTime(), orderObj.getReceiveTime(), (orderObj.getReceiveTime() - orderObj.getSenderTime()), orderObj.getPriceCutId() + 1);
     }
 }