Пример #1
0
 public int Insert(HocSinh_LenCapDTO Hs_lc)
 {
     string sql = "insert into HOCSINH_LENCAP values (@MaHS_LC,@MaHS,@DTB,@HanhKiem, @DaPhanLop)";
     SqlParameter[] sp = new SqlParameter[5];
     sp[0] = new SqlParameter("@MaHS_LC", Hs_lc.MaHS_LC);
     sp[1] = new SqlParameter("@MaHS", Hs_lc.MaHS);
     sp[2] = new SqlParameter("@DTB", Hs_lc.DTB.ToString());
     sp[3] = new SqlParameter("@HanhKiem", Hs_lc.HanhKiem);
     sp[4] = new SqlParameter("@DaPhanLop", Hs_lc.DaPhanLop);
     return conectData.Insert_Update_Delete(sql, sp);
 }
Пример #2
0
 public int Update(HocSinh_LenCapDTO Hs_lc)
 {
     string sql = "update HOCSINH_LENCAP set MaHS=@MaHS,DTB=@DTB,HanhKiem=@HanhKiem, DaPhanLop = @DaPhanLop where MaHS_LC=@MaHS_LC";
     SqlParameter[] sp = new SqlParameter[5];
     sp[0] = new SqlParameter("@MaHS_LC", Hs_lc.MaHS_LC);
     sp[1] = new SqlParameter("@MaHS", Hs_lc.MaHS);
     sp[2] = new SqlParameter("@DTB", Hs_lc.DTB);
     sp[3] = new SqlParameter("@HanhKiem", Hs_lc.HanhKiem);
     sp[4] = new SqlParameter("@DaPhanLop", Hs_lc.DaPhanLop);
     return conectData.Insert_Update_Delete(sql, sp);
 }