コード例 #1
0
        private void devamsizlikBilgi_Load(object sender, EventArgs e)
        {
            ogrenci o = (from x in bs.ogrencis where x.numara == ogrenci select x).FirstOrDefault();

            label1.Text = o.numara.ToString();
            label2.Text = o.ad;
            label3.Text = o.soyad;
            label4.Text = o.sinif.ToString();

            var dev = (from x in bs.devamsizliks where x.ogrNo == ogrenci select new { DersKodu = x.ders_kodu, Devamsizlik = x.devamsiz }).ToList();

            dataGridView1.DataSource = dev;
        }
コード例 #2
0
        private void sınavNot_Load(object sender, EventArgs e)
        {
            ogrenci o = (from x in bs.ogrencis where x.numara == ogrenci select x).FirstOrDefault();

            label1.Text = o.numara.ToString();
            label2.Text = o.ad;
            label3.Text = o.soyad;
            label4.Text = o.sinif.ToString();


            var notlar = (from x in bs.nots where x.ogrNo == ogrenci select new { DersKodu = x.ders_kodu, Vize = x.vize, Final = x.final, Bütünleme = x.but }).ToList();

            dataGridView1.DataSource = notlar;
        }
コード例 #3
0
        private void ogrenciGiris_Load(object sender, EventArgs e)
        {
            int     no = Convert.ToInt32(ogrencino);
            ogrenci o  = (from x in bs.ogrencis where x.numara == no select x).FirstOrDefault();

            label1.Text = o.numara.ToString();
            label2.Text = o.ad;
            label3.Text = o.soyad;
            label4.Text = o.sinif.ToString();
            int   bkkod = Convert.ToInt32(o.bolum);
            bolum b     = (from x in bs.bolums where x.bolum_kodu == bkkod select x).FirstOrDefault();

            label5.Text = b.bolum_adi.ToString();
        }
コード例 #4
0
 private void button6_Click(object sender, EventArgs e)
 {
     try
     {
         string[] d      = comboBox1.SelectedItem.ToString().Split(',');
         int      numara = Convert.ToInt32(d[0]);
         ogrenci  obilgi = (from x in bs.ogrencis where x.numara == numara select x).FirstOrDefault();
         bs.ogrencis.Remove(obilgi);
         bs.SaveChanges();
         MessageBox.Show("basarili");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
コード例 #5
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         string[] d      = comboBox1.SelectedItem.ToString().Split(',');
         int      numara = Convert.ToInt32(d[0]);
         ogrenci  obilgi = (from x in bs.ogrencis where x.numara == numara select x).FirstOrDefault();
         textBox5.Text = obilgi.numara.ToString();
         textBox6.Text = obilgi.ad;
         textBox7.Text = obilgi.soyad;
         textBox8.Text = obilgi.sinif.ToString();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
コード例 #6
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         ogrenci o = new ogrenci();
         o.numara = Convert.ToInt32(textBox1.Text);
         o.ad     = textBox2.Text;
         o.soyad  = textBox3.Text;
         o.sinif  = Convert.ToInt32(textBox4.Text);
         string[] b = comboBox3.SelectedItem.ToString().Split(',');
         o.bolum = Convert.ToInt32(b[1]);
         bs.ogrencis.Add(o);
         bs.SaveChanges();
         MessageBox.Show("basarili");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }