void ICatalogo.CargarControles() { StoreGeneros.Cargar(Genero.Obtener()); StoreEstadosCiviles.Cargar(EstadoCivil.Obtener()); StoreCultos.Cargar(Culto.Obtener()); StoreRazonesDeVisita.Cargar(ConsolidacionBoletaRazonVisita.Obtener()); StoreEstatus.Cargar(ConsolidacionBoleta.Estatus.Lista()); StoreCategorias.Cargar(ConsolidacionBoletaCategoria.Obtener()); StoreReportes.Limpiar(); if (SesionActual.Instance.ValidarPermisoEspecial((int)PermisosEspeciales.VerTodasLasBoletasDeConsolidacion, false)) { filtroFechaDeCulto.Value = manejadorDeConsolidacion.ObtenerUltimaBoletaRegistrada().FechaDeCulto; registroFechaDeCulto.Value = DateTime.Now.PreviousSunday(); } }
void ICatalogo.Mostrar(int id) { ConsolidacionBoleta entidad = (from o in SesionActual.Instance.getContexto <IglesiaEntities>().ConsolidacionBoleta where o.Id == id select o).FirstOrDefault(); registroId.Value = entidad.Id.ToString(); registroEmail.Value = entidad.Email; registroPrimerNombre.Value = entidad.PrimerNombre; registroSegundoNombre.Value = entidad.SegundoNombre; registroApellidoPaterno.Value = entidad.ApellidoPaterno; registroApellidoMaterno.Value = entidad.ApellidoMaterno; registroGenero.Value = entidad.GeneroId; registroInvitadoPorMiembro.EstablecerId(entidad.InvitadoPorMiembroId); registroCulto.Value = entidad.CultoId; registroFechaDeCulto.Value = entidad.FechaDeCulto; registroRazonDeVisita.Value = entidad.BoletaRazonVisitaId; registroEstatus.Value = entidad.BoletaEstatusId; registroCategoria.Value = entidad.CategoriaBoletaId; registroMunicipio.ForzarSeleccion(entidad.UbicacionMunicipioId, entidad.UbicacionMunicipio.Descripcion); registroColonia.Value = entidad.Colonia; registroDireccion.Value = entidad.Direccion; registroFechaDeNacimiento.Value = entidad.FechaDeNacimiento; registroEdad.Value = entidad.Edad; registroEstadoCivil.Value = entidad.EstadoCivilId; registroCelulaAsignada.EstablecerId(entidad.AsignadaACelulaId); registroMiembroAsignada.EstablecerId(entidad.AsignadaAMiembroId); registroTelCasa.Value = entidad.TelefonoCasa; registroTelMovil.Value = entidad.TelefonoMovil; registroTelTrabajo.Value = entidad.TelefonoTrabajo; registroObservaciones.Value = entidad.Observaciones; StoreReportes.Cargar(from o in SesionActual.Instance.getContexto <IglesiaEntities>().ConsolidacionBoletaReporte join miembro in SesionActual.Instance.getContexto <IglesiaEntities>().Miembro on o.CreacionId equals miembro.MiembroId orderby o.Id descending where o.ConsolidacionBoletaId == id && o.Borrado == false select new { Id = o.Id, Reporte = o.Reporte, Fecha = o.Creacion, ReportadoPorMiembro = miembro.Primer_Nombre + " " + miembro.Segundo_Nombre + " " + miembro.Apellido_Paterno + " " + miembro.Apellido_Materno + " (" + miembro.Email + ")" }); }