using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; namespace Lab_monitoring_system { public partial class loginwnd : Form { public loginwnd() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void button3_Click(object sender, EventArgs e) { Form2 ss = new Form2(); ss.Show(); } private void button1_Click(object sender, EventArgs e) { this.timer1.Start(); SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\NaNo\Documents\nan.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"); SqlDataAdapter sda = new SqlDataAdapter("select count(*) from registration where name ='" + textBox1.Text + "' and password= '" + textBox2.Text + "'", con); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows[0][0].ToString() == "1") { this.Hide(); wlcm ww = new wlcm(textBox1.Text); ww.Show(); } else { MessageBox.Show("please check your user id or password"); } } private void button2_Click(object sender, EventArgs e) { this.Hide(); forgotps ff = new forgotps(); ff.Show(); } private void timer1_Tick(object sender, EventArgs e) { this.progressBar1.Increment(1); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)