Ejemplo n.º 1
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");
            }
        }
Ejemplo n.º 2
0
        public static void UpdateRole()
        {
            Dictionary <string, string> DBDictionary = new Dictionary <string, string>();

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

            if (UserExist == true)
            {
                Console.Clear();
                string role = ApplicationsMenus.RoleMenu();
                DBDictionary.Add("username", username);
                DBDictionary.Add("newRole", role);
                da.ProcedureDatabase(DBDictionary, "Update_Users_By_Role");
            }
            else
            {
                HelpMethods.UserDoesNotExistMessage();
            }
        }