public Respuesta <ReporteCompra> MapeadorReporteCompra(Respuesta <IReporteCompraDTO> respuesta)
        {
            List <ReporteCompra> entidades = new List <ReporteCompra>();

            foreach (IReporteCompraDTO item in respuesta.Entidades)
            {
                ReporteCompra ReporteCompra = new ReporteCompra
                {
                    CantidadComic   = item.CantidadComic,
                    Celular         = item.Celular,
                    Comprador       = item.Comprador,
                    Direccion       = item.Direccion,
                    FechaCompra     = item.FechaCompra,
                    NumeroDocumento = item.NumeroDocumento,
                    Orden           = item.Orden,
                    TotalCompra     = item.TotalCompra
                };
                entidades.Add(ReporteCompra);
            }

            Respuesta <ReporteCompra> mapeador = new Respuesta <ReporteCompra>
            {
                Entidades        = entidades,
                Mensajes         = respuesta.Mensajes,
                Resultado        = respuesta.Resultado,
                TipoNotificacion = respuesta.TipoNotificacion
            };

            return(mapeador);
        }
Пример #2
0
        private void ExecuteRead(SQLiteCommand command)
        {
            List <ReporteCompra> reporteCompras = new List <ReporteCompra>();

            try
            {
                using (dataReader = command.ExecuteReader())
                {
                    while (dataReader.Read())
                    {
                        ReporteCompra reporteCompra = new ReporteCompra
                        {
                            CantidadComic   = Convert.ToInt32(dataReader["CantidadComic"].ToString()),
                            Celular         = Convert.ToInt32(dataReader["Celular"].ToString()),
                            Comprador       = dataReader["Comprador"].ToString(),
                            Direccion       = dataReader["Direccion"].ToString(),
                            FechaCompra     = Convert.ToDateTime(dataReader["FechaCompra"]),
                            NumeroDocumento = Convert.ToInt32(dataReader["NumeroDocumento"]),
                            Orden           = dataReader["Orden"].ToString(),
                            TotalCompra     = Convert.ToDouble(dataReader["TotalCompra"])
                        };
                        reporteCompras.Add(reporteCompra);
                    }
                    dataReader.Close();
                    connection.Close();
                }

                RespuestaExitoso(reporteCompras.First());
            }
            catch (Exception error)
            {
                RespuestaFallido(error);
                dataReader.Close();
                connection.Close();
            }
        }
Пример #3
0
        private void bunifuFlatButton6_Click(object sender, EventArgs e)
        {
            ReporteCompra rc = new ReporteCompra();

            rc.Show();
        }