Пример #1
0
 void Button10Click(object sender, EventArgs e)
 {
     try {
         status_export = "3";
         string[]      dSiswa     = cmbMataPelajaran3.Text.Split('-');
         int           id         = Convert.ToInt32(dSiswa[0].ToString());
         bacaDataNilai nilaiSiswa = new bacaDataNilai();
         tabel = nilaiSiswa.bacaNilaiPerMat(id);
         tampilNilai.DataSource = null;
         tampilNilai.Columns.Clear();
         tampilNilai.DataSource            = tabel;
         tampilNilai.AllowUserToAddRows    = false;
         tampilNilai.ReadOnly              = true;
         tampilNilai.Columns[0].HeaderText = "No Soal";
         tampilNilai.Columns[0].Width      = 80;
         tampilNilai.Columns[1].HeaderText = "Nama Siswa";
         tampilNilai.Columns[1].Width      = 100;
         tampilNilai.Columns[2].HeaderText = "Nama Mata Pelajaran";
         tampilNilai.Columns[2].Width      = 150;
         tampilNilai.Columns[3].HeaderText = "Nama Kategori Ujian";
         tampilNilai.Columns[3].Width      = 150;
         tampilNilai.Columns[4].HeaderText = "Nilai Hasil";
         tampilNilai.Columns[4].Width      = 85;
     } catch (Exception) {
         MessageBox.Show("Error");
     }
 }
Пример #2
0
 void Button14Click(object sender, EventArgs e)
 {
     try {
         status_export = "4";
         bacaDataNilai nilaiSiswa = new bacaDataNilai();
         tabel = nilaiSiswa.bacaNilaiSemuaSiswa();
         tampilNilai.DataSource = null;
         tampilNilai.Columns.Clear();
         tampilNilai.DataSource            = tabel;
         tampilNilai.AllowUserToAddRows    = false;
         tampilNilai.ReadOnly              = true;
         tampilNilai.Columns[0].HeaderText = "No Soal";
         tampilNilai.Columns[0].Width      = 80;
         tampilNilai.Columns[1].HeaderText = "Nama Siswa";
         tampilNilai.Columns[1].Width      = 100;
         tampilNilai.Columns[2].HeaderText = "Nama Mata Pelajaran";
         tampilNilai.Columns[2].Width      = 150;
         tampilNilai.Columns[3].HeaderText = "Nama Kategori Ujian";
         tampilNilai.Columns[3].Width      = 150;
         tampilNilai.Columns[4].HeaderText = "Nilai Hasil";
         tampilNilai.Columns[4].Width      = 85;
     } catch (Exception) {
         MessageBox.Show("Error");
     }
 }