Ejemplo n.º 1
0
  public void AddCustomer() {
    Customer customer =
        new Customer(
            txtUsername.getText(),
            txtPassword.getText(),
            txtFirstName.getText(),
            txtLastName.getText(),
            txtEmail.getText(),
            txtPhone.getText(),
            txtStreet1.getText(),
            txtStreet2.getText(),
            txtCity.getText(),
            txtState.getText(),
            txtZipcode.getText(),
            txtCountry.getText());
    customer.setIsActive(chkActive.isSelected());

    customer.setID(CustomerID);
    if (CustomerBL.UpdateCustomer(GetPU(), customer)) {
      JOptionPane.showMessageDialog(null, "Customer updated successfully.");
      com.omazan.Mobile.GUI.frmMain.ApplicationForm.ShowListCustomerDialog();
    } else {
      JOptionPane.showMessageDialog(null, "Could not update customer.");
    }
  }
Ejemplo n.º 2
0
 public void ClearData() {
   com.omazan.Mobile.GUI.frmMain.ApplicationForm.ShowListCustomerDialog();
 }