Package ModelLayer

Examples of ModelLayer.Customer


  public int updateCustomer(String CPR,String firstName, String lastName, String address,int zipcode, String phoneNumber)
  {

    IFDBCustomer dbcustomerObj = new DBCustomer();
    Customer customer = new Customer(CPR);
    IFDBCity dbcityObj=new DBCity();
    City city=new City();
   
    //customer.setCPR(CPR);
    customer.setFirtName(firstName);
    customer.setLastName(lastName);
    customer.setAddress(address);
    city=dbcityObj.findCity(zipcode,false);
    customer.setCity(city);
    customer.setPhoneNumber(phoneNumber);
    return  dbcustomerObj.updateCustomer(customer,CPR);
  }
View Full Code Here


 
  //insert customer
 
  public void insertCustomer(String CPR,String firstName, String lastName, String address,int zipcode, String phoneNumber) throws Exception
    {   
         Customer customerObj = new Customer();
         customerObj.setCPR(CPR);
         customerObj.setFirtName(firstName);    
         customerObj.setLastName(lastName);
         customerObj.setAddress(address);
         customerObj.setCity(new City(zipcode));
         customerObj.setPhoneNumber(phoneNumber);
      

         DBConnection.startTransaction();
         try{
           DBCustomer dbCustomerObj = new DBCustomer();
View Full Code Here

 
 
  public void searchCustomer(ActionEvent eve){
    ControlCustomer ctrCust=new ControlCustomer();
    String cpr=textField.getText();
    Customer cust=ctrCust.findCustomer(cpr);
    textField_1.setText(cust.getFirsTName());
    textField_2.setText(cust.getLastName());
    textField_3.setText(cust.getAddress());
    textField_4.setText(Integer.toString(cust.getCity().getZipCode()));
    textField_5.setText(cust.getCity().getCity());
    textField_6.setText(cust.getPhoneNumber());
   
  }
View Full Code Here

TOP

Related Classes of ModelLayer.Customer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.