Example #1
0
 public HotelDataSet.StaffRow getEmployeeByName(String name)
 {
     HotelDataSet.StaffDataTable table = staffTableAdapter.GetByName(name);
     if (table.Rows.Count == 1)
     {
         return(table[0]);
     }
     return(null);
 }
Example #2
0
        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);
        }