fixes export being impossible

This commit is contained in:
Blauschleim
2022-05-16 18:48:36 +02:00
parent a46bc0427d
commit 2542dce79f
2 changed files with 3 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ namespace it_projekt
{ {
private static Database _database; private static Database _database;
public List<Person> Persons { get; set; } public List<Person> Persons { get; set; }
private Database(String username, String password) private Database(string username, string password)
{ {
string connectionString = "server=localhost;port=3306;database=stammdaten;User Id=" + username + ";Password=" + password + ";"; string connectionString = "server=localhost;port=3306;database=stammdaten;User Id=" + username + ";Password=" + password + ";";
MySqlConnection connection = new MySqlConnection(connectionString); MySqlConnection connection = new MySqlConnection(connectionString);

View File

@@ -30,7 +30,6 @@ namespace it_projekt
private void loginBtn_Click(object sender, EventArgs e) private void loginBtn_Click(object sender, EventArgs e)
{ {
LoadUsersFromTable(this.userTxt.Text, this.passTxt.Text); LoadUsersFromTable(this.userTxt.Text, this.passTxt.Text);
} }
@@ -47,6 +46,8 @@ namespace it_projekt
{ {
this.dataGrid.Rows.Add(person.Id, person.Firstname, person.Lastname, person.department_short, person.department_long, person.CreationDate, false); this.dataGrid.Rows.Add(person.Id, person.Firstname, person.Lastname, person.department_short, person.department_long, person.CreationDate, false);
} }
this.loginBtn.Enabled = false;
this.exportBtn.Enabled = true;
} }
} }