Esempio n. 1
0
        public NilaiSikap GetNilaiSikap(string idsikap)
        {
            NilaiSikap nilaiSikap;
            RaportDB   dB    = new RaportDB();
            string     query = $"SELECT * FROM nilai_sikap WHERE id_sikap = '{idsikap}'";
            DataTable  dt    = dB.GetDataRaport(query);

            nilaiSikap = new NilaiSikap
            {
                IdSikap       = idsikap,
                Nisn          = dt.Rows[0][1].ToString(),
                Beribadah     = Convert.ToInt32(dt.Rows[0][2]),
                Bersyukur     = Convert.ToInt32(dt.Rows[0][3]),
                Berdoa        = Convert.ToInt32(dt.Rows[0][4]),
                Toleransi     = Convert.ToInt32(dt.Rows[0][5]),
                Jujur         = Convert.ToInt32(dt.Rows[0][6]),
                Disiplin      = Convert.ToInt32(dt.Rows[0][7]),
                TanggungJawab = Convert.ToInt32(dt.Rows[0][8]),
                Peduli        = Convert.ToInt32(dt.Rows[0][9]),
                Santun        = Convert.ToInt32(dt.Rows[0][10]),
                PercayaDiri   = Convert.ToInt32(dt.Rows[0][11]),
                Kerjasama     = Convert.ToInt32(dt.Rows[0][12]),
                DeskripsiKi1  = dt.Rows[0][13].ToString(),
                DeskripsiKi2  = dt.Rows[0][14].ToString(),
                Semester      = dt.Rows[0][15].ToString()
            };
            return(nilaiSikap);
        }
Esempio n. 2
0
        public Absensi GetAbsensiSiswa(string nisn, string semester)
        {
            Absensi   absensi;
            RaportDB  dB    = new RaportDB();
            string    query = $"SELECT * FROM absensi WHERE nisn = '{nisn}' AND semester = '{semester}'";
            DataTable dt    = dB.GetDataRaport(query);

            if (dt.Rows.Count > 0)
            {
                absensi = new Absensi
                {
                    IdAbsen  = dt.Rows[0][0].ToString(),
                    Nisn     = dt.Rows[0][1].ToString(),
                    Sakit    = Convert.ToInt32(dt.Rows[0][2]),
                    Ijin     = Convert.ToInt32(dt.Rows[0][3]),
                    Alpha    = Convert.ToInt32(dt.Rows[0][4]),
                    Semester = dt.Rows[0][5].ToString()
                };
            }
            else
            {
                absensi = new Absensi
                {
                    IdAbsen  = "",
                    Nisn     = "",
                    Sakit    = 0,
                    Ijin     = 0,
                    Alpha    = 0,
                    Semester = ""
                };
            }

            return(absensi);
        }
Esempio n. 3
0
        public void GetSiswaTable()
        {
            var      query = "SELECT nisn, no_induk, nm_siswa, gender, agama, tempat_lahir, tgl_lahir FROM data_siswa";
            RaportDB db    = new RaportDB();

            SiswaDataTable = db.GetDataRaport(query);
        }
Esempio n. 4
0
        public DataSekolah GetDataSekolah()
        {
            DataSekolah  dataSekolah;
            RaportDB     dB    = new RaportDB();
            const string query = "SELECT * FROM data_sekolah WHERE id_sek = 1";
            DataTable    dT    = dB.GetDataRaport(query);

            dataSekolah = new DataSekolah
            {
                Npsn      = Convert.ToInt32(dT.Rows[0][1]),
                Kelas     = dT.Rows[0][2].ToString(),
                GuruKelas = dT.Rows[0][3].ToString(),
                NipGuru   = dT.Rows[0][4].ToString(),
                Desa      = dT.Rows[0][5].ToString(),
                Kecamatan = dT.Rows[0][6].ToString(),
                Kota      = dT.Rows[0][7].ToString(),
                Provinsi  = dT.Rows[0][8].ToString(),
                NmSekolah = dT.Rows[0][9].ToString(),
                Alamat    = dT.Rows[0][10].ToString(),
                NmKepsek  = dT.Rows[0][11].ToString(),
                NipKepsek = dT.Rows[0][12].ToString(),
                TglRaport = dT.Rows[0][13].ToString(),
                Semester  = dT.Rows[0][14].ToString(),
                Tahunajar = dT.Rows[0][15].ToString()
            };
            return(dataSekolah);
        }
