private void Connect_SPMSQL(int index) { try { Userlistbox.DataSource = null; Userlistbox.Items.Clear(); users.Clear(); users = connectapi.GetConnectUsersList(); Userlistbox.DataSource = users; Userlistbox.DisplayMember = "Name"; if (Userlistbox.Items.Count > 0) { Userlistbox.SelectedItem = Userlistbox.Items[index]; } Fillsupervisor(); FillECRsupervisor(); FillShippingsupervisor(); Selectionchanged(users[index]); } catch (Exception ex) { MessageBox.Show(ex.Message, "SPM Connect", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { connectapi.cn.Close(); } }