示例#1
0
        private Det_pagos buildDet_pagos(MySqlDataReader data)
        {
            Det_pagos item = new Det_pagos(
                data.GetInt32("id"),
                data.GetInt32("id_pago"),
                data.GetInt32("id_compra")
                );

            return(item);
        }
示例#2
0
        public List <Det_pagos> get_pagosbyid(string id_pago)
        {
            string           query  = "select id, id_pago,  id_compra from tbadetpagos where id='" + id_pago + "'";
            MySqlDataReader  data   = runQuery(query);
            List <Det_pagos> result = new List <Det_pagos>();

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