Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- using System.Data.SqlClient;
- namespace Inlog_Scherm_Rent_A_Car
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- this.Close();
- }
- private void button2_Click(object sender, EventArgs e)
- {
- SqlConnection con = new SqlConnection(@"Data Source=NICKY-PC;Initial Catalog=CRUD;Integrated Security=True;");
- SqlDataAdapter sda = new SqlDataAdapter("Select count(*) From Login where Username='" + textBox1.Text + "' and Password ='" + textBox2.Text + "'",con);
- DataTable dt = new DataTable();
- sda.Fill(dt);
- if (dt.Rows[0][0].ToString() == "1")
- {
- this.Hide();
- Mainscreen ss = new Mainscreen();
- ss.Show();
- }
- else
- {
- MessageBox.Show("Please Check Your Login Details");
- }
- }
- private void button3_Click(object sender, EventArgs e)
- {
- this.Hide();
- Registreren ss = new Registreren();
- ss.Show();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement