예제 #1
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);
        }
예제 #2
0
        public bool Ubah(DataSiswa ds, string oldnisn)
        {
            bool     isNice = false;
            RaportDB dB     = new RaportDB();

            const string query = "UPDATE data_siswa SET nisn = @nisn, no_induk = @noinduk, nm_siswa = @nmsiswa, nm_panggilan = @nmpanggilan, gender = @gender, agama =  @agama, tempat_lahir = @tptlahir, tgl_lahir = @tgllahir, pendidikan_seb = @penseb, alamat =  @alamat, nm_ayah = @nmayah, nm_ibu =  @nmibu, job_ayah =  @jobayah, job_ibu = @jobibu, jalan =  @jalan, kecamatan = @kecamatan, desa = @desa, kota = @kota, provinsi =  @provinsi, nm_wali = @nmwali, job_wali = @jobwali, alamat_wali = @alamatwali, pendengaran = @pendengaran, penglihatan = @penglihatan, gigi = @gigi, berat1 = @berat1, berat2 = @berat2, tinggi1 = @tinggi1, tinggi2 = @tinggi2 WHERE nisn = @oldnisn";
            var          args  = new Dictionary <string, object>
            {
                { "@oldnisn", oldnisn },
                { "@nisn", ds.Nisn },
                { "@noinduk", ds.NoInduk },
                { "@nmsiswa", ds.NmSiswa },
                { "@nmpanggilan", ds.NmPanggilan },
                { "@gender", ds.Gender },
                { "@agama", ds.Agama },
                { "@tptlahir", ds.TempatLahir },
                { "@tgllahir", ds.TglLahir },
                { "@penseb", ds.PendidikanSeb },
                { "@alamat", ds.Alamat },
                { "@nmayah", ds.NmAyah },
                { "@nmibu", ds.NmIbu },
                { "@jobayah", ds.JobAyah },
                { "@jobibu", ds.JobIbu },
                { "@jalan", ds.Jalan },
                { "@kecamatan", ds.Kecamatan },
                { "@desa", ds.Desa },
                { "@kota", ds.Kota },
                { "@provinsi", ds.Provinsi },
                { "@nmwali", ds.NmWali },
                { "@jobwali", ds.JobWali },
                { "@alamatwali", ds.AlamatWali },
                { "@pendengaran", ds.Pendengaran },
                { "@penglihatan", ds.Penglihatan },
                { "@gigi", ds.Gigi },
                { "@berat1", ds.Berat1 },
                { "@berat2", ds.Berat2 },
                { "@tinggi1", ds.Tinggi1 },
                { "@tinggi2", ds.Tinggi2 }
            };

            return(isNice = dB.ExecuteWrite(query, args) > 0 ? true : false);
        }
예제 #3
0
        public bool Ubah(NilaiEkskul eks)
        {
            bool     isNice = false;
            RaportDB dB     = new RaportDB();

            const string query = "UPDATE nilai_ekskul SET eskul1 = @ekskul1, eskul2 = @ekskul2, eskul3 = @ekskul3, nilai1 = @nilai1, nilai2 = @nilai2, nilai3 = @nilai3, semester = @semester WHERE id_eks = @ideks";
            var          args  = new Dictionary <string, object>
            {
                { "@ideks", eks.IdEks },
                { "@ekskul1", eks.Eskul1 },
                { "@ekskul2", eks.Eskul2 },
                { "@ekskul3", eks.Eskul3 },
                { "@nilai1", eks.Nilai1 },
                { "@nilai2", eks.Nilai2 },
                { "@nilai3", eks.Nilai3 },
                { "@semester", eks.Semester }
            };

            return(isNice = dB.ExecuteWrite(query, args) > 0 ? true : false);
        }
