I bob. Ta’lim muassasida talabalar davomatini monitoring qilish tizimi


Ilova Dasturning kirish qismidagi asosiy oyna.Bu yerda foydalanuvchi login parollarni kiritish qismi namoyon bo‘ladi


Download 1.83 Mb.
bet8/10
Sana23.12.2022
Hajmi1.83 Mb.
#1047900
1   2   3   4   5   6   7   8   9   10
Bog'liq
1 Ta’lim muassasida talabalar davomatini monitoring qilish tizimi

Ilova
Dasturning kirish qismidagi asosiy oyna.Bu yerda foydalanuvchi login parollarni kiritish qismi namoyon bo‘ladi.
namespace kurs_ishim
{
public partial class Form1_KIRISH : Form
{
public Form1_KIRISH()
{
InitializeComponent();
}

SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\HP\Documents\LOGIN.mdf;Integrated Security=True;Connect Timeout=30");


private void button_CHIQISH_Click(object sender, EventArgs e)
{
this.Close();
}

private void button_KIRISH_Click(object sender, EventArgs e)


{
SqlDataAdapter yangi = new SqlDataAdapter("select count (*) From LOGIN where LOGIN='" + textBox_LOGIN.Text + "'and PAROL='" + textBox_PAROL.Text + "'", con);
DataTable data = new DataTable();
yangi.Fill(data);

if (data.Rows[0][0].ToString() == "1")


{
this.Hide();
REGISTER oyna = new REGISTER();
oyna.Show();
}
else if (data.Rows[0][0].ToString() == "1")
{
this.Hide();
REGISTER oyna = new REGISTER();
oyna.Show();
}

else
MessageBox.Show("LOGIN YOKI PAROLNI NOTO`G`RI KIRITDINGIZ!!!");


}

private void Form1_KIRISH_Load(object sender, EventArgs e)


{

}


private void button1_Click(object sender, EventArgs e)
{
this.Close();
}

private void button2_Click(object sender, EventArgs e)


{
SqlDataAdapter yangi = new SqlDataAdapter("select count (*) From LOGIN where LOGIN='" + textBox_LOGIN.Text + "'and PAROL='" + textBox_PAROL.Text + "'", con);
DataTable data = new DataTable();
yangi.Fill(data);

if (data.Rows[0][0].ToString() == "1")


{

this.Hide();


OQITUVCHI_OYNASI oyna = new OQITUVCHI_OYNASI();
oyna.Show();
}
else if (data.Rows[0][0].ToString() == "1")
{
this.Hide();
OQITUVCHI_OYNASI oyna = new OQITUVCHI_OYNASI();
oyna.Show();
}

else
MessageBox.Show("LOGIN YOKI PAROLNI NOTO`G`RI KIRITDINGIZ!!!");


}



Download 1.83 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9   10




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling