49 lines
1.1 KiB
C#
49 lines
1.1 KiB
C#
using MySql.Data.MySqlClient;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
|
|
namespace it_projekt
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
|
|
private void searchBtn_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
this.dataGrid.Rows.Add("test", "test", "test", "test", true);
|
|
// this.dataGrid.Rows.Contains();
|
|
}
|
|
|
|
private void loginBtn_Click(object sender, EventArgs e)
|
|
{
|
|
LoadUsersFromTable("root","");
|
|
}
|
|
|
|
|
|
|
|
public static void LoadUsersFromTable(string user, string password)
|
|
{
|
|
Database db = new Database(user, password);
|
|
MessageBox.Show(db.Persons.ToString());
|
|
}
|
|
|
|
private void dataGrid_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|