diff --git a/it/unisa/info13d/GestioneCatalogo/AdminSession.java b/it/unisa/info13d/GestioneCatalogo/AdminSession.java index a1b714a..1ebc6a6 100644 --- a/it/unisa/info13d/GestioneCatalogo/AdminSession.java +++ b/it/unisa/info13d/GestioneCatalogo/AdminSession.java @@ -24,7 +24,7 @@ public class AdminSession { * @throws ClassNotFoundException * @throws FileNotFoundException */ - public static void showAdminMenu(Catalogo catalogo, ReShow r) throws FileNotFoundException, ClassNotFoundException, ParseException, IOException { + public static void showAdminMenu(Catalogo catalogo, ReShow r, String username) throws FileNotFoundException, ClassNotFoundException, ParseException, IOException { System.out.println("------------ Admin Menu ------------"); System.out.println("1 --> Nuovo Prodotto"); //Inserisce un nuovo prodotto in vendita nel catalogo System.out.println("2 --> Cancella Prodotto"); //Cancella un prodotto in offerta nel catalogo @@ -52,10 +52,10 @@ public class AdminSession { catalogo.cancellaProdotto(); break; case "3": - catalogo.offerteAttive(); + catalogo.offerteAttive(username); break; case "4": - catalogo.offerteScadute(); + catalogo.offerteScadute(username); break; case "5": r.reshow = false; diff --git a/it/unisa/info13d/GestioneCatalogo/Catalogo.java b/it/unisa/info13d/GestioneCatalogo/Catalogo.java index f37a3b3..8cb1f53 100644 --- a/it/unisa/info13d/GestioneCatalogo/Catalogo.java +++ b/it/unisa/info13d/GestioneCatalogo/Catalogo.java @@ -69,7 +69,7 @@ public class Catalogo{ public void showMenu(String userType,String username, ReShow r) throws FileNotFoundException, ClassNotFoundException, ParseException, IOException { if(userType.equals("Admin")) - AdminSession.showAdminMenu(this,r); + AdminSession.showAdminMenu(this,r, username); else ClientSession.showClientMenu(this,r, username); }