private const int hashSize = 20; // Number of bytes of the hash (the output) public static void InitializeLoginSystem() { using (SqliteConnection db = new SqliteConnection($"Filename={dbpath}")) { db.Open(); String tableCommand = "CREATE TABLE IF NOT " + "EXISTS UserLogin (Username nvarchar(100) PRIMARY KEY, " + "Salt NVARCHAR(1000) NOT NULL, " + "Password_Encrypt NVARCHAR(1000) NOT NULL, " + "Name NVARCHAR(100) NOT NULL);"; SqliteCommand createTable = new SqliteCommand(tableCommand, db); createTable.ExecuteReader(); if (hasRows() == false) { EmployeeRegister adminRegis = new EmployeeRegister("admin"); adminRegis.Show(); } } }
private void btnAdmin_Click(object sender, RoutedEventArgs e) { EmployeeRegister employeeRegister = new EmployeeRegister(); employeeRegister.Show(); }