Esempio n. 5
0
        public int GetKKM(int id_mapel)
        {
            int       hasil;
            RaportDB  dB    = new RaportDB();
            string    query = $"SELECT kkm FROM data_mapel WHERE id_mapel = {id_mapel}";
            DataTable dt    = dB.GetDataRaport(query);

            hasil = Convert.ToInt32(dt.Rows[0][0]);
            return(hasil);
        }
Esempio n. 6
0
        public NilaiSikap GetNilaiSikapSiswa(string nisn, string semester)
        {
            NilaiSikap nilaiSikap;
            RaportDB   dB    = new RaportDB();
            string     query = $"SELECT * FROM nilai_sikap WHERE nisn = '{nisn}' AND semester = '{semester}'";
            DataTable  dt    = dB.GetDataRaport(query);

            if (dt.Rows.Count > 0)
            {
                nilaiSikap = new NilaiSikap
                {
                    IdSikap       = dt.Rows[0][0].ToString(),
                    Nisn          = dt.Rows[0][1].ToString(),
                    Beribadah     = Convert.ToInt32(dt.Rows[0][2]),
                    Bersyukur     = Convert.ToInt32(dt.Rows[0][3]),
                    Berdoa        = Convert.ToInt32(dt.Rows[0][4]),
                    Toleransi     = Convert.ToInt32(dt.Rows[0][5]),
                    Jujur         = Convert.ToInt32(dt.Rows[0][6]),
                    Disiplin      = Convert.ToInt32(dt.Rows[0][7]),
                    TanggungJawab = Convert.ToInt32(dt.Rows[0][8]),
                    Peduli        = Convert.ToInt32(dt.Rows[0][9]),
                    Santun        = Convert.ToInt32(dt.Rows[0][10]),
                    PercayaDiri   = Convert.ToInt32(dt.Rows[0][11]),
                    Kerjasama     = Convert.ToInt32(dt.Rows[0][12]),
                    DeskripsiKi1  = dt.Rows[0][13].ToString(),
                    DeskripsiKi2  = dt.Rows[0][14].ToString(),
                    Semester      = dt.Rows[0][15].ToString()
                };
            }
            else
            {
                nilaiSikap = new NilaiSikap
                {
                    IdSikap       = "",
                    Nisn          = "",
                    Beribadah     = 0,
                    Bersyukur     = 0,
                    Berdoa        = 0,
                    Toleransi     = 0,
                    Jujur         = 0,
                    Disiplin      = 0,
                    TanggungJawab = 0,
                    Peduli        = 0,
                    Santun        = 0,
                    PercayaDiri   = 0,
                    Kerjasama     = 0,
                    DeskripsiKi1  = "",
                    DeskripsiKi2  = "",
                    Semester      = ""
                };
            }

            return(nilaiSikap);
        }
Esempio n. 7
0
        public string DeskripsiKD(int id_kd)
        {
            string   hasil = "";
            RaportDB dB    = new RaportDB();

            if (id_kd != 0)
            {
                string    query = $"SELECT deskripsi_kd FROM kompetensi_dasar WHERE id_kd = {id_kd}";
                DataTable dt    = dB.GetDataRaport(query);
                hasil = dt.Rows[0][0].ToString();
            }
            return(hasil);
        }
Esempio n. 8
0
        public bool IsRowExist(string nisn, int mode)
        {
            string query = "";

            if (mode == 0)
            {
                query = $"SELECT * FROM view_editsikap WHERE nisn = '{nisn}'";
            }
            else if (mode == 1)
            {
                query = $"SELECT * FROM view_editpengket WHERE nisn = '{nisn}'";
            }
            RaportDB  dB = new RaportDB();
            DataTable dt = dB.GetDataRaport(query);

            return(dt.Rows.Count > 0 ? true : false);
        }
