예제 #1
0
        public IEnumerable <EmpleadoModel> GetEmpleadoModel(int distritoId, int baseId, int empleadoId)
        {
            var empleado = EntityDao.GetById(distritoId, -1, empleadoId);

            if (empleado == null)
            {
                return(Enumerable.Empty <EmpleadoModel>());
            }
            var l = new List <EmpleadoModel> {
                Mapper.EntityToModel(empleado, new EmpleadoModel())
            };

            return(l);
        }
예제 #2
0
        public IEnumerable <ItemModel> GetEmpleado(int distritoId, int baseId, int empleadoId)
        {
            var empleado = EntityDao.GetById(distritoId, baseId, empleadoId);

            if (empleado == null)
            {
                return(Enumerable.Empty <ItemModel>());
            }
            var l = new List <ItemModel> {
                Mapper.ToItem(empleado)
            };

            return(l);
        }
예제 #3
0
 public IEnumerable <KeyValuePair <string, string> > GetParametros(int distritoId)
 {
     return(EntityDao.GetById(distritoId).Parametros.ToList().Select(p => new KeyValuePair <string, string>(p.Nombre, p.Valor)));
 }