日期:2014-05-17 浏览次数:20460 次
public int deleteByKey(String key)
{
int flag = 0;
string str ="";
deleteimg delimg = new deleteimg();
try
{
key = key.Replace(",", "','");
StringBuilder sql = new StringBuilder();//删除书的信息
sql.Append(" delete from BS_BookInfo where ");
sql.Append(" ID in ('").Append(key).Append("') ");
flag = DbHelperSQL.ExecuteSql(sql.ToString());
StringBuilder sqlst = new StringBuilder();//删除书的库存的信息
sqlst.Append(" delete from BS_StockInfo where ");
sqlst.Append(" BOOK_ID in ('").Append(key).Append("') ");
flag = DbHelperSQL.ExecuteSql(sql.ToString());
}
catch (Exception e)
{
throw e;
}
return flag;
}