content: /*
   * 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 view;
  
  //import view.user.*;
  import java.io.IOException;
  import java.net.URL;
  import java.util.ResourceBundle;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  import classes.SessionManager;
  import javafx.event.ActionEvent;
  import javafx.fxml.FXML;
  import javafx.fxml.FXMLLoader;
  import javafx.fxml.Initializable;
  import javafx.scene.Node;
  import javafx.scene.Parent;
  import javafx.scene.Scene;
  import javafx.scene.control.Button;
  import javafx.stage.Stage;
  
  /**
   * FXML Controller class
   *
   * @author ANIS
   */
  public class AllAdminController implements Initializable {
       @FXML
      private Button User_btn;
      @FXML
      private Button produit_btn;
      @FXML
      private Button evenement_btn;
      @FXML
      private Button activité_btn;
      @FXML
      private Button Reclamation_btn;
      @FXML
      private Button dc_btn;
      @FXML
      private Button Channel_btn;
  
      /**
       * Initializes the controller class.
       */
      @Override
      public void initialize(URL url, ResourceBundle rb) {
          // TODO
      }    
      
        @FXML
      private void go_produits(ActionEvent event) {
          try {
      Parent root = FXMLLoader.load(getClass().getResource("Homeproduit.fxml"));
      Scene scene = new Scene(root);
      Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
      stage.setScene(scene);
      stage.show();} catch (IOException ex) {
              Logger.getLogger(InscriptionUserController.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
  
       @FXML
      private void go_evenements(ActionEvent event) {
      
           try {
      Parent root = FXMLLoader.load(getClass().getResource("ajouterevenement.fxml"));
      Scene scene = new Scene(root);
      Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
      stage.setScene(scene);
      stage.show();} catch (IOException ex) {
              Logger.getLogger(InscriptionUserController.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
    
       @FXML
      private void go_activités(ActionEvent event) {
      
         try {
      Parent root = FXMLLoader.load(getClass().getResource("activité.fxml"));
      Scene scene = new Scene(root);
      Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
      stage.setScene(scene);
      stage.show();} catch (IOException ex) {
              Logger.getLogger(InscriptionUserController.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
     
      @FXML
      private void Go_Reclamations(ActionEvent event) {
          try {
      Parent root = FXMLLoader.load(getClass().getResource("Home_rec.fxml"));
      Scene scene = new Scene(root);
      Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
      stage.setScene(scene);
      stage.show();} catch (IOException ex) {
              Logger.getLogger(InscriptionUserController.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
   
       @FXML
      private void go_channel(ActionEvent event) {
          //showContent("InscriptionUserController.fxml");
           try {
      Parent root = FXMLLoader.load(getClass().getResource("Acceuil.fxml"));
      Scene scene = new Scene(root);
      Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
      stage.setScene(scene);
      stage.show();} catch (IOException ex) {
              Logger.getLogger(InscriptionUserController.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
          @FXML
      private void go_User(ActionEvent event) {
      
                  try {
      Parent root = FXMLLoader.load(getClass().getResource("GestionAdmin.fxml"));
      Scene scene = new Scene(root);
      Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
      stage.setScene(scene);
      stage.show();} catch (IOException ex) {
              Logger.getLogger(InscriptionUserController.class.getName()).log(Level.SEVERE, null, ex);
          }
                 
      }
       @FXML
      private void Se_deconnecter(ActionEvent event) {
           SessionManager.getInstance().setCurrentUser(null);
           try {
  
              Parent page1 = FXMLLoader.load(getClass().getResource("connexionUser.fxml"));
  
              Scene scene = new Scene(page1);
  
              Stage stage = (Stage) ((Node) event.getSource()).getScene().getWindow();
   
              stage.setScene(scene);
  
              stage.show();
  
          } catch (IOException ex) {
  
             System.out.println(ex.getMessage());
  
          }
      }
      
  }
  