Esempio n. 9
0
        public Absensi GetAbsensi(string idabs)
        {
            Absensi   absensi;
            RaportDB  dB    = new RaportDB();
            string    query = $"SELECT * FROM absensi WHERE id_absen = '{idabs}'";
            DataTable dt    = dB.GetDataRaport(query);

            absensi = new Absensi
            {
                IdAbsen  = idabs,
                Nisn     = dt.Rows[0][1].ToString(),
                Sakit    = Convert.ToInt32(dt.Rows[0][2]),
                Ijin     = Convert.ToInt32(dt.Rows[0][3]),
                Alpha    = Convert.ToInt32(dt.Rows[0][4]),
                Semester = dt.Rows[0][5].ToString()
            };
            return(absensi);
        }
Esempio n. 10
0
        public NilaiKeterampilan GetNilaiKeterampilanSiswa(string nisn, string semester, int idmapel)
        {
            NilaiKeterampilan nilaiKeterampilan;
            RaportDB          dB    = new RaportDB();
            string            query = $"SELECT * FROM nilai_keterampilan WHERE nisn = '{nisn}' AND semester = '{semester}' AND id_mapel = {idmapel}";
            DataTable         dt    = dB.GetDataRaport(query);

            if (dt.Rows.Count > 0)
            {
                nilaiKeterampilan = new NilaiKeterampilan
                {
                    IdKet                 = dt.Rows[0][0].ToString(),
                    Nisn                  = dt.Rows[0][1].ToString(),
                    IdMapel               = Convert.ToInt32(dt.Rows[0][2]),
                    KdTertinggi           = Convert.ToInt32(dt.Rows[0][3]),
                    KdTerendah            = Convert.ToInt32(dt.Rows[0][4]),
                    NilaiTertinggi        = Convert.ToInt32(dt.Rows[0][5]),
                    NilaiTerendah         = Convert.ToInt32(dt.Rows[0][6]),
                    NilaiAkhir            = Convert.ToInt32(dt.Rows[0][7]),
                    PredikatKeterampilan  = dt.Rows[0][8].ToString(),
                    DeskripsiKeterampilan = dt.Rows[0][9].ToString(),
                    Semester              = dt.Rows[0][10].ToString()
                };
            }
            else
            {
                nilaiKeterampilan = new NilaiKeterampilan
                {
                    IdKet                 = "",
                    Nisn                  = "",
                    IdMapel               = 0,
                    KdTertinggi           = 0,
                    KdTerendah            = 0,
                    NilaiTertinggi        = 0,
                    NilaiTerendah         = 0,
                    NilaiAkhir            = 0,
                    PredikatKeterampilan  = "",
                    DeskripsiKeterampilan = "",
                    Semester              = ""
                };
            }

            return(nilaiKeterampilan);
        }
Esempio n. 11
0
        public DataSiswa GetDataSiswa(string nisn)
        {
            DataSiswa dataSiswa;
            RaportDB  dB    = new RaportDB();
            string    query = $"SELECT * FROM data_siswa WHERE nisn = {nisn}";
            DataTable dt    = dB.GetDataRaport(query);

            dataSiswa = new DataSiswa
            {
                Nisn          = dt.Rows[0][0].ToString(),
                NoInduk       = dt.Rows[0][1].ToString(),
                NmSiswa       = dt.Rows[0][2].ToString(),
                NmPanggilan   = dt.Rows[0][3].ToString(),
                Gender        = dt.Rows[0][4].ToString(),
                Agama         = dt.Rows[0][5].ToString(),
                TempatLahir   = dt.Rows[0][6].ToString(),
                TglLahir      = dt.Rows[0][7].ToString(),
                PendidikanSeb = dt.Rows[0][8].ToString(),
                Alamat        = dt.Rows[0][9].ToString(),
                NmAyah        = dt.Rows[0][10].ToString(),
                NmIbu         = dt.Rows[0][11].ToString(),
                JobAyah       = dt.Rows[0][12].ToString(),
                JobIbu        = dt.Rows[0][13].ToString(),
                Jalan         = dt.Rows[0][14].ToString(),
                Kecamatan     = dt.Rows[0][15].ToString(),
                Desa          = dt.Rows[0][16].ToString(),
                Kota          = dt.Rows[0][17].ToString(),
                Provinsi      = dt.Rows[0][18].ToString(),
                NmWali        = dt.Rows[0][19].ToString(),
                JobWali       = dt.Rows[0][20].ToString(),
                AlamatWali    = dt.Rows[0][21].ToString(),
                Pendengaran   = dt.Rows[0][22].ToString(),
                Penglihatan   = dt.Rows[0][23].ToString(),
                Gigi          = dt.Rows[0][24].ToString(),
                Berat1        = dt.Rows[0][25].ToString(),
                Berat2        = dt.Rows[0][26].ToString(),
                Tinggi1       = dt.Rows[0][27].ToString(),
                Tinggi2       = dt.Rows[0][28].ToString()
            };
            return(dataSiswa);
        }
