Пример #1
0
        private Det_transfers build_detalle(MySqlDataReader data)
        {
            Det_transfers item = new Det_transfers(
                data.GetInt32("id"),
                data.GetInt32("folio"),
                data.GetString("tipo"),
                data.GetDouble("cantidad"),
                data.GetInt32("id_producto"),
                data.GetDouble("precio")
                );

            return(item);
        }
Пример #2
0
        public List <Det_transfers> getDet_trans(int folio)
        {
            string               query  = maq_query + " where folio='" + folio.ToString() + "'";
            MySqlDataReader      data   = runQuery(query);
            List <Det_transfers> result = new List <Det_transfers>();

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