Exemplo n.º 1
0
        public static void UpdateUserName()
        {
            Dictionary <string, string> DBDictionary = new Dictionary <string, string>();

            Console.Write("Type the username you want to update: ");
            DatabasesAccess da       = new DatabasesAccess();
            string          username = Console.ReadLine();
            bool            userNotExist;
            bool            UserExist = HelpMethods.CheckExistUser(username);

            if (UserExist == true)
            {
                Console.Clear();
                Console.Write("Type a new username: "******"username", username);
                    DBDictionary.Add("newUsername", newUsername);
                    da.ProcedureDatabase(DBDictionary, "Update_UserName");
                }
            }
            else
            {
                HelpMethods.UserDoesNotExistMessage();
            }
        }
Exemplo n.º 2
0
        public static void CreateUser()
        {
            Dictionary <string, string> DBDictionary = new Dictionary <string, string>();

            Console.Write("Type the username: "******"@username", username);
                DBDictionary.Add("@pass", password);
                DBDictionary.Add("@role", role);
                da.ProcedureDatabase(DBDictionary, "Insert_Users");
            }
        }