public FolderSelectDialog(int[] docIDs, int empID) { InitializeComponent(); Show(); Cursor = Cursors.WaitCursor; Enabled = false; this.docIDs = docIDs; Slave.DoWork("BuildFriendlyDocList", new object[] { docIDs }, OnBuildFriendlyDocListComplete); tree.CreateWorkFolderRoot(); tree.CreateSharedWorkFolderRoot(true); foreach (TreeNode node in tree.Nodes.Cast <TreeNode>().Where(node => { var workFolderNode = node as FolderTree.FolderNodes.WorkNodes.WorkFolderNode; return(workFolderNode != null && workFolderNode.Emp.ID != empID); })) { node.Remove(); } tree.UpdateWorkFolderStatus(); tree.ExpandAll(); }
private void buttonOK_Click(object sender, EventArgs e) { Enabled = false; Cursor = Cursors.WaitCursor; Slave.DoWork(ProceedNodeBackGround, new object[] { tree.Nodes }, OnProceedNodesComplete); }
/// <summary> /// диалог отображения положения документа в Работе /// </summary> /// <param name="docIDs">Коды документов для отображения</param> /// <param name="empID">код сотрудника, по которому отображается состояние</param> public MoveDocDialog(int[] docIDs, int empID) { InitializeComponent(); this.docIDs = docIDs; this.empID = empID; Slave.DoWork("BuildFriendlyDocList", new object[] { docIDs }, OnBuildFriendlyDocListComplete); Cursor = Cursors.WaitCursor; Enabled = false; var sb = new StringBuilder(); foreach (int docID in docIDs) { sb.Append(docID.ToString() + ","); } docIDstr = sb.ToString().TrimEnd(",".ToCharArray()); }