Ejemplo n.º 1
0
        public void gridShow()
        {
            table = new DataTable();
            table.Columns.Add("Ad", typeof(string));
            table.Columns.Add("Soyad", typeof(string));
            table.Columns.Add("ÖğrenciNo", typeof(string));
            table.Columns.Add("Tc", typeof(string));
            table.Columns.Add("Bölüm", typeof(string));
            table.Columns.Add("AldığıDers", typeof(string));
            table.Columns.Add("Öğretmen", typeof(string));

            int              sayac = 0;
            HelperLesson     hl    = new HelperLesson();
            HelperStudent    hs    = new HelperStudent();
            HelperDepartment hd    = new HelperDepartment();
            var              list  = hs.StudentList(Convert.ToInt32(active.aktif));

            foreach (var item in list)
            {
                var list2 = hs.GetLessons(item.OgrId, Convert.ToInt32(style.ogrenci));
                foreach (var item2 in list2)
                {
                    var list3 = hl.GetLessonList(Convert.ToInt32(style.ogretmen), Convert.ToInt32(active.aktif), item2.Ders.DersId);
                    foreach (var item3 in list3)
                    {
                        var b = hd.GetDepartment(item3.Ogretmen.BolumId.Value);
                        table.Rows.Add(item.Ad, item.Soyad, item.OgrNo, item.Tc, b.BolumAdi, item2.Ders.DersAdi, item3.Ogretmen.OgretmenAdi);
                        dataGridView1.DataSource = table;
                    }
                    sayac++;
                }
            }
        }
Ejemplo n.º 2
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++;
            }
        }
Ejemplo n.º 3
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++;
            }
        }