예제 #1
0
        private Ticket_a_facturas build_relacion(MySqlDataReader data)
        {
            Ticket_a_facturas item = new Ticket_a_facturas(
                data.GetInt32("id"),
                data.GetInt32("factura"),
                data.GetInt32("ticket")
                );

            return(item);
        }
예제 #2
0
        public List <Ticket_a_facturas> get_realcionbyticket(string ticket)
        {
            string                   query  = maq_query + " where ticket='" + ticket + "'";
            MySqlDataReader          data   = runQuery(query);
            List <Ticket_a_facturas> result = new List <Ticket_a_facturas>();

            if (data.HasRows)
            {
                while (data.Read())
                {
                    Ticket_a_facturas item = build_relacion(data);
                    result.Add(item);
                }
            }
            return(result);
        }