예제 #4
0
        public bool Tambah(DataSiswa ds)
        {
            bool     isNice = false;
            RaportDB dB     = new RaportDB();

            const string query = "INSERT INTO data_siswa VALUES(@nisn, @noinduk, @nmsiswa, @nmpanggilan, @gender, @agama, @tptlahir, @tgllahir, @penseb, @alamat, @nmayah, @nmibu, @jobayah, @jobibu, @jalan, @kecamatan, @desa, @kota, @provinsi, @nmwali, @jobwali, @alamatwali, @pendengaran, @penglihatan, @gigi, @berat1, @berat2, @tinggi1, @tinggi2)";
            var          args  = new Dictionary <string, object>
            {
                { "@nisn", ds.Nisn },
                { "@noinduk", ds.NoInduk },
                { "@nmsiswa", ds.NmSiswa },
                { "@nmpanggilan", ds.NmPanggilan },
                { "@gender", ds.Gender },
                { "@agama", ds.Agama },
                { "@tptlahir", ds.TempatLahir },
                { "@tgllahir", ds.TglLahir },
                { "@penseb", ds.PendidikanSeb },
                { "@alamat", ds.Alamat },
                { "@nmayah", ds.NmAyah },
                { "@nmibu", ds.NmIbu },
                { "@jobayah", ds.JobAyah },
                { "@jobibu", ds.JobIbu },
                { "@jalan", ds.Jalan },
                { "@kecamatan", ds.Kecamatan },
                { "@desa", ds.Desa },
                { "@kota", ds.Kota },
                { "@provinsi", ds.Provinsi },
                { "@nmwali", ds.NmWali },
                { "@jobwali", ds.JobWali },
                { "@alamatwali", ds.AlamatWali },
                { "@pendengaran", ds.Pendengaran },
                { "@penglihatan", ds.Penglihatan },
                { "@gigi", ds.Gigi },
                { "@berat1", ds.Berat1 },
                { "@berat2", ds.Berat2 },
                { "@tinggi1", ds.Tinggi1 },
                { "@tinggi2", ds.Tinggi2 }
            };

            return(isNice = dB.ExecuteWrite(query, args) > 0 ? true : false);
        }
예제 #5
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);
        }
예제 #6
0
        public bool Ubah(NilaiKeterampilan nk)
        {
            bool     isNice = false;
            RaportDB dB     = new RaportDB();

            const string query = "UPDATE nilai_keterampilan SET kd_tertinggi = @kd_tertinggi, kd_terendah = @kd_terendah, nilai_tertinggi = @nilai_tertinggi, nilai_terendah = @nilai_terendah, nilaiakhir = @nilaiakhir, predikatketerampilan = @predikatket, deskripsi_keterampilan = @desket, semester = @semester WHERE id_ket = @idket";
            var          args  = new Dictionary <string, object>
            {
                { "@idket", nk.IdKet },
                { "@kd_tertinggi", nk.KdTertinggi },
                { "@kd_terendah", nk.KdTerendah },
                { "@nilai_tertinggi", nk.NilaiTertinggi },
                { "@nilai_terendah", nk.NilaiTerendah },
                { "@nilaiakhir", nk.NilaiAkhir },
                { "@predikatket", nk.PredikatKeterampilan },
                { "@desket", nk.DeskripsiKeterampilan },
                { "@semester", nk.Semester }
            };

            return(isNice = dB.ExecuteWrite(query, args) > 0 ? true : false);
        }
예제 #7
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);
        }
예제 #8
0
        public bool Tambah(NilaiEkskul eks)
        {
            bool     isNice = false;
            RaportDB dB     = new RaportDB();

            const string query = "INSERT INTO nilai_ekskul VALUES(@ideks, @nisn, @ekskul1, @ekskul2, @ekskul3, @nilai1, @nilai2, @nilai3, @semester)";
            var          args  = new Dictionary <string, object>
            {
                { "@ideks", eks.IdEks },
                { "@nisn", eks.Nisn },
                { "@ekskul1", eks.Eskul1 },
                { "@ekskul2", eks.Eskul2 },
                { "@ekskul3", eks.Eskul3 },
                { "@nilai1", eks.Nilai1 },
                { "@nilai2", eks.Nilai2 },
                { "@nilai3", eks.Nilai3 },
                { "@semester", eks.Semester }
            };

            return(isNice = dB.ExecuteWrite(query, args) > 0 ? true : false);
        }