Esempio n. 12
0
        public NilaiEkskul GetNilaiEkskul(string ideks)
        {
            NilaiEkskul nilaiEkskul;
            RaportDB    dB    = new RaportDB();
            string      query = $"SELECT * FROM nilai_ekskul WHERE id_eks = '{ideks}'";
            DataTable   dt    = dB.GetDataRaport(query);

            nilaiEkskul = new NilaiEkskul
            {
                IdEks    = ideks,
                Nisn     = dt.Rows[0][1].ToString(),
                Eskul1   = dt.Rows[0][2].ToString(),
                Eskul2   = dt.Rows[0][3].ToString(),
                Eskul3   = dt.Rows[0][4].ToString(),
                Nilai1   = dt.Rows[0][5].ToString(),
                Nilai2   = dt.Rows[0][6].ToString(),
                Nilai3   = dt.Rows[0][7].ToString(),
                Semester = dt.Rows[0][8].ToString()
            };
            return(nilaiEkskul);
        }
Esempio n. 13
0
        public NilaiEkskul GetNilaiEkskulSiswa(string nisn, string semester)
        {
            NilaiEkskul nilaiEkskul;
            RaportDB    dB    = new RaportDB();
            string      query = $"SELECT * FROM nilai_ekskul WHERE nisn = '{nisn}' AND semester = '{semester}'";
            DataTable   dt    = dB.GetDataRaport(query);

            if (dt.Rows.Count > 0)
            {
                nilaiEkskul = new NilaiEkskul
                {
                    IdEks    = dt.Rows[0][0].ToString(),
                    Nisn     = dt.Rows[0][1].ToString(),
                    Eskul1   = dt.Rows[0][2].ToString(),
                    Eskul2   = dt.Rows[0][3].ToString(),
                    Eskul3   = dt.Rows[0][4].ToString(),
                    Nilai1   = dt.Rows[0][5].ToString(),
                    Nilai2   = dt.Rows[0][6].ToString(),
                    Nilai3   = dt.Rows[0][7].ToString(),
                    Semester = dt.Rows[0][8].ToString()
                };
            }
            else
            {
                nilaiEkskul = new NilaiEkskul
                {
                    IdEks    = "",
                    Nisn     = "",
                    Eskul1   = "",
                    Eskul2   = "",
                    Eskul3   = "",
                    Nilai1   = "",
                    Nilai2   = "",
                    Nilai3   = "",
                    Semester = ""
                };
            }

            return(nilaiEkskul);
        }
Esempio n. 14
0
        public NilaiKeterampilan GetNilaiKeterampilan(string idket)
        {
            NilaiKeterampilan nilaiKeterampilan;
            RaportDB          dB    = new RaportDB();
            string            query = $"SELECT * FROM nilai_keterampilan WHERE id_ket = '{idket}'";
            DataTable         dt    = dB.GetDataRaport(query);

            nilaiKeterampilan = new NilaiKeterampilan
            {
                IdKet                 = idket,
                Nisn                  = dt.Rows[0][1].ToString(),
                IdMapel               = Convert.ToInt32(dt.Rows[0][2]),
                KdTertinggi           = Convert.ToInt32(dt.Rows[0][3]),
                KdTerendah            = Convert.ToInt32(dt.Rows[0][4]),
                NilaiTertinggi        = Convert.ToInt32(dt.Rows[0][5]),
                NilaiTerendah         = Convert.ToInt32(dt.Rows[0][6]),
                NilaiAkhir            = Convert.ToInt32(dt.Rows[0][7]),
                PredikatKeterampilan  = dt.Rows[0][8].ToString(),
                DeskripsiKeterampilan = dt.Rows[0][9].ToString(),
                Semester              = dt.Rows[0][10].ToString()
            };
            return(nilaiKeterampilan);
        }