private void btnAddNew_Click(object sender, EventArgs e) { CustomerRepository customerRepository = new CustomerRepository(); int result = customerRepository.AddNewDataItem(new Customer() { FirstName = txtFirstName.Text, LastName = txtLastName.Text, EmailAddress = txt_EmailAddress.Text, TelephoneNumber = txt_TelephoneNumber.Text, CreateDate = DateTime.Now }); if (result != 0) { GetCustomerList(); txtFirstName.Text = string.Empty; txtLastName.Text = string.Empty; txt_EmailAddress.Text = string.Empty; txt_TelephoneNumber.Text = string.Empty; } }