private void initMember() { DatabaseManager dbManager = new DatabaseManager(); // Gets the dataset for the member DataSet dataSet = dbManager.TableDataSet("SELECT * FROM tblMember", "tblMember"); DataTable tblRows = dataSet.Tables["tblMember"]; // Populates the dropdown menu foreach (DataRow dr in tblRows.Rows) { // Full name of the member String fullname = dr["first"] + " " + dr["last"]; // Value of the member String ID = dr["memberID"].ToString(); //Create the list item ListItem li = new ListItem(fullname, ID); // Add to the dropdown ddlMember.Items.Add(li); } }
private void initBird() { DatabaseManager dbManager = new DatabaseManager(); // Gets the dataset for the bird DataSet dataSet = dbManager.TableDataSet("SELECT * FROM tblBird", "tblBird"); DataTable tblRows = dataSet.Tables["tblBird"]; // Populates the dropdown menu foreach (DataRow dr in tblRows.Rows) { // Full name of the bird String birdName = dr[rblBirdName.SelectedValue].ToString(); // Value of the bird String ID = dr["birdID"].ToString(); //Create the list item ListItem li = new ListItem(birdName, ID); // Add to the dropdown ddlBird.Items.Add(li); } }