コード例 #1
0
 private void displayTransactionHistory(Customer activeCustomer)
 {
     List<Transaction> transactionHistory = activeCustomer.TransactionHistory;
     foreach (Transaction trans in transactionHistory)
     {
         uiHelper.AddCustomerTransaction(trans);
     }
 }
コード例 #2
0
        public CustomerList(int numCustomers, decimal initialAmount, UIHelper uiHelper)
        {
            this.uiHelper = uiHelper;

            lock (customerListLock)
            {
                Customer tempCust;
                customerList = new List<Customer>();

                for (int i = 0; i < numCustomers; i++)
                {
                    tempCust = new Customer("cust" + i, initialAmount);

                    customerList.Add(tempCust);
                    //uiHelper.GeneralMessage("Added customer cust" + i+" to customerList="+customerList.ToString());
                }
            }
        }
コード例 #3
0
 public void SetCustomer(Customer customer)
 {
     lock (customerListLock)
     {
         int listCount = customerList.Count;
         //uiHelper.GeneralMessage("Customer being returned to the available list!  count="+listCount);
         customerList.Add(customer);
         listCount = customerList.Count;
         //uiHelper.GeneralMessage("Customer has been returned to the available list!  count=" + listCount);
     }
 }