Exemplo n.º 1
0
        private void cmdListToDelete_Click(object sender, EventArgs e)
        {
            DatabaseManagement database = new DatabaseManagement();

            database.OpenConnection();

            database.DeleteUserList(((UsersList)cboList.SelectedItem).Name, ((User)lstList.SelectedItem).Iban);

            userInfo = (EnterpriseUser)database.GetUser(userInfo.Email);

            database.CloseConnection();

            int selectedList = cboList.SelectedIndex;

            displayEnterpriseLists();
            cboList.SelectedIndex = selectedList;
            displayUsersLists();

            cmdListToDelete.Enabled = false;
        }