private Inv_out buildInv_out(MySqlDataReader data) { Inv_out item = new Inv_out( data.GetInt32("id"), data.GetString("fecha"), data.GetString("notas"), data.GetDouble("total"), data.GetString("Estado") ); return(item); }
public List <Inv_out> getListabyId(string id) { string query = maq_query + " where id='" + id + "'"; MySqlDataReader data = runQuery(query); List <Inv_out> result = new List <Inv_out>(); if (data.HasRows) { while (data.Read()) { Inv_out item = buildInv_out(data); result.Add(item); } } return(result); }
public List <Inv_out> getListabyAll(string fecha, double total) { string query = maq_query + " where fecha='" + fecha + "' and total='" + total.ToString() + "'"; MySqlDataReader data = runQuery(query); List <Inv_out> result = new List <Inv_out>(); if (data.HasRows) { while (data.Read()) { Inv_out item = buildInv_out(data); result.Add(item); } } return(result); }