예제 #9
0
        public bool Ubah(NilaiPengetahuan np)
        {
            bool     isNice = false;
            RaportDB dB     = new RaportDB();

            const string query = "UPDATE nilai_pengetahuan SET kd_tertinggi = @kd_tertinggi, kd_terendah = @kd_terendah, nilai_tertinggi = @nilai_tertinggi, nilai_terendah = @nilai_terendah, nilaiakhir = @nilaiakhir, predikatpengetahuan = @predikatpeng, deskripsi_pengetahuan = @despeng, semester = @semester WHERE id_peng = @idpeng";
            var          args  = new Dictionary <string, object>
            {
                { "@idpeng", np.IdPeng },
                { "@kd_tertinggi", np.KdTertinggi },
                { "@kd_terendah", np.KdTerendah },
                { "@nilai_tertinggi", np.NilaiTertinggi },
                { "@nilai_terendah", np.NilaiTerendah },
                { "@nilaiakhir", np.NilaiAkhir },
                { "@predikatpeng", np.PredikatPengetahuan },
                { "@despeng", np.DeskripsiPengetahuan },
                { "@semester", np.Semester }
            };

            return(isNice = dB.ExecuteWrite(query, args) > 0 ? true : false);
        }
예제 #10
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);
        }
예제 #11
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);
        }
예제 #12
0
        public bool Tambah(NilaiKeterampilan nk)
        {
            bool     isNice = false;
            RaportDB dB     = new RaportDB();

            const string query = "INSERT INTO nilai_keterampilan VALUES(@idket, @nisn, @idmapel, @kd_tertinggi, @kd_terendah, @nilai_tertinggi, @nilai_terendah, @nilaiakhir, @predikatket, @desket, @semester)";
            var          args  = new Dictionary <string, object>
            {
                { "@idket", nk.IdKet },
                { "@nisn", nk.Nisn },
                { "@idmapel", nk.IdMapel },
                { "@kd_tertinggi", nk.KdTertinggi },
                { "@kd_terendah", nk.KdTerendah },
                { "@nilai_tertinggi", nk.NilaiTertinggi },
                { "@nilai_terendah", nk.NilaiTerendah },
                { "@nilaiakhir", nk.NilaiAkhir },
                { "@predikatket", nk.PredikatKeterampilan },
                { "@desket", nk.DeskripsiKeterampilan },
                { "@semester", nk.Semester }
            };

            return(isNice = dB.ExecuteWrite(query, args) > 0 ? true : false);
        }
예제 #13
0
        public bool Tambah(NilaiPengetahuan np)
        {
            bool     isNice = false;
            RaportDB dB     = new RaportDB();

            const string query = "INSERT INTO nilai_pengetahuan VALUES(@idpeng, @nisn, @idmapel, @kd_tertinggi, @kd_terendah, @nilai_tertinggi, @nilai_terendah, @nilaiakhir, @predikatpeng, @despeng, @semester)";
            var          args  = new Dictionary <string, object>
            {
                { "@idpeng", np.IdPeng },
                { "@nisn", np.Nisn },
                { "@idmapel", np.IdMapel },
                { "@kd_tertinggi", np.KdTertinggi },
                { "@kd_terendah", np.KdTerendah },
                { "@nilai_tertinggi", np.NilaiTertinggi },
                { "@nilai_terendah", np.NilaiTerendah },
                { "@nilaiakhir", np.NilaiAkhir },
                { "@predikatpeng", np.PredikatPengetahuan },
                { "@despeng", np.DeskripsiPengetahuan },
                { "@semester", np.Semester }
            };

            return(isNice = dB.ExecuteWrite(query, args) > 0 ? true : false);
        }