111,126
社区成员
发帖
与我相关
我的任务
分享
string IdList = string.Empty;
foreach(DataGridViewRow row in this.grid.SelectedRows)
{
IdList += row.Cells["Id"].Value.ToString()+",";
}
IdList = IdList.TrimEnd(",");
if(!string.IsNullOrEmpty(IdList))
{
//执行删除
if(ExecuteSql(string.Format("delete Table where Id in ('{0}')",IdList))>0)
{
//重新加载数据
LoadGrid();
}
}