Fixato Errore AdminSession
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user