Exemplo n.º 1
0
 public void Init()
 {
     ListPerfil.Clear();
     _service         = new SPVNServicesClient();
     this.IsBusy      = true;
     this.StateAction = "Recopilando Información";
     _service.SeleccionarTodosPerfilAsync();
     _service.SeleccionarTodosPerfilCompleted += new System.EventHandler <SeleccionarTodosPerfilCompletedEventArgs>(permisoService_SeleccionarTodosPerfilCompleted);
 }
Exemplo n.º 2
0
        public AdminUsuarioForm()
        {
            InitializeComponent();
            ConsumeWebApi consume = new ConsumeWebApi();
            //cargar combos de Perfils.
            ListPerfil listaPerfil = consume.getPerfilesUsuario();
            PerfilVO   p           = new PerfilVO();

            p.id_perfil = 0;
            p.perfil    = "--- Seleccione Perfil ---";
            cboTipoPerfil.Items.Add(p);
            foreach (var item in listaPerfil.items)
            {
                cboTipoPerfil.Items.Add(item);
            }
            cboTipoPerfil.ValueMember   = "id_perfil";
            cboTipoPerfil.DisplayMember = "perfil";
            cboTipoPerfil.SelectedIndex = 0;

            //cargar combos de Pilotos.
            List <PilotoVO> listPilotos = consume.getPilotosCombo();
            PilotoVO        pi          = new PilotoVO();

            pi.id_piloto = 0;
            pi.nombre    = "--- Seleccione Instructor ---";
            cboPiloto.Items.Add(pi);
            foreach (var item in listPilotos)
            {
                cboPiloto.Items.Add(item);
            }
            cboPiloto.ValueMember   = "id_piloto";
            cboPiloto.DisplayMember = "nombre";
            cboPiloto.SelectedIndex = 0;
            fecVencMae.Enabled      = true;
            btnEliminar.Enabled     = false;
            btnModificar.Enabled    = false;
        }