示例#1
0
 private bool Loaddb()
 {
     A.SetSelect("SELECT `kodepelajaran`, `kodemapel`, `namapelajaran`, IF(`status`='Y','YA','TIDAK') `status` ");
     A.SetFrom("FROM `r_matapelajaran` ");
     A.SetWhere("WHERE `hapus`='N' ");
     TbCari.GenerateQueriCari(new List <string>()
     {
         "kodemapel", "namapelajaran", "status",
     });
     A.SetQueri(A.GetSelect() + A.GetFrom() + A.GetWhere() + tbhalaman.LimitQ(ldarihalaman, A.GetFrom(), A.GetWhere()) + ";");
     Dg.QueriToDg();
     return(true);
 }
示例#2
0
 private bool Loaddb()
 {
     A.SetSelect("SELECT `kode_jenisnilai`, `namajenisnilai`, `keterangan` ");
     A.SetFrom("FROM `r_jenisnilai` ");
     A.SetWhere("WHERE `hapus`='N' ");
     TbCari.GenerateQueriCari(new List <string>()
     {
         "kode_jenisnilai", "namajenisnilai", "keterangan",
     });
     A.SetQueri(A.GetSelect() + A.GetFrom() + A.GetWhere() + tbhalaman.LimitQ(ldarihalaman, A.GetFrom(), A.GetWhere()) + ";");
     Dg.QueriToDg();
     return(true);
 }
示例#3
0
 private bool Loaddb()
 {
     A.SetSelect("SELECT `kode_guru`, `nidn`, `nik`, `nosk`, CONCAT(IF(`gelardepan` IS NULL,'', CONCAT(`gelardepan`,' ')), `namaguru`, ' ', " +
                 "IF(`gelarbelakang` IS NULL, '', CONCAT(`gelarbelakang`,' '))) `namaguru`, `jeniskelamin`, CONCAT(IF(`tempatlahir`='','-', `tempatlahir`), ', ', DATE_FORMAT(`tgllahir`,'%d/%m/%Y')) `ttl`, " +
                 "`nohp`, `email`, `alamat`, `golongan`, `jabatanstruktural`, `jabatanfungsional`, DATE_FORMAT(`masuk`,'%d/%m/%Y') `masuk`, `status` ");
     A.SetFrom("FROM `m_guru` ");
     A.SetWhere("WHERE `hapus`='N' ");
     TbCari.GenerateQueriCari(new List <string>()
     {
         "nidn", "nik", "nosk", "namaguru", "gelardepan", "gelarbelakang", "golongan", "nohp", "email",
     });
     A.SetQueri(A.GetSelect() + A.GetFrom() + A.GetWhere() + tbhalaman.LimitQ(ldarihalaman, A.GetFrom(), A.GetWhere()) + ";");
     Dg.QueriToDg();
     return(true);
 }
 private bool Loaddb()
 {
     A.SetSelect("SELECT `kode_siswa`, `nis`, `namasiswa`, `jeniskelamin`, CONCAT(IF(`tempatlahir`='','-', `tempatlahir`),', ', `tgllahir`) `tll`, `kontak`, `email`, " +
                 "`alamat`, `ayah`, `ibu`, DATE_FORMAT(`masuk`,'%d-%m-%Y') `masuk`,`angkatan`, `status`, `keterangan` ");
     A.SetFrom("FROM `m_siswa` ");
     A.SetWhere("WHERE `hapus`='N' ");
     Dtp1.GenerateQueriDate(Dtp2, "masuk");
     CbAngkatan.GenerateQueriValue("angkatan");
     TbCari.GenerateQueriCari(new List <string>()
     {
         "nis", "namasiswa", "tempatlahir", "kontak", "email", "ayah", "ibu"
     });
     A.SetQueri(A.GetSelect() + A.GetFrom() + A.GetWhere() + tbhalaman.LimitQ(ldarihalaman, A.GetFrom(), A.GetWhere()) + ";");
     Dg.QueriToDg();
     return(true);
 }
 private bool loaddb()
 {
     if (CbKelas.SelectedIndex >= 0 && CbTahunAjaran.SelectedIndex >= 0 && CbMasuk.SelectedIndex >= 0)
     {
         A.SetSelect("SELECT `SW`.`kode_siswa`, `kode_ruangan`, IF(`kode_ruangan` IS NULL, 'BELUM', 'SUDAH') `pilih`, `namakelas`, `nis`, " +
                     "`namasiswa`,`jeniskelamin`,`masuk`, `R`.`keterangan` ");
         A.SetFrom("FROM `m_siswa` `SW` LEFT JOIN (SELECT * FROM `tb_ruangan` `R` WHERE `tahunajaran`= '" + CbTahunAjaran.Text + "') `R` " +
                   "ON `R`.`kode_siswa` = `SW`.`kode_siswa` LEFT JOIN `r_kelas` `K` ON `K`.`kode_kelas`=`R`.`kode_kelas` ");
         A.SetWhere("WHERE `SW`.`hapus` = 'N' AND `masuk` LIKE '" + CbMasuk.Text + "%' ");
         TbCari.GenerateQueriCari(new List <string>()
         {
             "namakelas", "nis", "namasiswa"
         });
         A.SetOrderby("ORDER BY `SW`.`namasiswa` ASC ");
         A.SetQueri(A.GetSelect() + A.GetFrom() + A.GetWhere() + tbhalaman.LimitQ(ldarihalaman, A.GetFrom(), A.GetWhere()) + ";");
         Dg.QueriToDg();
     }
     return(true);
 }
