Esempio n. 1
0
        public void XoaXepLoai(QLKTX.BusinessObject.XepLoaiInfo namhoc)
        {
            com             = new SqlCommand();
            com.CommandText = "Delete XepLoai where MAXEPLOAI=@maso";
            com.Parameters.Add("@maso", SqlDbType.VarChar, 5).Value = namhoc.MaXepLoai;

            ser.Load(com);
        }
Esempio n. 2
0
        public void SuaXepLoai(QLKTX.BusinessObject.XepLoaiInfo xeploai)
        {
            com             = new SqlCommand();
            com.CommandText = "Update XepLoai set TENXEPLOAI = @ten,DIEMCANTREN= @diemCanTren,DIEMCANDUOI=@diemCanDuoi where MAXEPLOAI=@maso";
            com.Parameters.Add("@maso", SqlDbType.VarChar, 5).Value     = xeploai.MaXepLoai;
            com.Parameters.Add("@ten", SqlDbType.NVarChar, 20).Value    = xeploai.TenXepLoai;
            com.Parameters.Add("@diemCanTren", SqlDbType.Decimal).Value = xeploai.DiemCanTren;
            com.Parameters.Add("@diemCanDuoi", SqlDbType.Decimal).Value = xeploai.DiemCanDuoi;

            ser.Load(com);
        }
Esempio n. 3
0
        //////////////
        public void ThemXepLoai(QLKTX.BusinessObject.XepLoaiInfo xeploai)
        {
            SqlCommand com = new SqlCommand();

            com.CommandText = "Insert Into XepLoai(MAXEPLOAI,TENXEPLOAI,DIEMCANTREN,DIEMCANDUOI) values(@maso,@ten,@diemCanTren,@diemCanDuoi)";
            com.Parameters.Add("@maso", SqlDbType.VarChar, 5).Value     = xeploai.MaXepLoai;
            com.Parameters.Add("@ten", SqlDbType.NVarChar, 20).Value    = xeploai.TenXepLoai;
            com.Parameters.Add("@diemCanTren", SqlDbType.Decimal).Value = xeploai.DiemCanTren;
            com.Parameters.Add("@diemCanDuoi", SqlDbType.Decimal).Value = xeploai.DiemCanDuoi;

            ser.Load(com);
        }
        public void Sua(QLKTX.BusinessObject.XepLoaiInfo info)
        {
            XepLoaiData data = new XepLoaiData();

            data.Sua(info);
        }