/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package Controllers.Client;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.StackPane;


public class AjouterClientController implements Initializable {
    
    @FXML private AnchorPane AnchorPaneCltBody ;
    @FXML public StackPane typecompte ;
    
    @Override
    public void initialize(URL url, ResourceBundle rb) {
        try {
            //AnchorPaneCltBody.getChildren().clear();
            AnchorPaneCltBody.getChildren().add((Node) FXMLLoader.load(getClass().getResource("/Views/Client/AjouterClientPersonne.fxml")));
        } catch (IOException ex) {
            Logger.getLogger(AjouterClientController.class.getName()).log(Level.SEVERE, null, ex);
        }
               
    }

    @FXML
    public void AjouterClientEntrepriseRadioAction(ActionEvent event) throws IOException {
        AnchorPaneCltBody.getChildren().clear();
        AnchorPaneCltBody.getChildren().add((Node) FXMLLoader.load(getClass().getResource("/Views/Client/AjouterClientEntreprise.fxml")));
    }
    
    @FXML
    public void AjouterClientPersonneRadioAction(ActionEvent event) throws IOException {
        AnchorPaneCltBody.getChildren().clear();
        AnchorPaneCltBody.getChildren().add((Node) FXMLLoader.load(getClass().getResource("/Views/Client/AjouterClientPersonne.fxml")));
    }
    
    public void delete(){
        typecompte.getChildren().clear();
       // System.out.println("dfgsdf");
    }
}