示例#6
0
 private bool Loaddb()
 {
     if (CbKelas.SelectedIndex >= 0 && CbJenisNilai.SelectedIndex >= 0 && CbTahunAjaran.SelectedIndex >= 0 && CbMataPelajaran.SelectedIndex >= 0)
     {
         A.SetSelect("SELECT IFNULL(`kode_nilai`, '0') `kode_nilai` , `R`.`kode_ruangan`, " +
                     "IF(`kode_nilai` IS NULL, 'INPUT', 'HAPUS') `input`, `nis`, `S`.`namasiswa`, `jeniskelamin`, `namakelas`, " +
                     "`N`.`tanggal`, IFNULL(`nilai`,'-') `nilai`, IFNULL(`N`.`keterangan`,'') `keterangan` ");
         A.SetFrom("FROM `tb_ruangan` `R` LEFT JOIN `m_siswa` `S` ON `R`.`kode_siswa` = `S`.`kode_siswa` " +
                   "LEFT JOIN `r_kelas` `K` ON `K`.`kode_kelas`=`R`.`kode_kelas`LEFT JOIN (SELECT * FROM `tb_nilai` `N` " +
                   "WHERE `N`.`kode_jenisnilai`='" + KodeJenisNilai[CbJenisNilai.SelectedIndex] + "' " +
                   "AND `N`.`kode_jadwal`=(SELECT `kode_jadwal` FROM `tb_jadwal` WHERE `kode_guru`='" + S.GetKodeGuru() + "' " +
                   "AND `kode_kelas`='" + KodeKelas[CbKelas.SelectedIndex] + "' AND `kode_pelajaran`= '" + KodePelajaran[CbMataPelajaran.SelectedIndex] + "' " +
                   "AND `tahunajaran`= '" + CbTahunAjaran.Text + "')) `N` ON `N`.`kode_ruangan` = `R`.`kode_ruangan` ");
         A.SetWhere("WHERE `R`.`kode_kelas` =  '" + KodeKelas[CbKelas.SelectedIndex] + "' AND `R`.`tahunajaran` = '" + CbTahunAjaran.Text + "'");
         TbCari.GenerateQueriCari(new List <string>()
         {
             "nis", "namasiswa", "namakelas", "`N`.`keterangan`"
         });
         A.SetQueri(A.GetSelect() + A.GetFrom() + A.GetWhere() + tbhalaman.LimitQ(ldarihalaman, A.GetFrom(), A.GetWhere()) + ";");
         Dg.QueriToDg();
     }
     return(true);
 }
 private bool Loaddb()
 {
     if (CbKelas.SelectedIndex >= 0 && CbTahunAjaran.SelectedIndex >= 0)
     {
         A.SetSelect("SELECT IFNULL(`J`.`kode_jadwal`,'0') `kodejadwal`, `kodepelajaran`, " +
                     "IF(`J`.`kode_jadwal` IS NULL, 'BELUM', 'SUDAH') `pilih`, `kodemapel`, `namapelajaran`, `namaguru`, `keterangan`, `jadwal` ");
         A.SetFrom("FROM `r_matapelajaran` `MP` LEFT JOIN (SELECT `J`.`kode_jadwal`, `J`.`kode_pelajaran`, " +
                   "CONCAT(`nidn`,' (',IF(`gelardepan`='','',CONCAT(`gelardepan`,' ')), `namaguru`, " +
                   "IF(`gelarbelakang`='','',CONCAT(' ', `gelarbelakang`)),')') `namaguru`, `J`.`keterangan` FROM `tb_jadwal` `J` " +
                   "LEFT JOIN `m_guru` `G` ON `G`.`kode_guru`=`J`.`kode_guru`WHERE `kode_kelas`='" + kodekelas[CbKelas.SelectedIndex] + "' " +
                   "AND tahunajaran='" + CbTahunAjaran.Text + "') `J` ON `J`.`kode_pelajaran`=`MP`.`kodepelajaran` " +
                   "LEFT JOIN (SELECT`kode_jadwal`,  GROUP_CONCAT(`hari`,',',`waktu`,',',`totaljam`,';' SEPARATOR '\n') `jadwal` " +
                   "FROM  `tb_waktupelajaran`GROUP BY `kode_jadwal`) `W` ON `W`.`kode_jadwal`=`J`.`kode_jadwal`");
         A.SetWhere("WHERE `status`='Y' AND `hapus`='N' ");
         TbCari.GenerateQueriCari(new List <string>()
         {
             "kodemapel", "namapelajaran", "namaguru"
         });
         A.SetQueri(A.GetSelect() + A.GetFrom() + A.GetWhere() + tbhalaman.LimitQ(ldarihalaman, A.GetFrom(), A.GetWhere()) + ";");
         Dg.QueriToDg();
         return(true);
     }
     return(false);
 }