public void RemoveRoleButton_Click(object sender, System.EventArgs e) { int currentRole = Convert.ToInt32(lblRoleID.Text); Role bizRole = new Role(currentRole); bizRole.Delete(); Server.Transfer("RoleAdmin.aspx"); }
public void RemoveRoleButton_Click(object sender, System.EventArgs e) { if (ReservedRoleIDs.Contains(lblRoleID.Text)) { Maticsoft.Common.MessageBox.Show(this,"该角色为系统保留角色,不能删除!"); return; } int currentRole = Convert.ToInt32(lblRoleID.Text); Role bizRole = new Role(currentRole); bizRole.Delete(); Server.Transfer("RoleAdmin.aspx"); }