public List <Transfers> getTransfers() { string query = maq_query; MySqlDataReader data = runQuery(query); List <Transfers> result = new List <Transfers>(); if (data.HasRows) { while (data.Read()) { Transfers item = build_transfer(data); result.Add(item); } } return(result); }
private Transfers build_transfer(MySqlDataReader data) { Transfers item = new Transfers( data.GetInt16("id"), data.GetInt16("folio"), data.GetString("tipo"), data.GetString("sucursal"), data.GetDouble("subtotal"), data.GetDouble("iva"), data.GetDouble("total"), data.GetDateTime("fecha"), data.GetInt16("facturado") ); return(item); }
public List <Transfers> getTransferbysucursal(int id_sucursal) { string query = maq_query + " where sucursal='" + id_sucursal + "' and tipo='E'"; MySqlDataReader data = runQuery(query); List <Transfers> result = new List <Transfers>(); if (data.HasRows) { while (data.Read()) { Transfers item = build_transfer(data); result.Add(item); } } return(result); }
public List <Transfers> getTransferbyfolio(int folio, string tipo) { string query = maq_query + " where folio='" + folio.ToString() + "' and tipo='" + tipo + "'"; MySqlDataReader data = runQuery(query); List <Transfers> result = new List <Transfers>(); if (data.HasRows) { while (data.Read()) { Transfers item = build_transfer(data); result.Add(item); } } return(result); }
public List <Transfers> getTransferbyid(int id) { string query = maq_query + " where id='" + id.ToString() + "'"; MySqlDataReader data = runQuery(query); List <Transfers> result = new List <Transfers>(); if (data.HasRows) { while (data.Read()) { Transfers item = build_transfer(data); result.Add(item); } } return(result); }