Ejemplo n.º 1
0
        static void SetUserPass()
        {
            Console.WriteLine("---------------------");
            Console.WriteLine("Setting User Password");
            Console.WriteLine("---------------------");
            Console.WriteLine("Please input new User Login:"******"Please input new User Password:"******"{login},{pass}");
            }
            else
            {
                Console.WriteLine("Wrong input, please try it again.");
            }
        }
Ejemplo n.º 2
0
        static void AddUser()
        {
            Console.WriteLine("---------------------");
            Console.WriteLine("Adding new User");
            Console.WriteLine("---------------------");
            Console.WriteLine("Please input new User Login:"******"Please input new User Name and Surname:");
            var name = Console.ReadLine();

            if (!string.IsNullOrEmpty(login) && !string.IsNullOrWhiteSpace(login) &&
                !string.IsNullOrEmpty(name) && !string.IsNullOrWhiteSpace(name))
            {
                UsersUtilities.AddUser(ConnectionString, DbProvider, $"{login},Administrator,{name}");
            }
            else
            {
                Console.WriteLine("Wrong input, please try it again.");
            }
        }