private FiltroCandidatoModels GenerateViewElementsIndex(FiltroCandidatoModels filtro)
        {
            int[] tipoMaestroId =
            {
                (int)MasterDataTypeEnum.TipoIdentificacion,
                (int)MasterDataTypeEnum.TipoTecnologia,
                (int)MasterDataTypeEnum.Titulacion,
                (int)MasterDataTypeEnum.Centro,
                (int)MasterDataTypeEnum.Idioma,
                (int)MasterDataTypeEnum.NivelIdioma
            };
            var response = _maestroService.GetDatosMaestroByTipoId(tipoMaestroId);

            filtro.TipoIdentificacionList = ControllerHelper.GenerateElements(response, MasterDataTypeEnum.TipoIdentificacion);
            filtro.TipoTecnologiaList     = ControllerHelper.GenerateElements(response, MasterDataTypeEnum.TipoTecnologia);
            filtro.TitulacionList         = ControllerHelper.GenerateElements(response, MasterDataTypeEnum.Titulacion);
            filtro.CentroList             = (IEnumerable <SelectListItem>)HttpContext.Session["ListaCentros"];
            filtro.Centro          = (IEnumerable <SelectListItem>)HttpContext.Session["ListaCentros"];
            filtro.Pagina          = _sesionCandidatos.Get <int>("pagina_actual") > 0 ? _sesionCandidatos.Get <int>("pagina_actual") : 0;
            filtro.IdiomaList      = ControllerHelper.GenerateElements(response, MasterDataTypeEnum.Idioma);
            filtro.NivelIdiomaList = ControllerHelper.GenerateElements(response, MasterDataTypeEnum.NivelIdioma);


            return(filtro);
        }
        private FiltroCandidatoModels MappertoFiltroCandidatos(IDictionary <string, string> filtro)
        {
            var filtroCandidatoModels = new FiltroCandidatoModels();

            if (filtro.Count != 0)
            {
                string value;
                if (filtro.ContainsKey("Nombre"))
                {
                    value = filtro["Nombre"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.Nombre = value;
                    }
                }

                if (filtro.ContainsKey("Apellidos"))
                {
                    value = filtro["Apellidos"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.Apellidos = value;
                    }
                }

                if (filtro.ContainsKey("TipoTitulacion"))
                {
                    value = filtro["TipoTitulacion"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.TipoTitulacionId = Convert.ToInt32(value);
                    }
                }

                if (filtro.ContainsKey("TipoIdentificacion"))
                {
                    value = filtro["TipoIdentificacion"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.TipoIdentificacionId = Convert.ToInt32(value);
                    }
                }

                if (filtro.ContainsKey("NumeroIdentificacion"))
                {
                    value = filtro["NumeroIdentificacion"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.NumeroIdentificacion = value;
                    }
                }

                if (filtro.ContainsKey("CentroUsuarioId"))
                {
                    value = filtro["CentroUsuarioId"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.CentroIdUsuario = Convert.ToInt32(value);
                    }
                }

                if (filtro.ContainsKey("CentroSearch"))
                {
                    value = filtro["CentroSearch"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.CentroIdUsuario = Convert.ToInt32(value);
                    }
                }
                if (filtro.ContainsKey("TipoTecnologia"))
                {
                    value = filtro["TipoTecnologia"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.TipoTecnologiaId = Convert.ToInt32(value);
                    }
                }
                if (filtro.ContainsKey("Email"))
                {
                    value = filtro["Email"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.Email = value;
                    }
                }
                if (filtro.ContainsKey("Telefono"))
                {
                    value = filtro["Telefono"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.Telefono = value;
                    }
                }
                if (filtro.ContainsKey("CentroEducativoId"))
                {
                    value = filtro["CentroEducativoId"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.CentroEducativoId = Convert.ToInt32(value);
                    }
                }
                if (filtro.ContainsKey("CentroEducativoName"))
                {
                    value = filtro["CentroEducativoName"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.CentroEducativoName = value;
                    }
                }
                if (filtro.ContainsKey("AnioRegresado"))
                {
                    value = filtro["AnioRegresado"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.AnioRegresado = value;
                    }
                }

                if (filtro.ContainsKey("NivelIdioma"))
                {
                    value = filtro["NivelIdioma"];
                    if (!string.IsNullOrEmpty(value))
                    {
                        filtroCandidatoModels.NivelIdioma = value;
                    }
                }
            }

            return(filtroCandidatoModels);
        }