private void lbEmployees_SelectedIndexChanged(object sender, EventArgs e) { string curName = lbEmployees.SelectedItem.ToString(); Employee selectedEmployee = HR_Database.HR_GetEmployeeInfo(curName); UpdateEmployee(selectedEmployee); }
private void Form1_Load(object sender, EventArgs e) { HR_Database.HR_GetEmployees(); foreach (string name in HR_Database.EmployeeNames) { lbEmployees.Items.Add(name); } }