private void LogOnMenu() { string login = ""; string password = ""; string message = ""; Console.Write("Enter Login: "******"Enter Password: "); password = Console.ReadLine(); ServiceUser susr = new ServiceUser(); user = susr.LogOn(login, password, out message); if (user != null) { ServiceAccount sa = new ServiceAccount(); user.Accounts = sa.GetAccounts(user.id); AuthoriseUserMenu(); } else { Console.WriteLine(message); Thread.Sleep(1000); MainMenu(); } }
public void CreateAccountMenu() { ServiceAccount sa = new ServiceAccount(); var acc = sa.CreateAccount(user.id, Currency.KZT); string message = " "; bool isCreated = sa.CreateAccountDb(acc, out message); if (isCreated) { Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine(message); Console.ForegroundColor = ConsoleColor.White; user.Accounts = sa.GetAccounts(user.id); Thread.Sleep(3000); AuthoriseUserMenu(); } }