Пример #1
0
        public object Get(TomaDTO request)
        {
            var empresa = RpEmpresa.Cargar(request.Empresa);
            var toma = RpTomaInventario.Cargar(request.Numero, empresa);

            return CargarTomaDTO(toma);
        }
Пример #2
0
        private static TomaDTO CargarTomaDTO(TomaInventario toma)
        {
            if (toma == null) return null;

            var tomaDTO = new TomaDTO
                              {
                                  DiscriminaUbicacion = toma.DiscriminaUbicacion,
                                  CodigoProveedor = toma.CodigoProveedor,
                                  NumeroConteo = toma.NumeroConteo,
                                  Deposito = toma.Deposito.Codigo,
                                  Categoria = toma.Categoria.Descripcion,
                                  Entidad = toma.Entidad.Codigo,
                                  Empresa = toma.Entidad.Empresa.Codigo,
                                  IdEquipo = toma.IdEquipo,
                                  Numero = toma.Numero,
                                  Responsable = toma.Responsable,
                                  Usuario = toma.Usuario.DisplayName,
                                  Fecha = toma.Fecha,
                                  Hora = toma.Hora,
                              };
            /*if (detallado)
                foreach (var detalle in toma.Detalle)
                {
                    tomaDTO.Detalle.Add(new TomaDetalleDTO
                                            {
                                                Articulo = detalle.Articulo.Codigo,
                                                Existencia = detalle.Existencia,
                                                Ubicacion = detalle.CodigoUbicacion,
                                            });
                }*/
            return tomaDTO;
        }