private void BookingForm_Load(object sender, EventArgs e) { user = SetEmployee(Settings.Default.username); thread = new Thread(new ThreadStart(SetupComponents)); thread.Start(); }
// Convert WebServiceSoapClient Employee to Libraries Employee private Employee SetEmployee(string username) { SoapEmployee soapUser = ws.GetStaff(username); Employee person = new Employee { Username = soapUser.Username, FirstName = soapUser.FirstName, LastName = soapUser.LastName, RoleName = soapUser.RoleName, DepartmentName = soapUser.DepartmentName, Entitlement = soapUser.Entitlement, }; return(person); }