private void listViewFolderRoles_SelectedIndexChanged(object sender, EventArgs e) { if (listViewFolderRoles.SelectedItems.Count == 0) { return; } Cursor.Current = Cursors.WaitCursor; try { if (IsDocumentLibrarySelected) { string folderName = listViewFolderRoles.SelectedItems[0].SubItems[3].Text; if (folderName.Contains(SelectedListName)) { folderName = folderName.Substring(folderName.IndexOf(SelectedListName) + SelectedListName.Length + 1); } var data = EnzoSharePointOp.GetFolderUserPermissions(SelectedListName, folderName); listViewFolderPermissions.Fill(data, "title"); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); } Cursor.Current = Cursors.Default; }
private void listViewLists_SelectedIndexChanged(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; var data = EnzoSharePointOp.GetFolderUserPermissions(SelectedListName); listViewPermissions.Fill(data, "title", "title,loginName,role"); if (IsDocumentLibrarySelected) { listViewDocuments.Items.Clear(); listViewFolderRoles.Items.Clear(); listViewFolderPermissions.Items.Clear(); tabControlDocuments.Dock = DockStyle.Fill; tabControlDocuments.Visible = true; listViewItems.Visible = false; LoadDocuments(SelectedListName); } else { listViewItems.Items.Clear(); listViewItems.Dock = DockStyle.Fill; listViewItems.Visible = true; tabControlDocuments.Visible = false; LoadListItems(SelectedListName); } listViewFields.Items.Clear(); } catch (Exception ex) { } Cursor.Current = Cursors.Default; }