Example #1
0
        }//end handler

        private void btnReadCustomers_Click(object sender, EventArgs e)
        {
            customers = Customer.readCustomersFromFile("Customers.txt");

            txtCustomers.Clear();
            foreach (Customer cust in customers)
            {
                txtCustomers.Text += cust.ToString() + "\r\n";
            }
        }
Example #2
0
        public IceCreamShop_Form()
        {
            InitializeComponent();

            this.txtOrderHistory.TabStop = false;
            this.txtOrderInfo.TabStop    = false;
            this.txtCustomers.TabStop    = false;


            customers = Customer.readCustomersFromFile("Customers.txt");
            orders    = new ArrayList();

            //read the order file
            try {
                while (true)
                {
                    Order or = new Order();
                    or.readFromFile(ORDER_FILE, customers);
                    orders.Add(or);
                    //Console.WriteLine(or);
                }
            }
            catch (Exception ex) { }
        }