Ejemplo n.º 1
0
 // Add Button Click
 private void customerAddButton_Click(object sender, EventArgs e)
 {
     // open add customer form
     DataInterface.DBClose();
     addCustomer = new AddCustomerForm();
     AddCustomerForm.customerForm = this;
     addCustomer.Show();
 }
Ejemplo n.º 2
0
        // Selected Customer changes
        private void appointmentCustomerComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Check if ComboBox has text and set color accordingly
            AddCustomerForm.checkTextChanged(appointmentCustomerComboBox);
            // create DataRowView of selected row
            DataRowView drv = (DataRowView)appointmentCustomerComboBox.SelectedItem;

            // Set customer ID to ID stored in DataRow
            selectedCustomerID = Convert.ToInt32(drv[0]);
        }
Ejemplo n.º 3
0
        // Index Changed on ComboBox
        private void appointmentCustomerComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            // Check if background color needs to change
            AddCustomerForm.checkTextChanged(appointmentCustomerComboBox);
            // Create a DataRowView to obtain data from selection
            DataRowView drv = (DataRowView)appointmentCustomerComboBox.SelectedItem;

            // Set customerID by ID from selected row
            selectedCustomerID = Convert.ToInt32(drv[0]);
        }
Ejemplo n.º 4
0
 private void appointmentDescriptionTextBox_TextChanged(object sender, EventArgs e)
 {
     AddCustomerForm.checkTextChanged(appointmentTitleTextBox);
 }
Ejemplo n.º 5
0
 private void customerPhoneTextBox_TextChanged(object sender, EventArgs e)
 {
     AddCustomerForm.checkTextChanged(customerPhoneTextBox);
 }