Пример #1
0
        public int Update(CTDiem ctd)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MACTDIEM, SqlDbType.Int),
                new SqlParameter(PARM_MABANGDIEM, SqlDbType.Int),
                new SqlParameter(PARM_MAHOCSINH, SqlDbType.Int),
                new SqlParameter(PARM_MAMONHOC, SqlDbType.Int),
                new SqlParameter(PARM_MALOAIDIEM, SqlDbType.Int),
                new SqlParameter(PARM_DIEM, SqlDbType.Int),
                new SqlParameter(PARM_DIEMTBMON, SqlDbType.Float),
                new SqlParameter(PARM_MAGIAOVIEN, SqlDbType.Int),
            };

            parm[0].Value = ctd.Mactdiem;
            parm[1].Value = ctd.Mabangdiem;
            parm[2].Value = ctd.Mahocsinh;
            parm[3].Value = ctd.Mamonhoc;
            parm[4].Value = ctd.Maloaidiem;
            parm[5].Value = ctd.Diem;
            parm[6].Value = ctd.Diemtbmon;
            parm[7].Value = ctd.Magiaovien;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_CTDiem_Upd", parm));
        }
Пример #2
0
        public int Update(Diem d)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MABANGDIEM, SqlDbType.Int),
                new SqlParameter(PARM_MALOP, SqlDbType.Int),
                new SqlParameter(PARM_MAHOCSINH, SqlDbType.Int),
                new SqlParameter(PARM_KIHOC, SqlDbType.Int),
                new SqlParameter(PARM_NAMHOC, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_DIEMTB, SqlDbType.Float),
                new SqlParameter(PARM_HANHKIEM, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_HOCLUC, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_DANHHIEU, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_MAGIAOVIEN, SqlDbType.Int),
            };
            parm[0].Value = d.Mabangdiem;
            parm[1].Value = d.Malop;
            parm[2].Value = d.Mahocsinh;
            parm[3].Value = d.Kihoc;
            parm[4].Value = d.Namhoc;
            parm[5].Value = d.Diemtb;
            parm[6].Value = d.Hanhkiem;
            parm[7].Value = d.Hocluc;
            parm[8].Value = d.Danhhieu;
            parm[9].Value = d.Magiaovien;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_Diem_Upd", parm));
        }
Пример #3
0
        public int Delete(int makhoihoc)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MAKHOIHOC, SqlDbType.Int)
            };
            parm[0].Value = makhoihoc;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_KhoiHoc_Del", parm));
        }
Пример #4
0
        public int Insert(KhoiHoc kh)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_TENKHOIHOC, SqlDbType.NVarChar, 20)
            };
            parm[0].Value = kh.Tenkhoihoc;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_KhoiHoc_Insert", parm));
        }
Пример #5
0
        public int Delete(int magiaovien)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MAGIAOVIEN, SqlDbType.Int)
            };
            parm[0].Value = magiaovien;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_GiaoVien_Del", parm));
        }
Пример #6
0
        public int Delete(int maloaidiem)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MALOAIDIEM, SqlDbType.Int)
            };
            parm[0].Value = maloaidiem;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_LoaiDiem_Del", parm));
        }
Пример #7
0
        public int Delete(int mahocsinh)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MAHOCSINH, SqlDbType.Int)
            };
            parm[0].Value = mahocsinh;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_HocSinh_Del", parm));
        }
Пример #8
0
        public int Insert(MonHoc mh)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_TENMONHOC, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_SOTIET, SqlDbType.Int),
            };

            parm[0].Value = mh.Tenmonhoc;
            parm[1].Value = mh.Sotiet;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_MonHoc_Insert", parm));
        }
Пример #9
0
        public int Update(LoaiDiem ld)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MALOAIDIEM, SqlDbType.Int),
                new SqlParameter(PARM_TENLOAIDIEM, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_HESO, SqlDbType.Int),
            };
            parm[0].Value = ld.Maloaidiem;
            parm[1].Value = ld.Tenloaidiem;
            parm[2].Value = ld.Heso;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_LoaiDiem_Upd", parm));
        }
Пример #10
0
        public int Update(LopHoc l)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MALOP, SqlDbType.Int),
                new SqlParameter(PARM_TENLOP, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_MAKHOI, SqlDbType.Int),
                new SqlParameter(PARM_MAGIAOVIEN, SqlDbType.Int),
                new SqlParameter(PARM_SISO, SqlDbType.Int),
            };
            parm[0].Value = l.Malop;
            parm[1].Value = l.Tenlop;
            parm[2].Value = l.Makhoihoc;
            parm[3].Value = l.Magiaovien;
            parm[4].Value = l.Siso;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_LopHoc_Upd", parm));
        }
Пример #11
0
        public int Update(GiaoVien gv)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MAGIAOVIEN, SqlDbType.Int),
                new SqlParameter(PARM_TENGIAOVIEN, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_NGAYSINH, SqlDbType.DateTime),
                new SqlParameter(PARM_GIOITINH, SqlDbType.NVarChar, 3),
                new SqlParameter(PARM_QUEQUAN, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_SODT, SqlDbType.NVarChar, 11),
                new SqlParameter(PARM_SOCMND, SqlDbType.NVarChar, 11),
            };
            parm[0].Value = gv.Magiaovien;
            parm[1].Value = gv.Tengiaovien;
            parm[2].Value = gv.Ngaysinh;
            parm[3].Value = gv.Gioitinh;
            parm[4].Value = gv.Quequan;
            parm[5].Value = gv.Sodienthoai;
            parm[6].Value = gv.Socmnd;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_GiaoVien_Upd", parm));
        }
Пример #12
0
        public int Insert(HocSinh hs)
        {
            SqlParameter[] parm = new SqlParameter[]
            {
                new SqlParameter(PARM_MALOP, SqlDbType.Int),
                new SqlParameter(PARM_TENHOCSINH, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_NGAYSINH, SqlDbType.DateTime),
                new SqlParameter(PARM_GIOITINH, SqlDbType.NVarChar, 3),
                new SqlParameter(PARM_QUEQUAN, SqlDbType.NVarChar, 20),
                new SqlParameter(PARM_SODT, SqlDbType.NVarChar, 11),
                new SqlParameter(PARM_SOCMND, SqlDbType.NVarChar, 11),
            };

            parm[0].Value = hs.Malop;
            parm[1].Value = hs.Tenhocsinh;
            parm[2].Value = hs.Ngaysinh;
            parm[3].Value = hs.Gioitinh;
            parm[4].Value = hs.Quequan;
            parm[5].Value = hs.Sodienthoai;
            parm[6].Value = hs.Socmnd;

            return(DataAccessHelper.ExecuteNonQuery(DataAccessHelper.ConnectionString, CommandType.StoredProcedure, "tbl_HocSinh_Insert", parm));
        }