Esempio n. 1
0
 private void btnRefresh_Click(object sender, EventArgs e)
 {
     LoadReportGroup();
     InitGroups();
     loadReportdata();
     TvReport.ExpandAll();
 }
Esempio n. 2
0
        private void TvReport_DragDrop(object sender, DragEventArgs e)
        {
            //取源节点信息 获得进行"Drag"操作中拖动的字符串
            TreeNode  sourceNode = this.TvReport.SelectedNode;
            Reportdat _report    = (Reportdat)sourceNode.Tag;

            Point m_Position = new Point();

            m_Position.X = e.X;
            m_Position.Y = e.Y;
            m_Position   = TvReport.PointToClient(m_Position);
            TreeNode CurrentNode = this.TvReport.GetNodeAt(m_Position);

            if (CurrentNode != null)//判断你点的是不是一个节点...
            {
                if (CurrentNode.Tag.GetType() == typeof(OpReportMaster) && ((OpReportMaster)CurrentNode.Tag).REPORTMASTER_ID != -1)
                {
                    _report.REPORTMASTER_ID = ((OpReportMaster)CurrentNode.Tag).REPORTMASTER_ID;
                }
                else
                {
                    _report.REPORTMASTER_ID = ((Reportdat)CurrentNode.Tag).REPORTMASTER_ID;
                }
                _report.update();
                loadReportdata();
            }
        }
Esempio n. 3
0
 private void TvReport_MouseDown(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         Point    ClickPoint  = new Point(e.X, e.Y);
         TreeNode CurrentNode = TvReport.GetNodeAt(ClickPoint);
         if (CurrentNode != null)//判断你点的是不是一个节点...
         {
             this.TvReport.SelectedNode = CurrentNode;
         }
     }
 }
Esempio n. 4
0
 private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (!isExpand)
     {
         TvReport.ExpandAll();
         isExpand        = true;
         linkLabel1.Text = "折叠所有报表";
     }
     else
     {
         TvReport.CollapseAll();
         isExpand        = false;
         linkLabel1.Text = "展开所有报表";
     }
 }
Esempio n. 5
0
 /// <summary>
 /// 加载报表树
 /// </summary>
 private void loadReportdata()
 {
     TvReport.Nodes.Clear();
     ReportShow.loadReportdata(TvReport);
     TvReport.ExpandAll();
 }