Beispiel #1
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");
        }