private void AddBtn_Click(object sender, EventArgs e) { string clientName = ClientList.GetItemText(ClientList.SelectedItem); string groupName = GroupList.GetItemText(GroupList.SelectedItem); CustomerAccount client = new CustomerAccount(); string text = client.addStudenttoGroup(clientName, groupName); MessageBox.Show(text); }