public HotelDataSet.StaffRow getEmployeeByName(String name) { HotelDataSet.StaffDataTable table = staffTableAdapter.GetByName(name); if (table.Rows.Count == 1) { return(table[0]); } return(null); }
public List <String> getEmployeeNames() { List <String> names = new List <String>(); HotelDataSet.StaffDataTable table = staffTableAdapter.GetData(); foreach (HotelDataSet.StaffRow row in table) { names.Add(row.Name); } return(names); }