Пример #1
0
        private async void ActividadesLoad(ActividadesView obj)
        {
            try
            {
                await StaticSourcesViewModel.CargarDatosMetodoAsync(() =>
                {
                    MenuGuardarEnabled = false;
                    MenuBuscarEnabled  = true;
                    MenuLimpiarEnabled = true;
                    MenuReporteEnabled = false;
                    MenuAyudaEnabled   = true;
                    MenuSalirEnabled   = true;
                    ObtenerAreas();
                    ObtenerActividades();
                    ///DESCOMENTAR EN CASO DE OCUPAR CONFIGURAR PRIVILEGIOS
                    //ConfiguraPermisos();
                });

                StaticSourcesViewModel.Mensaje("NOTA", "Para marcar asistencia de los internos, haga clic en 'Toma de asistencia'.", StaticSourcesViewModel.enumTipoMensaje.MENSAJE_INFORMACION, 5);
            }
            catch (Exception ex)
            {
                StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar las actividades.", ex);
            }
        }
 //LOAD
 private async void ActividadesLoad(ActividadesView obj)
 {
     try
     {
         await StaticSourcesViewModel.CargarDatosMetodoAsync(() =>
         {
             EmptyVisible = false;
             //Listado
             ListItems      = new ObservableCollection <ACTIVIDAD>();
             CatalogoHeader = "Actividad";
             HeaderAgregar  = "Agregar Actividades";
             //LLENAR
             EditarVisible       = false;
             NuevoVisible        = false;
             AgregarVisible      = false;
             GuardarMenuEnabled  = false;
             EliminarMenuEnabled = false;
             EditarMenuEnabled   = false;
             CancelarMenuEnabled = false;
             AyudaMenuEnabled    = true;
             SalirMenuEnabled    = true;
             ExportarMenuEnabled = true;
             /*MAXLENGTH*/
             SeleccionIndice = -1;
             //Obtenemos las celdas
             this.GetActividades();
             this.setValidationRules();
             ConfiguraPermisos();
             StaticSourcesViewModel.SourceChanged = false;
         });
     }
     catch (Exception ex)
     {
         StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar las actividades.", ex);
     }
 }