-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFrmOgrenciNotlar.cs
36 lines (32 loc) · 1.15 KB
/
FrmOgrenciNotlar.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
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 BonusProje1
{
public partial class FrmOgrenciNotlar : Form
{
public FrmOgrenciNotlar()
{
InitializeComponent();
}
SqlConnection baglanti = new SqlConnection(@"Data Source=DESKTOP-1C38CAO\SQLEXPRESS01;Initial Catalog=BonusOkul;Integrated Security=True");
public string numara;
private void FrmOgrenciNotlar_Load(object sender, EventArgs e)
{
SqlCommand komut = new SqlCommand("SELECT DERSAD,SINAV1,SINAV2,SINAV3,PROJE,ORTALAMA,DURUM FROM TBLNOTLAR INNER JOIN TBLDERSLER ON TBLNOTLAR.DERSID=TBLDERSLER.DERSID Where OGRID=@P1",baglanti);
komut.Parameters.AddWithValue("@P1",numara);
//this.Text = numara.ToString();
SqlDataAdapter da = new SqlDataAdapter(komut);
DataTable dt = new DataTable();
da.Fill(dt);
dataGridView1.DataSource = dt;
}
}
}