public void Start() { Customer newCustomer = new Customer(); Console.WriteLine("--------------"); Console.WriteLine(" SIGNUP"); Console.WriteLine("--------------"); Console.Write("Name: "); newCustomer.Name = Console.ReadLine(); Console.Write("Email: "); newCustomer.Email = Console.ReadLine(); Console.Write("Password: "******"User Already Exists.."); } }
public void Start() { string email = ""; string passWord = ""; int location; Console.WriteLine("---------------------"); Console.WriteLine(" LOGIN"); Console.WriteLine("---------------------"); Console.Write("Email: "); email = Console.ReadLine(); Console.Write("Password: "******"Select Location [1]BetterBatsOne [2]BetterBatsTwo: "); location = int.Parse(Console.ReadLine()); }while (location != 1 && location != 2); Location choosenLocation = new Location(); Customer signedInCustomer = new Customer(); choosenLocation = locationActions.GetLocationById(location); signedInCustomer = customerActions.GetCustomerByEmail(email); try { if (managerActions.ManagerExists(email, passWord)) { IMenu managerMainMenu = new ManagerMainMenu(context, managerRepoActions, locationRepoActions, inventoryRepoActions, orderRepoActions, baseballBatRepoActions, choosenLocation); managerMainMenu.Start(); Log.Information("Manager Logged In"); } else if (customerActions.CustomerExists(email, passWord)) { IMenu customerMainMenu = new CustomerMainMenu(context, customerRepoActions, locationRepoActions, orderRepoActions, inventoryRepoActions, baseballBatRepoActions, signedInCustomer, choosenLocation); customerMainMenu.Start(); Log.Information("Customer Logged In"); } } catch (Exception e) { Console.WriteLine("Error: " + e.Message); } }