public static List<int> GetAllIDBySql(string strSql)
{
List<int> lst = new List<int>();
DataSet ds = SqlHelper.ExecuteDataset(SqlHelper.ConnString, CommandType.Text, strSql);
if (ds.Tables[0].Rows.Count > 0)
{
if (ds.Tables[0].Columns.Contains("ID"))
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
lst.Add(int.Parse(dr["ID"].ToString()));
}
}
}
return lst;
}