Exemple #1
0
        public static void Authorization()
        {
            Console.Clear();
            Console.WriteLine("Выберите действие: \n 1.Войти \n 2.Регистрация");
            switch (Console.ReadLine())
            {
            case "1":
                Console.WriteLine("Введите логин:");
                string Login = Console.ReadLine();
                Console.WriteLine("Введите пароль:");
                string Password = Console.ReadLine();
                userLogic.Authorization(Login, Password);
                ID            = userLogic.FindForLogin(Login);
                authorization = true;
                Check();
                break;

            case "2":
                Console.WriteLine("Введите имя:");
                string Name = Console.ReadLine();
                Console.WriteLine("Введите дату рождения:");
                DateTime DateOfBrith = new DateTime(int.Parse(Console.ReadLine()), int.Parse(Console.ReadLine()), int.Parse(Console.ReadLine()));
                Console.WriteLine("Введите логин:");
                string login = Console.ReadLine();
                checkLogin(ref login);
                Console.WriteLine("Введите пароль:");
                string password = Console.ReadLine();

                userLogic.Add(new User(Name, DateOfBrith, login, password));

                authorization = true;
                break;
            }
        }