private Payment_Form build_payment(MySqlDataReader data) { Payment_Form item = new Payment_Form( data.GetString("c_metodopago"), data.GetString("descripcion") ); return(item); }
public List <Payment_Form> get_methodbyDescription(string description) { string query = "select c_metodopago, descripcion from zz33_metodopago where descripcion='" + description + "'"; MySqlDataReader data = runQuery(query); List <Payment_Form> result = new List <Payment_Form>(); if (data.HasRows) { while (data.Read()) { Payment_Form item = build_payment(data); result.Add(item); } } return(result); }