Fixato Errore AdminSession

This commit is contained in:
Simone Argenziano
2013-12-18 18:52:56 +01:00
parent 0688474c0d
commit 361d1bd8f4
2 changed files with 4 additions and 4 deletions

View File

@@ -24,7 +24,7 @@ public class AdminSession {
* @throws ClassNotFoundException * @throws ClassNotFoundException
* @throws FileNotFoundException * @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("------------ Admin Menu ------------");
System.out.println("1 --> Nuovo Prodotto"); //Inserisce un nuovo prodotto in vendita nel catalogo 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 System.out.println("2 --> Cancella Prodotto"); //Cancella un prodotto in offerta nel catalogo
@@ -52,10 +52,10 @@ public class AdminSession {
catalogo.cancellaProdotto(); catalogo.cancellaProdotto();
break; break;
case "3": case "3":
catalogo.offerteAttive(); catalogo.offerteAttive(username);
break; break;
case "4": case "4":
catalogo.offerteScadute(); catalogo.offerteScadute(username);
break; break;
case "5": case "5":
r.reshow = false; r.reshow = false;

View File

@@ -69,7 +69,7 @@ public class Catalogo{
public void showMenu(String userType,String username, ReShow r) throws FileNotFoundException, ClassNotFoundException, ParseException, IOException public void showMenu(String userType,String username, ReShow r) throws FileNotFoundException, ClassNotFoundException, ParseException, IOException
{ {
if(userType.equals("Admin")) if(userType.equals("Admin"))
AdminSession.showAdminMenu(this,r); AdminSession.showAdminMenu(this,r, username);
else else
ClientSession.showClientMenu(this,r, username); ClientSession.showClientMenu(this,r, username);
} }