Пример #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++;
                }
            }
        }
Пример #2
0
        private void Form4_Load(object sender, EventArgs e)
        {
            var         a  = hs.GetLessons(this.ogrtId, Convert.ToInt32(style.ogretmen));
            List <Ders> dl = new List <Ders>();

            foreach (var item in a)
            {
                dl.Add(hl.GetLessonBydersId(item.Ders.DersId));
            }
            cbxDers.ValueMember   = "DersId";
            cbxDers.DisplayMember = "DersAdi";
            cbxDers.DataSource    = dl;
        }
Пример #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++;
            }
        }