45 lines
962 B
C#
45 lines
962 B
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)
|
|
{
|
|
|
|
}
|
|
|
|
private void loginBtn_Click(object sender, EventArgs e)
|
|
{
|
|
LoadUsersFromTable("","");
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
}
|
|
|
|
|
|
}
|
|
}
|