Exemplo n.º 1
0
 public int Insert(HocKyDTO Hk)
 {
     string sql = "insert into HOCKY values (@MaHK,@HocKy,@MaNam)";
     SqlParameter[] sp = new SqlParameter[3];
     sp[0] = new SqlParameter("@MaHK", Hk.MaHK);
     sp[1] = new SqlParameter("@HocKy", Hk.Ten_HocKy);
     sp[2] = new SqlParameter("@MaNam", Hk.MaNam);
     return conectData.Insert_Update_Delete(sql, sp);
 }
Exemplo n.º 2
0
 public int Update(HocKyDTO Hk)
 {
     string sql = "update HOCKY set HocKy=@HocKy,MaNam=@MaNam where MaHK=@MaHK";
     SqlParameter[] sp = new SqlParameter[3];
     sp[0] = new SqlParameter("@MaHK", Hk.MaHK);
     sp[1] = new SqlParameter("@HocKy", Hk.Ten_HocKy);
     sp[2] = new SqlParameter("@MaNam", Hk.MaNam);
     return conectData.Insert_Update_Delete(sql, sp);
 }