Beispiel #1
0
 /// <summary>
 /// 批量移动
 /// </summary>
 private void BatchMove()
 {
     if (BaseInterfaceLogic.CheckInputSelectAnyOne(this.grdModule, "colSelected"))
     {
         frmModuleSelect = new FrmModuleSelect(this.ParentEntityId);
         frmModuleSelect.AllowNull = true;
         frmModuleSelect.OnButtonConfirmClick += new FrmModuleSelect.ButtonConfirmEventHandler(CheckInputMove);
         if (frmModuleSelect.ShowDialog() == DialogResult.OK)
         {
             // 设置鼠标繁忙状态,并保留原先的状态
             Cursor holdCursor = this.Cursor;
             this.Cursor = Cursors.WaitCursor;
             this.ParentEntityId = frmModuleSelect.SelectedId;
             // 调用事件
             string[] tags = this.GetSelecteIds();
             DotNetService.Instance.ModuleService.BatchMoveTo(UserInfo, tags, frmModuleSelect.SelectedId);
             // 移动treeNode
             BaseInterfaceLogic.FindTreeNode(this.tvModule, BaseModuleEntity.FieldId, frmModuleSelect.SelectedId);
             TreeNode parentNode = BaseInterfaceLogic.TargetNode;
             if (tags.Length > 0)
             {
                 for (int i = 0; i < tags.Length; i++)
                 {
                     BaseInterfaceLogic.FindTreeNode(this.tvModule, BaseModuleEntity.FieldId, tags[i]);
                     BaseInterfaceLogic.MoveTreeNode(this.tvModule, BaseInterfaceLogic.TargetNode, parentNode);
                 }
             }
             // 绑定grdModule
             this.GetModuleList();
             if (this.DTModuleList.Rows.Count > 0)
                 this.grdModule.FirstDisplayedScrollingRowIndex = this.DTModuleList.Rows.Count - 1;
             // 设置鼠标默认状态,原来的光标状态
             this.Cursor = holdCursor;
         }
     }
 }
Beispiel #2
0
 /// <summary>
 /// 单个记录移动
 /// </summary>
 private void SingleMove()
 {
     if (String.IsNullOrEmpty(this.ParentEntityId))
     {
         return;
     }
     frmModuleSelect = new FrmModuleSelect(this.ParentEntityId);
     frmModuleSelect.AllowNull = true;
     frmModuleSelect.OnButtonConfirmClick += new FrmModuleSelect.ButtonConfirmEventHandler(this.CheckInputMove);
     if (frmModuleSelect.ShowDialog() == DialogResult.OK)
     {
         // 设置鼠标繁忙状态,并保留原先的状态
         Cursor holdCursor = this.Cursor;
         this.Cursor = Cursors.WaitCursor;
         // 调用事件
         DotNetService.Instance.ModuleService.MoveTo(UserInfo, this.CurrentEntityId, frmModuleSelect.SelectedId);
         // 移动treeNode
         BaseInterfaceLogic.FindTreeNode(this.tvModule, BaseModuleEntity.FieldId, frmModuleSelect.SelectedId);
         BaseInterfaceLogic.MoveTreeNode(this.tvModule, this.tvModule.SelectedNode, BaseInterfaceLogic.TargetNode);
         // 绑定grdModule
         this.GetModuleList();
         if (this.DTModuleList.Rows.Count > 0)
             this.grdModule.FirstDisplayedScrollingRowIndex = this.DTModuleList.Rows.Count - 1;
         // 设置鼠标默认状态,原来的光标状态
         this.Cursor = holdCursor;
     }
 }