Beispiel #1
0
        private Devolutions buildDevolution(MySqlDataReader data)
        {
            Devolutions item = new Devolutions(
                data.GetInt32("id"),
                data.GetString("fecha"),
                data.GetInt32("autorizo"),
                data.GetDouble("total")
                );

            return(item);
        }
Beispiel #2
0
        public List <Devolutions> get_lastdevocion(string fecha, int autorizo, double total)
        {
            string             query  = "select id, fecha, autorizo, total from tbadevoluciones where fecha='" + fecha + "' and autorizo='" + autorizo.ToString() + "' and total='" + total.ToString() + "' order by id DESC";
            MySqlDataReader    data   = runQuery(query);
            List <Devolutions> result = new List <Devolutions>();

            if (data.HasRows)
            {
                while (data.Read())
                {
                    Devolutions item = buildDevolution(data);
                    result.Add(item);
                }
            }
            return(result);
        }
Beispiel #3
0
        public List <Devolutions> get_devolucionesbyid(int id)
        {
            string             query  = "select id, fecha, autorizo, total from tbadevoluciones where id='" + id.ToString() + "'";
            MySqlDataReader    data   = runQuery(query);
            List <Devolutions> result = new List <Devolutions>();

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