protected void CardListDataGrid_DeleteCommand(object source, DataGridCommandEventArgs e) { TableCell itemcell = e.Item.Cells[0]; string ids = itemcell.Text; int id = Convert.ToInt32(ids); int iSuccess = CardMethods.DeleteCard(id); if (iSuccess == 1) { Alert.Show(this, "删除成功!"); } else { Alert.Show(this, "删除失败!"); } if (queryList == null) { queryList = new List <QueryElement>(); } BindDataGrid(queryList); }