/// <summary>
        /// James Heim
        /// Created: 2019/01/24
        ///
        /// Create a Supplier from data provided via the user input.
        /// </summary>
        /// <remarks>
        /// James Heim
        /// Updated: 2019/01/30
        /// Moved created Supplier to a varible the button handler can access.
        /// </remarks>
        private void CreateSupplier()
        {
            // Load inputs.
            string supplierName     = txtSupplierName.Text.Trim();
            string streetAddress    = txtStreetAddress.Text.Trim();
            string city             = txtCity.Text.Trim();
            string state            = txtState.Text.Trim();
            string zip              = txtZip.Text.Trim();
            string country          = txtCountry.Text.Trim();
            string contactFirstName = txtContactFirstName.Text.Trim();
            string contactLastName  = txtContactLastName.Text.Trim();
            string phoneNumber      = txtPhoneNumber.Text.Trim();
            string email            = txtEmail.Text.Trim();
            string description      = txtDescription.Text.Trim();


            // Check for empty inputs.
            if (supplierName.Length == 0 ||
                streetAddress.Length == 0 ||
                city.Length == 0 ||
                state.Length == 0 ||
                zip.Length == 0 ||
                country.Length == 0 ||
                contactFirstName.Length == 0 ||
                contactLastName.Length == 0 ||
                phoneNumber.Length == 0 ||
                email.Length == 0)
            {
                throw new ApplicationException("Fill out all data.");
            }
            // Phone number validation.
            else if (!Regex.IsMatch(phoneNumber, @"^\(?\d{3}\)?[\s\-]?\d{3}\-?\d{4}$"))
            {
                txtPhoneNumber.Select(0, txtPhoneNumber.Text.Length);
                txtPhoneNumber.Focus();
                throw new ApplicationException("Please enter a valid phone number.");
            }
            // Email validation.
            else if (!Regex.IsMatch(txtEmail.Text, @"^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"))
            {
                txtEmail.Select(0, txtEmail.Text.Length);
                txtEmail.Focus();
                throw new ApplicationException("Enter a valid email.");
            }

            else
            {
                SupplierValidator.ValidateEmail(new Supplier()
                {
                    Email = email
                });
                SupplierValidator.ValidatePhoneNumber(new Supplier()
                {
                    PhoneNumber = phoneNumber
                });

                // Create the Supplier.
                try
                {
                    _newSupplier = new Supplier
                    {
                        Name             = supplierName,
                        Address          = streetAddress,
                        City             = city,
                        State            = state,
                        PostalCode       = zip,
                        Country          = country,
                        ContactFirstName = contactFirstName,
                        ContactLastName  = contactLastName,
                        PhoneNumber      = phoneNumber,
                        Email            = email,
                        Description      = description
                    };
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message + "\n" + ex.InnerException, "Error Creating Supplier");
                }
            }
        }