예제 #1
0
        private void InicializadorConsultaEmpresa()
        {
            string idProvincia = ConfigurationManager.AppSettings.Get("IdProvincia");

            ViewData.Add(ViewDataKey.INSPECCION_INTERMEDIA.ToString(), ServiceLocator.Current.GetInstance <IEmpresaRules>().GetInspeccionIntermediaByDireccionDeNivelActual());
            ViewData.Add(ViewDataKey.TIPO_ESCUELA.ToString(), _entidadesGeneralesRules.GetTipoEscuelaAll());
            ViewData.Add(ViewDataKey.PERIODO_LECTIVO.ToString(), _entidadesGeneralesRules.GetPeriodoLectivoAll());
            ViewData.Add(ViewDataKey.DEPARTAMENTO_PROVINCIAL.ToString(), _entidadesGeneralesRules.GetDepartamentoProvincialByProvincia(idProvincia));
            ViewData.Add(ViewDataKey.LOCALIDAD.ToString(), new List <LocalidadModel>());
            ViewData.Add(ViewDataKey.ZONA_DESFAVORABLE.ToString(), _entidadesGeneralesRules.GetZonaDesfavorableAll());
            ViewData.Add(ViewDataKey.NIVEL_EDUCATIVO.ToString(), _entidadesGeneralesRules.GetNivelEducativoAll());
            ViewData.Add(ViewDataKey.OBRA_SOCIAL.ToString(), _entidadesGeneralesRules.GetObraSocialAll());
            ViewData.Add(ViewDataKey.TURNO.ToString(), _entidadesGeneralesRules.GetTurnoAll());
            ViewData.Add(ViewDataKey.MODALIDAD_JORNADA.ToString(), _entidadesGeneralesRules.GetModalidadJornadaAll());
            ViewData.Add(ViewDataKey.PROGRAMA_PRESUPUESTARIO.ToString(), _entidadesGeneralesRules.GetProgramaPresupuestarioAll());
        }
예제 #2
0
        protected override void Initialize(System.Web.Routing.RequestContext requestContext)
        {
            base.Initialize(requestContext);
            //ViewData["GradoAñoEscuelaList"] = new SelectList(ServiceLocator.Current.GetInstance<IGradoAñoRules>().GetGradoAñoPorEscuelaLogueada(), "Id", "Nombre");
            //ViewData["TurnoEscuelaList"] = new SelectList(ServiceLocator.Current.GetInstance<ITurnoRules>().GetTurnoPorEscuelaLogueada(), "Id", "Nombre");

            entidadesGeneralesRules = ServiceLocator.Current.GetInstance <IEntidadesGeneralesRules>();
            Rule     = ServiceLocator.Current.GetInstance <ISeccionRules>();
            AbmcView = "SeccionEditor";

            RuleDetalle     = ServiceLocator.Current.GetInstance <IDetalleSeccionRules>();
            AbmcViewDetalle = "DetalleSeccionEditor";

            idEscuela = (int)Session[ConstantesSession.EMPRESA_ID.ToString()];



            empresaRules = ServiceLocator.Current.GetInstance <IEmpresaRules>();
            //Toma el valor de la provincia del Web.config
            string idProvincia = ConfigurationManager.AppSettings.Get("IdProvincia");

            ViewData["TipoEscuelaList"]            = new SelectList(entidadesGeneralesRules.GetTipoEscuelaAll(), "Id", "Nombre");
            ViewData["PeriodoLectivoList"]         = new SelectList(entidadesGeneralesRules.GetPeriodoLectivoAll(), "Id", "Nombre");
            ViewData["DepartamentoProvincialList"] = new SelectList(entidadesGeneralesRules.GetDepartamentoProvincialByProvincia(idProvincia), "Id", "Nombre");
            ViewData["LocalidadList"]         = new SelectList(entidadesGeneralesRules.GetLocalidadByProvincia(String.Empty), "Id", "Nombre");
            ViewData["ZonaDesfavorableList"]  = new SelectList(entidadesGeneralesRules.GetZonaDesfavorableAll(), "Id", "Nombre");
            ViewData["NivelEducativoList"]    = new SelectList(entidadesGeneralesRules.GetNivelEducativoAll(), "Id", "Nombre");
            ViewData["ObraSocialList"]        = new SelectList(entidadesGeneralesRules.GetObraSocialAll(), "Id", "Nombre");
            ViewData["TurnoList"]             = new SelectList(entidadesGeneralesRules.GetTurnoAll(), "Id", "Nombre");
            ViewData["ModalidadJornadaList"]  = new SelectList(entidadesGeneralesRules.GetModalidadJornadaAll(), "Id", "Nombre");
            ViewData["TiposInstrumentoLegal"] =
                new SelectList(ServiceLocator.Current.GetInstance <ITipoInstrumentoLegalRules>().GetAll(), "Id", "Nombre");
            ViewData["DomicilioList"] = new SelectList(entidadesGeneralesRules.GetDomicilioAll(), "Id", "Calle");

            // TODO Vicky ubicar la carga de SelectList en otro lado donde se ejecute solo en caso de ser necesario
            ViewData["ProgramaPresupuestarioList"] = new SelectList(entidadesGeneralesRules.GetProgramaPresupuestarioAll(), "Id", "Codigo");
            //idEscuela = (int)Session[ConstantesSession.EMPRESA_ID.ToString()];

            //  ViewData["TurnoList"] = new SelectList(entidadesGeneralesRules.GetTurnoAll(), "Id", "Nombre");
        }