reworked project structure, removed entityframework, add mysqlconnector
This commit is contained in:
9
Form1.cs
9
Form1.cs
@@ -27,16 +27,15 @@ namespace it_projekt
|
||||
|
||||
private void loginBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadUsersFromTable("","");
|
||||
LoadUsersFromTable("root","");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void LoadUsersFromTable(string user, string password)
|
||||
{
|
||||
string connectionString = "server=localhost;database=stammdaten;User Id=" + user + ";Password=" + password + ";";
|
||||
Database test = new Database(connectionString);
|
||||
MessageBox.Show(test.persons.Find(1).Firstname);
|
||||
{
|
||||
Database test = new Database(user, password);
|
||||
MessageBox.Show(test.Person.Firstname);
|
||||
}
|
||||
|
||||
private void dataGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
|
||||
10
Person.cs
10
Person.cs
@@ -8,9 +8,17 @@ namespace it_projekt
|
||||
{
|
||||
class Person
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Lastname { get; set; }
|
||||
public string Firstname { get; set; }
|
||||
public DateTime CreationDate { get; set; }
|
||||
|
||||
public Person(string Id, string Lastname, string Firstname, DateTime CreationDate)
|
||||
{
|
||||
this.Id = Id;
|
||||
this.Lastname = Lastname;
|
||||
this.Firstname = Firstname;
|
||||
this.CreationDate = CreationDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
# it-projekt
|
||||
|
||||
SUPER PROJEKT, ICH SAGS EUCH, schw<68>re!
|
||||
# OK Cool
|
||||
@@ -7,10 +7,8 @@
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EntityFramework" Version="6.4.4" />
|
||||
<PackageReference Include="MySql.Data" Version="8.0.29" />
|
||||
<PackageReference Include="MySqlConnector" Version="2.1.8" />
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MySql.Data" Version="8.0.29" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user