public string delIdnumber(string Idnumber) { ConnDB conns = new ConnDB(); string cnt = conns.getHotlinkcnt(); string str1 = "delete from HotLink where Idnumber = '" + Idnumber + "'"; string del = RunSqlStr(str1, ""); int total = int.Parse(cnt) - int.Parse(Idnumber); for (int i = 0; i < total; i++) { //0 23 22 1 24 23 2 25 24 string str2 = "update HotLink set Idnumber ='" + (int.Parse(Idnumber) + i).ToString() + "' where Idnumber ='" + (int.Parse(Idnumber) + 1 + i).ToString() + "'"; RunSqlStr(str2, ""); } return(del); }