private void DeleteListRow(int iRowIndex) { UserGroupInfo group = GetListRowModel(iRowIndex); if (group == null) { return; } if (MessageBox.Show(string.Format("是否确认删除用户组【{0}】?", group.UserGroupName), "确认删除", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk) == DialogResult.No) { return; } try { if (group.IsDel != 2) { string strErr = string.Empty; if (!Basic_Func.DeleteUserGroupByID(group, ref strErr)) { Common.Common_Func.ErrorMessage(strErr, "删除失败"); return; } } Common.Common_Func.ErrorMessage("删除用户组成功", "删除成功"); } catch (Exception ex) { Common.Common_Func.ErrorMessage(ex.Message); } finally { GetListQueryData(); } }