示例#1
0
        private void btnAddCustomer_Click(object sender, EventArgs e)
        {
            Customer c = new Customer()
            {
                FirstName   = "J",
                LastName    = "Doe",
                DateOfBirth = DateTime.Now,
                Title       = "Prof"
            };

            CustomerDb.AddCustomer(c);
            string text = $"Added {c.CustomerID} : {c.FullName}";

            MessageBox.Show(text);
            PopulateCustomerList();
        }
示例#2
0
        private void btnAddCustomer_Click(object sender, EventArgs e)
        {
            //Hard code customer for testing purposes
            Customer c = new Customer()
            {
                FirstName   = "J",
                LastName    = "Doe",
                DateOfBirth = DateTime.Now,
                Title       = "Prof"
            };

            CustomerDb.AddCustomer(c);

            MessageBox.Show($"Added {c.CustomerID} : {c.FullName}");

            PopulateCustomerList();
        }