private async void ConfiguracionDepartamentoAreaTecnicaLoad(object parametro) { ConfiguraPermisos(); await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { CargarAreasTecnicas(true); }); }
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); } }
private async void ClickSwitch(object obj) { try { switch (obj.ToString()) { case "generar": if (!pConsultar) { ReportViewerVisible = Visibility.Collapsed; new Dialogos().ConfirmacionDialogo("Validación", "Su usuario no tiene privilegios para realizar esta acción"); break; } ReportViewerVisible = Visibility.Collapsed; await StaticSourcesViewModel.CargarDatosMetodoAsync(GenerarReporteQuery); ReportViewerVisible = Visibility.Visible; break; } } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error...", ex); } }
public async void OnLoad(ReporteCredencialBiblioteca Window) { Ventana = Window; Reporte = Ventana.ReportCredencialBiblioteca; try { ConfiguraPermisos(); ReportViewerVisible = Visibility.Collapsed; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { BusquedaAvanzadaChecked = false; ObtenerEdificios(); ListaIngresos = new List <cCredencialBiblioteca>(); ListaIngresosSeleccionados = new List <cCredencialBiblioteca>(); EmptyVisible = EmptySeleccionadosVisible = true; var placeholder = new Imagenes().getImagenPerson(); FotoIngreso = placeholder; FotoCentro = placeholder; Pagina = 1; }); ReportViewerVisible = Visibility.Visible; } catch (Exception ex) { throw new ApplicationException(ex.Message); } }
public async void OnLoad(ReporteBitacoraCorrespondenciaPoblacionPenitenciaria Window) { try { ConfiguraPermisos(); Ventana = Window; Reporte = Ventana.ReportBitacoraCorrespondenciaPoblacionPenitenciaria; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Collapsed; })); SelectedFecha = Fechas.GetFechaDateServer; Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Visible; })); }); } catch (Exception ex) { throw new ApplicationException(ex.Message); } }
private async System.Threading.Tasks.Task SeleccionarPersona(SSP.Servidor.PERSONA persona) { try { var tipoP = SelectTipoPersona.HasValue ? SelectTipoPersona.Value : new int?(); if (tipoP > 0) { SelectTipoPersona = tipoP; SelectPersona = persona; CodigoEnabled = NombreReadOnly = false; GeneralEnabled = ValidarEnabled = DiscapacitadoEnabled = true; await StaticSourcesViewModel.CargarDatosMetodoAsync(async() => { SelectPersona = persona; await GetDatosPersonaSeleccionada(EntradaEnabled); StaticSourcesViewModel.SourceChanged = false; }); PopUpsViewModels.ClosePopUp(PopUpsViewModels.TipoPopUp.AGREGAR_ESPECIALISTAS); } else { (new Dialogos()).ConfirmacionDialogo("Advertencia!", "La persona seleccionada no cuenta con un registro correcto."); return; } } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al buscar por huella.", ex); } }
private async Task Guardar() { try { var obj = new ESPECIALIDAD { ID_ESPECIALIDAD = SelectedItem != null?SelectedItem.ID_ESPECIALIDAD:(short)0, DESCR = TextEspecialidad, ESTATUS = SelectedEstatus.CLAVE }; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { if (!Bandera_Agregar) { new cEspecialidades().Actualizar(obj); Bandera_Agregar = true; } else { new cEspecialidades().Insertar(obj); } }); new Dialogos().ConfirmacionDialogo("Éxito", "La información se guardo correctamente."); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al guardar la especialidad.", ex); } }
private async void OnModelChangedSwitch(object parametro) { if (parametro != null) { switch (parametro.ToString()) { case "cambio_expediente": if (SelectExpediente != null && (SelectExpediente.INGRESO == null || SelectExpediente.INGRESO.Count == 0)) { await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { selectExpediente = new cImputado().Obtener(selectExpediente.ID_IMPUTADO, selectExpediente.ID_ANIO, selectExpediente.ID_CENTRO).First(); RaisePropertyChanged("SelectExpediente"); }); if (selectExpediente.INGRESO != null && selectExpediente.INGRESO.Count > 0) { EmptyIngresoVisible = false; SelectIngreso = selectExpediente.INGRESO.OrderByDescending(o => o.ID_INGRESO).FirstOrDefault(); } else { EmptyIngresoVisible = true; SelectIngreso = null; } } break; } } }
private async Task Guardar() { try { var obj = new INTERCONSULTA_ATENCION_TIPO { ID_INTERAT = SelectedItem != null ? SelectedItem.ID_INTERAT : (short)0, DESCR = TextTipoAtencion, ESTATUS = SelectedEstatus.CLAVE, CATALOGO_ESPECIALIDADES = CheckedEspecialidades?"1":"0", CATALOGO_SERVICIOS_ESP = CheckedTiposServAux?"1":"0" }; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { if (!Bandera_Agregar) { new cInterconsultaAtencionTipo().Actualizar(obj); Bandera_Agregar = true; } else { new cInterconsultaAtencionTipo().Insertar(obj); } }); new Dialogos().ConfirmacionDialogo("Éxito", "La información se guardo correctamente."); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al guardar el tipo de atencion de interconsulta.", ex); } }
public async void ClickSwitch(object obj) { switch (obj.ToString()) { case "GenerarReporte": if (!pConsultar) { ReportViewerVisible = Visibility.Collapsed; new Dialogos().ConfirmacionDialogo("Validación", "Su usuario no tiene privilegios para realizar esta acción"); break; } Reporte.Reset(); await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Collapsed; })); GenerarReporte(); Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Visible; })); }); break; } }
public async void OnLoad(ReporteRelacionInternoAbogadoView Window) { try { ConfiguraPermisos(); Ventana = Window; CrearNuevoExpedienteEnabled = false; estatus_inactivo = Parametro.ESTATUS_ADMINISTRATIVO_INACT; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Collapsed; })); Reporte = Ventana.Report; TextBotonSeleccionarIngreso = "Generar Reporte"; Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Visible; })); }); } catch (Exception ex) { throw new ApplicationException(ex.Message); } }
public async void OnLoad(ReporteFormatoIdentificacion Window) { ConfiguraPermisos(); Ventana = Window; Reporte = Ventana.Report; AnioBuscarImputado = FolioBuscarImputado = NombreBuscarImputado = PaternoBuscarImputado = MaternoBuscarImputado = string.Empty; try { await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Collapsed; })); ListaIngresos = new List <cFormatoIdentificacion>(); ListaIngresosSeleccionados = new List <cFormatoIdentificacion>(); EmptyVisible = EmptySeleccionadosVisible = true; var placeholder = new Imagenes().getImagenPerson(); FotoIngreso = placeholder; FotoCentro = placeholder; Pagina = 1; Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Visible; })); }); } catch (Exception ex) { throw new ApplicationException(ex.Message); } }
private async Task Guardar() { try { var obj = new SERVICIO_AUX_DIAG_TRAT { ID_SERV_AUX = SelectedItem != null?SelectedItem.ID_SERV_AUX:(short)0, ID_SUBTIPO_SADT = SelectedSubtipoServAux, DESCR = TextServAux, ESTATUS = SelectedEstatus.CLAVE }; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { if (!Bandera_Agregar) { new cServ_Aux_Diag_Trat().Actualizar(obj); Bandera_Agregar = true; } else { new cServ_Aux_Diag_Trat().Insertar(obj); } }); new Dialogos().ConfirmacionDialogo("Éxito", "La información se guardo correctamente."); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al guardar el servicio auxiliar.", ex); } }
private async void Guardar() { try { var _departamento_area_tecnica = new DEPARTAMENTO_AREA_TECNICA { ID_DEPARTAMENTO = SelectedDepartamentoValue, ID_TECNICA = selectedAreaValue, REGISTRO_FEC = Fechas.GetFechaDateServer }; if (await StaticSourcesViewModel.OperacionesAsync <bool>("GUARDANDO CONFIGURACIÓN", () => { new cDepartamentoAreaTecnica().Guardar(_departamento_area_tecnica); return(true); })) { await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { CargarDepartamentosConfigurados(selectedArea.ID_TECNICA, true); }); StaticSourcesViewModel.SourceChanged = false; new Dialogos().ConfirmacionDialogo("EXITO!", "La configuración ha sido guardada"); IsAgregarConfiguracionVisible = Visibility.Collapsed; } } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al guardar la configuración", ex); } }
private async void ClickEnter(Object obj) { try { if (obj != null) { //cuando es boton no se hace nada porque solamente existe el de buscar, si hay otro habra que castearlos a button y hacer la comparacion var textbox = obj as TextBox; if (textbox != null) { switch (textbox.Name) { case "buscar": Buscar = textbox.Text; break; } } } if (!string.IsNullOrEmpty(Buscar)) { SearchByName(Buscar); } else { await StaticSourcesViewModel.CargarDatosMetodoAsync(CargarDelitos); } } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al ingresar búsqueda", ex); } }
private async void SwitchClick(Object obj) { switch (obj.ToString()) { case "buscar": LimpiarBusqueda(); ReportViewerVisible = Visibility.Collapsed; PopUpsViewModels.ShowPopUp(this, PopUpsViewModels.TipoPopUp.BUSQUEDA); break; case "nueva_busqueda": LimpiarBusqueda(); break; case "buscar_salir": PopUpsViewModels.ClosePopUp(PopUpsViewModels.TipoPopUp.BUSQUEDA); ReportViewerVisible = Visibility.Visible; LimpiarBusqueda(); break; case "buscar_seleccionar": if (SelectIngreso != null) { PopUpsViewModels.ClosePopUp(PopUpsViewModels.TipoPopUp.BUSQUEDA); ReportViewerVisible = Visibility.Visible; await StaticSourcesViewModel.CargarDatosMetodoAsync(GenerarReporte); } else { new Dialogos().ConfirmacionDialogo("Validación", "Favor de seleccionar un ingreso"); } break; } }
private async void Buscar() { try { await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { LstEspecialistas = new System.Collections.ObjectModel.ObservableCollection <SSP.Servidor.ESPECIALISTA>(new SSP.Controlador.Catalogo.Justicia.cEspecialistas().GetData(x => x.ID_ESPECIALIDAD == SelectedEspecialidadBusqueda)); RaisePropertyChanged("LstEspecialistas"); if (LstEspecialistas == null || LstEspecialistas.Count == 0) { emptyVisible = true; } else { emptyVisible = false; } RaisePropertyChanged("EmptyVisible"); }); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al consultar los especialistas.", ex); } }
private async Task Guardar() { try { var obj = new ACTIVIDAD_EJE { ID_ACTIVIDAD = selectedActividad.ID_ACTIVIDAD, ID_TIPO_PROGRAMA = selectedActividad.ID_TIPO_PROGRAMA, ID_EJE = SelectedEje, FECHA = Fechas.GetFechaDateServer, ESTATUS = SelectedEstatus.CLAVE }; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { if (!Bandera_Agregar) { new cActividadEje().Actualizar(obj); Bandera_Agregar = true; } else { new cActividadEje().Insertar(obj); } }); new Dialogos().ConfirmacionDialogo("Éxito", "La información se guardo correctamente."); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al guardar la actividad del eje.", ex); } }
private async void PageLoad(CatalogoEspecialidadesView Window = null) { try { await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { _listItems = new ObservableCollection <ESPECIALIDAD>(new cEspecialidades().ObtenerTodos(string.Empty, null)); RaisePropertyChanged("ListItems"); _lista_Estatus.LISTA_ESTATUS.Insert(0, new Estatus { CLAVE = "-1", DESCRIPCION = "SELECCIONE" }); RaisePropertyChanged("Lista_Estatus"); if (_listItems == null || _listItems.Count == 0) { emptyVisible = true; RaisePropertyChanged("EmptyVisible"); } //LLENAR GuardarMenuEnabled = false; EditarMenuEnabled = false; AgregarMenuEnabled = true; SelectedEstatus = Lista_Estatus.LISTA_ESTATUS.FirstOrDefault(w => w.CLAVE == "-1"); ConfiguraPermisos(); }); setValidaciones(); StaticSourcesViewModel.SourceChanged = false; } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar información.", ex); } }
/// <summary> /// Método para refrescar la ventana y realizar la búsqueda de traslados y excarcelaciones, actualizando y consultando /// cualquier cambio en la información. /// </summary> public async void RefrescarVentana()///===CHECK=== { await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { //Se obtiene la imagen que se muestra por defecto para la foto de los internos var placeholder = new Imagenes().getImagenPerson(); //Se obtienen las excarcelaciones y traslados existentes ObtenerExcarcelaciones(); ObtenerTraslados(); //Se inicializa el traslado seleccionado SelectedTraslado = null; //Se inicializa la lista de internos referentes a un traslado ListaTrasladosDetalle = new List <InternoTrasladoDetalle>(); //Se inicializa el ingreso seleccionado SelectedIngreso = null; //Se inicializan las excarcelaciones médicas y jurídicas a una lista nueva sin elementos ListaExcarcelacionesMedicas = new List <EXCARCELACION>(); ListaExcarcelacionesJuridicas = new List <EXCARCELACION>(); //Se inicializa la lista de destinos de la excarcelacion seleccionada a una lista nueva sin elementos ListaDestinos = new List <Destino>(); //Se inicializan las fotos de muestra del imputado tanto en excarcelaciones como en traslados FotoImputadoTraslado = placeholder; FotoImputadoExcarcelacion = placeholder; }); }
public async void OnLoad(ReporteTotalIngresos Window) { try { ConfiguraPermisos(); Ventana = Window; Reporte = Ventana.Report; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Collapsed; })); SelectedFechaInicial = Fechas.GetFechaDateServer; SelectedFechaFinal = Fechas.GetFechaDateServer; Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Visible; })); }); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar la pantalla", ex); } }
/// <summary> /// Inicializa las propiedades requeridas por el módulo por medio del evento "Loaded" /// </summary> /// <param name="obj">Ventana de la cuál se van a inicializar las propiedades requeridas por el módulo</param> public async void CargarVentana(ActividadesNoProgramadasView obj) ///===CHECK=== { try { await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { //Se configuran los permisos del módulo ConfiguraPermisos(); //Se obtiene la imagen por defecto var placeholder = new Imagenes().getImagenPerson(); //Se inicializan las imágenes a mostrar de los imputados en la imágen por defecto FotoImputadoTraslado = placeholder; FotoImputadoExcarcelacion = placeholder; SelectedEstatusTraslado = enumEstatusTraslado.EN_PROCESO; SelectedEstatusExcarcelacion = enumEstatusExcarcelacion.EN_PROCESO; EstatusTrasladosVisible = true; EstatusExcarcelacionesVisible = false; if (PConsultar) { ObtenerTraslados(); ObtenerExcarcelaciones(); } }); } //Si ocurrió un error al cargar la ventana, entonces... catch (Exception ex) { //Se le nofitica al usuario que ocurrió un error StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar el módulo.", ex); } }
public async void ObtenerSectores() { Sectores = new List <SECTOR>(); Sectores.Add(new SECTOR() { ID_SECTOR = TODOS_LOS_SECTORES, DESCR = "TODOS" }); SelectedSector = Sectores.FirstOrDefault(); await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Collapsed; })); if (SelectedEdificio.ID_EDIFICIO != TODOS_LOS_EDIFICIOS) { Sectores.AddRange(new cSector().ObtenerTodos(null, null, GlobalVar.gCentro, SelectedEdificio.ID_EDIFICIO).ToList()); } else { Sectores.RemoveRange(1, Sectores.Count - 1); } Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Visible; })); }); }
public async void CatalogoMedicamento_CategoriasLoad(CatalogoMedicamento_SubcategoriasView Window = null) { try { tbSubcategoriaBuscar = Window.tbSubcategoria; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { BuscarProducto_Categorias(string.Empty, true); //ListCategoriaBusqueda = ListCategoria = new ObservableCollection <PRODUCTO_CATEGORIA>(new cProducto_Categoria().Seleccionar(string.Empty, "S")); Application.Current.Dispatcher.Invoke((Action)(delegate { //ListCategoriaBusqueda.Insert(0, new PRODUCTO_CATEGORIA { DESCR = "SELECCIONE", ID_CATEGORIA = -1 }); ListCategoria.Insert(0, new PRODUCTO_CATEGORIA { NOMBRE = "SELECCIONE", ID_CATEGORIA = -1 }); SelectCategoriaBusqueda = -1; SelectCategoria = -1; })); }); StaticSourcesViewModel.SourceChanged = false; } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al buscar al cargar la vista.", ex); } }
private async void SwitchClick(System.Object obj) { if (!pConsultar) { ReportViewerVisible = System.Windows.Visibility.Collapsed; new Dialogos().ConfirmacionDialogo("Validación", "Su usuario no tiene privilegios para realizar esta acción"); return; } if (SelectedFechaInicial == null) { ReportViewerVisible = System.Windows.Visibility.Collapsed; new Dialogos().ConfirmacionDialogo("Validación", "Ingrese la fecha de inicio"); return; } if (SelectedFechaFinal == null) { ReportViewerVisible = System.Windows.Visibility.Collapsed; new Dialogos().ConfirmacionDialogo("Validación", "Ingrese la fecha de fin"); return; } ReportViewerVisible = System.Windows.Visibility.Collapsed; await StaticSourcesViewModel.CargarDatosMetodoAsync(GenerarReporte); ReportViewerVisible = System.Windows.Visibility.Visible; }
private async void OnModelChangedSwitch(object parametro) { if (parametro != null && !string.IsNullOrWhiteSpace(parametro.ToString())) { switch (parametro.ToString()) { case "cambio_categoria": await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { CargarProductoSubcategorias(selectedProductoCategoriaValue, true); if (lstProductoSubcategoria != null && lstProductoSubcategoria.Count > 0) { IsSubcategoriaVisible = true; selectedProductoSubcategoriaValue = -1; RaisePropertyChanged("SelectedProductoSubcategoriaValue"); AddRule(() => SelectedProductoSubcategoriaValue, () => SelectedProductoSubcategoriaValue != -1, "SUBCATEGORIA ES REQUERIDA!"); RaisePropertyChanged("SelectedProductoSubcategoriaValue"); } else { IsSubcategoriaVisible = false; RemoveRule("SelectedProductoSubcategoriaValue"); } }); break; } } }
public async void OnLoad(ReporteReosPeligrosos Window) { try { ConfiguraPermisos(); Ventana = Window; Reporte = Ventana.Report; TodosLosReos = true; SelectedFechaInicial = Fechas.GetFechaDateServer; SelectedFechaFinal = Fechas.GetFechaDateServer; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Collapsed; })); SelectedFechaInicial = Fechas.GetFechaDateServer; SelectedFechaFinal = Fechas.GetFechaDateServer; Application.Current.Dispatcher.Invoke((Action)(delegate { ReportViewerVisible = Visibility.Visible; })); }); } catch (Exception ex) { throw new ApplicationException(ex.Message); } }
public async void OnLoad(ReporteBrazaleteGafete Window) { try { BrazaleteReportViewerVisible = Visibility.Collapsed; GafeteReportViewerVisible = Visibility.Collapsed; await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { BusquedaAvanzadaChecked = false; Ventana = Window; Reporte = Ventana.ReportBrazalete; ListaIngresos = new List <cInternoGafeteBrazalete>(); ListaIngresosSeleccionados = new List <cInternoGafeteBrazalete>(); ObtenerEdificios(); EmptyVisible = EmptySeleccionadosVisible = true; var placeholder = new Imagenes().getImagenPerson(); FotoIngreso = placeholder; FotoCentro = placeholder; TextoGenerarReporte = "Generar Brazalete(s)"; Pagina = 1; }); BrazaleteSelected = true; } catch (Exception ex) { throw new ApplicationException(ex.Message); } }
private async void SectorClasificacionLoad(CatalogoSectorClasificacionView Window = null) { try { await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { CatalogoHeader = "Sector Clasificación"; HeaderAgregar = "Agregar Nueva Clasificación"; //LLENAR EditarVisible = false; NuevoVisible = false; AgregarVisible = false; GuardarMenuEnabled = false; EliminarMenuEnabled = false; EditarMenuEnabled = false; CancelarMenuEnabled = false; AyudaMenuEnabled = true; SalirMenuEnabled = true; ExportarMenuEnabled = true; /*MAXLENGTH*/ MaxLength = 14; SeleccionIndice = -1; EmptyVisible = false; PopulateSectorClasificacionListado(); setValidationRules(); ConfiguraPermisos(); }); } catch (Exception ex) { StaticSourcesViewModel.ShowMessageError("Algo pasó...", "Ocurrió un error al cargar tipo de clasificación.", ex); } }
private async void ClickSwitch(object parametro) { if (parametro != null && !string.IsNullOrWhiteSpace(parametro.ToString())) { switch (parametro.ToString()) { case "filtro_interconsultas": if (!IsFechaIniBusquedaSolValida) { new Dialogos().ConfirmacionDialogo("Validación", "La fecha de inicio tiene que ser menor a la fecha fin!"); return; } await StaticSourcesViewModel.CargarDatosMetodoAsync(() => { BuscarSolicitudesInterconsulta(selectedAtencion_TipoBuscarValue == -1 ? (short?)null : selectedAtencion_TipoBuscarValue, anioBuscarInter, folioBuscarInter, nombreBuscarInter, apellidoPaternoBuscarInter, apellidoMaternoBuscarInter, null, fechaInicialBuscarInter, fechaFinalBuscarInter, true); }); break; case "seleccionar_interconsulta": if (selectedInterconsultaBusqueda == null) { new Dialogos().ConfirmacionDialogo("Validación", "Debe de seleccionar una solicitud de interconsulta"); return; } await CargarReporte(); if (documento == null) { new Dialogos().ConfirmacionDialogo("Validación", "No se encontro la plantilla del documento"); return; } var tc = new TextControlView(); tc.Closed += (s, e) => { PopUpsViewModels.ClosePopUp(PopUpsViewModels.TipoPopUp.OSCURECER_FONDO); }; tc.editor.Loaded += (s, e) => { var d = new cWord().FillFieldsDocx(documento.DOCUMENTO, diccionario_reporte); //DOCX tc.editor.EditMode = TXTextControl.EditMode.ReadOnly; TXTextControl.LoadSettings _settings = new TXTextControl.LoadSettings(); tc.editor.Load(d, TXTextControl.BinaryStreamType.WordprocessingML, _settings); //aqui se mueve el margen del documento, el txttextcontrol maneja como unidad de medida 1/96 de la pulgada, y piensa que el word le esta mandando 40ums solamente, menos de la pulgada. tc.editor.PageMargins.Left = 100; tc.editor.PageMargins.Right = 100; }; PopUpsViewModels.ShowPopUp(this, PopUpsViewModels.TipoPopUp.OSCURECER_FONDO); tc.Owner = PopUpsViewModels.MainWindow; tc.Show(); break; } } }