public ModificacionRol(String nombre)
        {
            InitializeComponent();
            this.selectedRolName = nombre;
            this.home = new HomeRoles();
            this.selectedRol = home.getRol(this.selectedRolName);

            this.fill();
        }
Exemple #2
0
        private void setCiudadesAlUsuario(User usuario)
        {
            DataAccess.SPManager spManager = new DataAccess.SPManager();

            Dictionary<String, Object> param = new Dictionary<String, Object>();
            param.Add("nombre_usuario", usuario.DatosLogin.UserName);
            using (SqlDataReader reader = spManager.executeSPWithParameters("MR_ANDERSON.sp_get_ciudades", param))
            {
                reader.Read();
                HomeRoles home = new HomeRoles();
                usuario.Rol = home.getRol((String)reader["rol"]);
            }

            spManager.Close();
        }
Exemple #3
0
        public void setRolesAlUsuario(User usuario)
        {
            DataAccess.SPManager spManager = new DataAccess.SPManager();

            Dictionary<String, Object> param = new Dictionary<String, Object>();
            param.Add("nombre_usuario", usuario.DatosLogin.UserName);
            try
            {
                SqlDataReader reader = spManager.executeSPWithParameters("MR_ANDERSON.get_nombre_rol_de_usuario", param);
                reader.Read();
                HomeRoles home = new HomeRoles();
                usuario.Rol = home.getRol((String)reader["rol"]);
            }
            catch
            {
            }

            spManager.Close();
        }