Пример #1
0
        void populateUsersGridView()
        {
            /* UsersGridView.DataSource = null;
            UsersGridView.DataBind();*/

            Repositorio repo = new Repositorio();

            if (!(Roles.IsUserInRole("administrador")) && !(Roles.IsUserInRole("admin_regional")))
                UsersGridView.DataSource = repo.UsuarioPorRolEInstalacion(RolesDropDown.SelectedValue, Convert.ToInt32(repo.ObtenerIdInstalacionPorNombreUsuario(User.Identity.Name).Tables[0].Rows[0].ItemArray[0]));
            else
                UsersGridView.DataSource = repo.UsuarioPorRolEInstalacion(RolesDropDown.SelectedValue, Convert.ToInt32 (instalacionDropDown.SelectedValue) );
            //UsersGridView.DataSource = Roles.GetUsersInRole(RolesDropDown.SelectedValue);
            UsersGridView.DataBind();
        }