예제 #1
0
        public void SaveTicketToPtint(PullTicketsImpresionViewModel ticketToPrit)
        {
            var ticket = entities.TransaccionPullTicketsImpresions.Where(e => e.Id == ticketToPrit.Id).FirstOrDefault();

            if (ticket != null)
            {
                //ticket.NumeroInicial = entities.TicketsEventos.FirstOrDefault(e => e.Id == ticketToPrit.IdPullTickets).Tickets.Where(r => r.IdEstado == EstadoTicket.DISPONIBLE).Min(r => (int)r.Numero); ;
                ticket.ImagenTicket = ticketToPrit.ImgTicket;//.Replace("data:image/svg+xml;base64,", "");
                ticket.Fecha        = DateTime.Now;
                //ticket.IdEstado = EstadoTicket.DISPONIBLE;
            }
            entities.SaveChanges();
        }
예제 #2
0
        internal PullTicketsImpresionViewModel CreatePullTicketsToPrint(PullTicketsImpresionViewModel p, int idTicketsEtapa, string token)
        {
            //Guardar eñ id de  los tickets Etaa
            var data = new TransaccionPullTicketsImpresion()
            {
                //IdTicketsEvento = p.IdPullTickets,
                //ImagenTicket = p.ImgTicket,
                Fecha = DateTime.Now,
                //Cantidad = p.Cantidad,
                Token = token,//"7530A39A-169A-4B83-B476-9AF84A7CECA2",//MAC address,
                //IdTicketsEtapa = idTicketsEtapa,
                //PrinterName = p.PrinterName
            };

            entities.Add(data);
            entities.SaveChanges();
            p.Id = data.Id;
            return(p);
        }
예제 #3
0
        public void SaveTicketToPtint(PullTicketsImpresionViewModel ticketToPrit, int idTicketsEtapa, string token, int inicio, int final)
        {
            var data = new TransaccionPullTicketsImpresion()
            {
                //IdTicketsEvento = ticketToPrit.IdPullTickets,
                ImagenTicket = ticketToPrit.ImgTicket,
                Fecha        = DateTime.Now,
                //Cantidad = ticketToPrit.Cantidad,
                Token = token,
                //IdTicketsEtapa = idTicketsEtapa,
                //PrinterName = ticketToPrit.PrinterName,
                //NumeroInicial = inicio,
                //NumeroFinal = final,
                //IdEstado = EstadoTicket.DISPONIBLE
            };

            entities.Add(data);
            entities.SaveChanges();
            ticketToPrit.Id = data.Id;
        }