Search used as button to check marked persons
This commit is contained in:
24
Form1.cs
24
Form1.cs
@@ -22,22 +22,36 @@ namespace it_projekt
|
||||
|
||||
private void searchBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
foreach(DataGridViewRow row in dataGrid.Rows)
|
||||
{
|
||||
List<int> markedUsers = new List<int>();
|
||||
if (row.Cells[4].Value != null)
|
||||
{
|
||||
if (row.Cells[4].Value.ToString() == "True")
|
||||
{
|
||||
MessageBox.Show("geht");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.dataGrid.Rows.Add("test", "test", "test", "test", true);
|
||||
// this.dataGrid.Rows.Contains();
|
||||
}
|
||||
|
||||
private void loginBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
LoadUsersFromTable("root","");
|
||||
LoadUsersFromTable(userTxt.Text,passTxt.Text);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void LoadUsersFromTable(string user, string password)
|
||||
public void LoadUsersFromTable(string user, string password)
|
||||
{
|
||||
Database db = new Database(user, password);
|
||||
MessageBox.Show(db.Persons.ToString());
|
||||
foreach (Person person in db.Persons)
|
||||
{
|
||||
this.dataGrid.Rows.Add(person.Id, person.Firstname, person.Lastname, person.CreationDate, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void dataGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user