Пример #1
0
        public void NotegridShow()
        {
            dataGridView1.Rows.Clear();
            sayac = 0;
            var s = hl.GetLessonList(Convert.ToInt32(style.ogrenci), Convert.ToInt32(active.aktif), dersID);

            foreach (var item in s)
            {
                HelperStudent hs = new HelperStudent();
                var           st = hs.GetStudent(Convert.ToInt32(item.Ogrt_Ogr_ID));
                dataGridView1.Rows.Add();
                dataGridView1.Rows[sayac].Cells[0].Value  = item.Ogretmen_Ogrenci_DersID;
                dataGridView1.Rows[sayac].Cells[1].Value  = item.Ogrt_Ogr_ID;
                dataGridView1.Rows[sayac].Cells[2].Value  = sayac + 1;
                dataGridView1.Rows[sayac].Cells[3].Value  = st.OgrNo;
                dataGridView1.Rows[sayac].Cells[4].Value  = st.Ad;
                dataGridView1.Rows[sayac].Cells[5].Value  = st.Soyad;
                dataGridView1.Rows[sayac].Cells[6].Value  = item.Ders.DersAdi;
                dataGridView1.Rows[sayac].Cells[7].Value  = item.Vize1;
                dataGridView1.Rows[sayac].Cells[8].Value  = item.Vize2;
                dataGridView1.Rows[sayac].Cells[9].Value  = item.Final;
                dataGridView1.Rows[sayac].Cells[10].Value = item.DersID;
                sayac++;
            }
        }
Пример #2
0
        public void NoteShow()
        {
            dataGridView1.Rows.Clear();

            HelperStudent    h  = new HelperStudent();
            HelperDepartment hd = new HelperDepartment();
            var      a          = hs.GetStudent(this.Id);
            var      b          = hd.GetDepartment(a.BolumId.Value);
            DateTime date       = a.DogumTarih.Value;

            label7.Text  = a.Ad;
            label8.Text  = a.Soyad;
            label9.Text  = a.Tc;
            label10.Text = date.ToShortDateString();
            label11.Text = b.BolumAdi;
            label12.Text = a.Email;

            st    = h.GetLessons(this.Id, this.type);
            sayac = 0;
            double ort;

            foreach (var item in st)
            {
                dataGridView1.Rows.Add();
                dataGridView1.Rows[sayac].Cells[0].Value = item.Ders.DersAdi;
                dataGridView1.Rows[sayac].Cells[1].Value = item.Ders.DersKodu;
                dataGridView1.Rows[sayac].Cells[2].Value = item.Vize1;
                dataGridView1.Rows[sayac].Cells[3].Value = item.Vize2;
                dataGridView1.Rows[sayac].Cells[4].Value = item.Final;
                if (item.Vize1 != 0 && item.Vize2 != 0 && item.Final != 0)
                {
                    ort = Convert.ToDouble((item.Vize1 * 0.3) + (item.Vize2 * 0.3) + (item.Final * 0.4));
                    dataGridView1.Rows[sayac].Cells[5].Value = ort;
                    dataGridView1.Rows[sayac].Cells[6].Value = StudentInfo.HarfNotu(ort);
                }
                else
                {
                    dataGridView1.Rows[sayac].Cells[5].Value = 0;
                }
                sayac++;
            }
        }