示例#1
0
        protected void btnEliminar_Click(object sender, EventArgs e)
        {
            Rol           rol   = new Rol(int.Parse(BuscarCod.Text));
            MuchosAMuchos ro_pe = new MuchosAMuchos();



            foreach (ListItem item in Permisos.Items)
            {
                if (item.Selected)
                {
                    ro_pe.Eliminar(new Permiso(int.Parse(item.Value)), rol);
                }
            }

            ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('los permisos han sido eliminados exitosamente');" + "window.location ='Role_Admin.aspx';", true);
        }