Example #1
0
        public void SaveNewCustomer()
        {
            string customerNumber = LicenseNumTextBox.Text;
            string customerID = customerNumber.Substring(1, 9);
            string firstName = FirstNameTextBox.Text;
            string lastName = LastNameTextBox.Text;
            string middle = MiddleTextBox.Text;
            string address = AddressTextBox.Text;
            string city = CityTextBox.Text;
            string state = StateTextBox.Text;
            string zipCode = ZipCodeTextBox.Text;
            string phoneNumber = PhoneNumTextBox.Text;
            string secondPhoneNumber = SecondaryPhoneTextBox.Text;
            string licenseNumber = LicenseNumTextBox.Text;
            string entryDate = DateTime.Now.ToString("d");
            string accountStatus = "Active";

            DataManager saveCustomer = new DataManager(connectionString);

            saveCustomer.SaveCustomerData(customerID, firstName, lastName, middle, address, city,
                                          state, zipCode, phoneNumber, secondPhoneNumber, licenseNumber,
                                          entryDate, accountStatus);
        }