Пример #1
0
        //ham xoa DiemHP
        public bool XoaDiemHP(DiemHP dhp)
        {
            string sql = "delete DiemHP where maDK = @maDK";

            SqlParameter[] sqlParameters =
            {
                new SqlParameter("@maDK", dhp.maDK)
            };
            return(dal.myExecute(sql, sqlParameters));
        }
Пример #2
0
        //ham sua DiemHP
        public bool SuaDiemHP(DiemHP dhp)
        {
            string sql = "Update DiemHP set diemCC = @diemCC, diemTX = @diemTX, diemThi = @diemThi, diemHP = @diemHP, ghiChu = @ghiChu where maDK = @maDK";

            SqlParameter[] sqlParameters =
            {
                new SqlParameter("@maDK",    dhp.maDK),
                new SqlParameter("@diemCC",  dhp.diemCC),
                new SqlParameter("@diemTX",  dhp.diemTX),
                new SqlParameter("@diemThi", dhp.diemThi),
                new SqlParameter("@diemHP",  dhp.diemHP),
                new SqlParameter("@ghiChu",  dhp.ghiChu)
            };
            return(dal.myExecute(sql, sqlParameters));
        }
Пример #3
0
        //ham them Diem HP
        public bool ThemDiemHP(DiemHP dhp)
        {
            string sql = "insert into DiemHP(maDK, diemCC, diemTX, diemThi, diemHP, ghiChu)" + "values (@maDK, @diemCC, @diemTX, @diemThi, @diemHP, @ghiChu)";

            SqlParameter[] sqlParameters =
            {
                new SqlParameter("@maDK",    dhp.maDK),
                new SqlParameter("@diemCC",  dhp.diemCC),
                new SqlParameter("@diemTX",  dhp.diemTX),
                new SqlParameter("@diemThi", dhp.diemThi),
                new SqlParameter("@diemHP",  dhp.diemHP),
                new SqlParameter("@ghiChu",  dhp.ghiChu)
            };
            return(dal.myExecute(sql, sqlParameters));
        }