I'm writing a pretty big application and I need some help. If you're fluent in C# or know how to add a list to a listbox control from a SQL query then let me know.
Here's a sample of the code I have.
Here's a sample of the code I have.
PHP:
public List<Person> getNameAd(string username)
{
var AdNameList = new List<Person>();
this.OpenConnection();
string query = " * snip* "
MySqlCommand cmd = new MySqlCommand(query, connection);
using (var reader = cmd.ExecuteReader())
{
while (reader.Read())
{
var person = new Person();
person.Ad_Name = reader["Ad_Name"].ToString();
AdNameList.Add(person);
}
}
return AdNameList;
}