public async Task <ActionResult> obtenerDashboard([FromBody] EmpresaFecha fe)
        {
            var response = new Response <Dashboard>();

            try
            {
                response = await this.empresa.obtenerDashboard(fe.idEmpresa, fe.fecha);
            }
            catch (Exception ex)
            {
                response.success = false;
                response.message = ex.Message;
            }
            return(Ok(response));
        }
예제 #2
0
        public async Task <ActionResult> ProductosMasVendidos([FromBody] EmpresaFecha ef)
        {
            var response = new Response <List <PMasVendidos> >();

            try
            {
                response = await this.producto.ObtenerCincoProductosMasVendidos(ef.idEmpresa, ef.fecha);
            }
            catch (Exception ex)
            {
                response.success = false;
                response.message = ex.Message;
            }
            return(Ok(response));
        }
예제 #3
0
        public async Task <ActionResult> ObtenerTicketsdelDia([FromBody] EmpresaFecha ef)
        {
            var response = new Response <List <Ticket> >();

            try
            {
                response = await this.ventas.ObtenerTicketsPorIdEmpresa(ef.idEmpresa, ef.fecha);
            }
            catch (Exception ex)
            {
                response.success = false;
                response.message = ex.Message;
            }
            return(Ok(response));
        }