예제 #1
0
        public EditCustomerForm(Customer customer, CustomersForm customersForm)
        {
            InitializeComponent();

            this.customersForm = customersForm;
            this.customer      = customer;

            if (customer.firstName != null)
            {
                firstNameTextBox.Text = customer.firstName;
            }
            if (customer.lastName != null)
            {
                lastNameTextBox.Text = customer.lastName;
            }
            if (customer.streetAddress != null)
            {
                addressTextBox.Text = customer.streetAddress;
            }
            if (customer.state != null)
            {
                stateTextBox.Text = customer.state;
            }
            if (customer.zipcode != null)
            {
                zipcodeTextBox.Text = customer.zipcode;
            }
            if (customer.phoneNumber != null)
            {
                phoneNumTextBox.Text = customer.phoneNumber;
            }
        }
예제 #2
0
        //load the customers form
        private void customersButton_Click(object sender, EventArgs e)
        {
            CustomersForm customersForm = new CustomersForm();

            customersForm.Show();
        }