示例#1
0
        public ActionResult buscarUbicacionActivo(String filtro)
        {
            IEnumerable <DEPARTAMENTO> listaDepartamento    = null;
            ServiceDepartamento        _serviceDepartamento = new ServiceDepartamento();

            if (string.IsNullOrEmpty(filtro))
            {
                listaDepartamento = _serviceDepartamento.GetDepartamentos();
            }
            else
            {
                listaDepartamento = _serviceDepartamento.GetDepartamentoActivoByUbicacion(filtro);
            }

            return(PartialView("_PartialViewIndexCatalogo", listaDepartamento));
        }
        public ActionResult Departamentos()
        {
            IEnumerable <DEPARTAMENTO> lista = null;

            try
            {
                ServiceDepartamento _serviceDepartamento = new ServiceDepartamento();
                //lista de opciones de busqueda
                ViewBag.busquedaUbicacion = _serviceDepartamento.GetDepartamentosUbicaciones();
                lista = _serviceDepartamento.GetDepartamentos();
            }
            catch (Exception ex)
            {
                Log.Error(ex, MethodBase.GetCurrentMethod());
                TempData["Message"] = "Error al procesar los datos" + ex.Message;
                TempData.Keep();
            }
            return(View(lista));
        }