예제 #1
0
 public int Update(NamHocDTO Dt)
 {
     string sql = "update NAMHOC set NamHoc=@NamHoc where MaNam=@MaNam";
     SqlParameter[] sp = new SqlParameter[2];
     sp[0] = new SqlParameter("@MaNam", Dt.MaNam);
     sp[1] = new SqlParameter("@NamHoc", Dt.Ten_NamHoc);
     return conectData.Insert_Update_Delete(sql, sp);
 }
예제 #2
0
 public int Insert(NamHocDTO Dt)
 {
     string sql = "insert into NAMHOC values (@MaNam,@NamHoc)";
     SqlParameter[] sp = new SqlParameter[2];
     sp[0] = new SqlParameter("@MaNam", Dt.MaNam);
     sp[1] = new SqlParameter("@NamHoc", Dt.Ten_NamHoc);
     return conectData.Insert_Update_Delete(sql, sp);
 }