-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm1.cs
53 lines (53 loc) · 1.68 KB
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace E_Okul_Sistemi
{
public partial class frmGiris : Form
{
public frmGiris()
{
InitializeComponent();
}
public int ÖgrId;
public string ad = "";
public string soyad = "";
readonly Sql bgl = new Sql();
private void pictureBox2_Click(object sender, EventArgs e)
{
FrmÖgretmen frögretmen = new FrmÖgretmen();
frögretmen.Show();
this.Hide();
}
private void frmGiris_Load(object sender, EventArgs e)
{
}
private void pictureBox1_Click(object sender, EventArgs e)
{
frmÖgrenciNotlar frmÖgrNotlar = new frmÖgrenciNotlar();
SqlCommand kmt = new SqlCommand("Select * from ÖgrenciKayıt1 where ÖGRID=@p1", bgl.baglantı());
kmt.Parameters.AddWithValue("@p1", textBox1.Text);
SqlDataReader dr = kmt.ExecuteReader();
if (dr.Read())
{
frmÖgrNotlar.numara = textBox1.Text;
ad = dr["ÖGRAD"].ToString();
soyad = dr["ÖGRSOYAD"].ToString();
frmÖgrNotlar.Show();
}
else
{
MessageBox.Show("Ögrenci Bulunamadı", "YES E-Okul Sistemi", MessageBoxButtons.OK, MessageBoxIcon.Question);
}
bgl.baglantı().Close();
}
}
}