コード例 #1
0
        /// <summary>
        /// 报表列表切换行
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void treeList_FocusedNodeChanged(object sender, FocusedNodeChangedEventArgs e)
        {
            TreeListEx m_TreeList = sender as TreeListEx;

            if (m_TreeList != null)
            {
                _ObjectReport bs = m_TreeList.GetDataRecordByNode(m_TreeList.FocusedNode) as _ObjectReport;
                if (bs != null)
                {
                    if (bs.GetType().Name == "NodeReport")
                    {
                        this.reportControl1.pictureEdit1.Visible   = true;
                        this.propertyGridControl1.AutoGenerateRows = true;
                        this.propertyGridControl1.SelectedObject   = null;
                        this.reportControl1.printControl1.PrintingSystem.ClearContent();
                    }
                    else
                    {
                        this.reportControl1.pictureEdit1.Visible   = false;
                        this.propertyGridControl1.AutoGenerateRows = true;
                        this.propertyGridControl1.SelectedObject   = bs;
                        this.reportControl1.SetDataSource(new GenerateReport(this.propertyGridControl1.SelectedObject as _ObjectReport));
                        this.reportControl1.m_reportData = this.propertyGridControl1.SelectedObject;
                    }
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// 加载数据
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ReportForm_Load(object sender, EventArgs e)
 {
     m_Report = new GLODSOFT.QDJJ.BUSINESS._UnitProjectReport();
     m_Report.ReportStencil = APP.Cache.BaseReport.Copy() as _List;
     this.m_TreeListFocused = this.treeList1;
     this.Init();
 }
コード例 #3
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            //清空APP

            /*APP.DataObjects.Columns.Columns.Clear();
             * //checkedlist的项还原给APP
             * foreach (CheckedListBoxItem item in this.checkedListBoxControl1.Items)
             * {
             *  APP.DataObjects.Columns.Columns.Add(item.Value);
             * }
             */

            //关闭窗体刷新上一个节点
            //保存配置

            TreeListEx       tl  = this.m_Control as TreeListEx;
            GridViewEx       gv  = this.m_Control as GridViewEx;
            BandedGridViewEx bgv = this.m_Control as BandedGridViewEx;

            if (tl != null)
            {
                this.SaveColorTreeEx(tl);
            }
            if (gv != null)
            {
                this.SaveColorGridEx(gv);
            }
            if (bgv != null)
            {
                this.SaveColorGridEx(bgv);
            }

            APP.DataObjects.Save();
            this.DialogResult = DialogResult.OK;
        }
コード例 #4
0
 /// <summary>
 /// 切换当前选择的树
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void xtraTabControl1_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e)
 {
     if (e.Page.Text == "清单报表")
     {
         m_TreeListFocused = this.treeList1;
     }
     else
     {
         m_TreeListFocused = this.treeList2;
     }
     this.treeList_FocusedNodeChanged(m_TreeListFocused, null);
 }
コード例 #5
0
        private void treeListEx1_Click(object sender, EventArgs e)
        {
            TreeListEx     t  = sender as TreeListEx;
            MouseEventArgs e1 = e as MouseEventArgs;

            if (e1.Button == MouseButtons.Left)
            {
                if (t.Selection[0] != null && !string.IsNullOrEmpty(t.Selection[0].GetValue("FormName").ToString()))
                {
                    doAction(t.Selection[0].GetValue("FormName").ToString(), t.Selection[0].GetValue("SYBH"), t.Selection[0].GetValue("节点名称").ToString(), ToolKit.ParseInt(t.Selection[0].GetValue("ID")));
                    splitContainerControl2.Visible = true;
                }
            }
        }
コード例 #6
0
 /// <summary>
 /// 递归批量预览
 /// </summary>
 /// <param name="p_TreeList"></param>
 /// <param name="p_nodes"></param>
 private void TreeListChecked(TreeListEx p_TreeList, TreeListNodes p_nodes)
 {
     foreach (TreeListNode item in p_nodes)
     {
         if (item.Checked)
         {
             _ObjectReport m_ob = p_TreeList.GetDataRecordByNode(item) as _ObjectReport;
             if (m_ob.GetType() != typeof(NodeReport))
             {
                 this.reportControl1.SetDataSources(new GenerateReport(m_ob));
                 this.reportControl1.m_reportData = this.propertyGridControl1.SelectedObject;
             }
         }
         this.TreeListChecked(p_TreeList, item.Nodes);
     }
 }
コード例 #7
0
ファイル: AtlasGalleryForm.cs プロジェクト: shansheng/QDJJ
        /// <summary>
        /// 获取选择的定额或做法
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void treeListEx1_AfterCheckNode(object sender, DevExpress.XtraTreeList.NodeEventArgs e)
        {
            TreeListEx t = sender as TreeListEx;

            if (e.Node != null)
            {
                object obj = t.GetDataRecordByNode(e.Node);
                if (e.Node.Checked)
                {
                    if (!t.CheckNodes.Contains(obj))
                    {
                        t.CheckNodes.Add(obj);
                    }
                }
                else
                {
                    t.CheckNodes.Remove(obj);
                }
            }
        }
コード例 #8
0
ファイル: ABaseForm.cs プロジェクト: shansheng/QDJJ
        public List <TreeListNode> GetTargetRows(TreeListEx tree, TreeListNode parent, List <string> rules, string field)
        {
            var result = new List <TreeListNode>();

            if (parent == null || parent.HasChildren == false)
            {
                return(result);
            }


            DataRowView rowView;
            DataRow     row;

            foreach (TreeListNode node in parent.Nodes)
            {
                if (rules.Count == 0)
                {
                    break;
                }

                rowView = tree.GetDataRecordByNode(node) as DataRowView;
                if (rowView == null)
                {
                    continue;
                }

                row = rowView.Row;
                if (row[field] == null)
                {
                    continue;
                }

                if (rules.Contains(row.Field <string>(field).ToLower()))
                {
                    rules.Remove(row.Field <string>(field));
                    result.Add(node);
                }
            }
            return(result);
        }
コード例 #9
0
        /// <summary>
        /// 保存树Ex列颜色方案
        /// </summary>
        /// <param name="p_Tree"></param>
        private void SaveColorTreeEx(TreeListEx p_Tree)
        {
            //若不存在
            if (APP.DataObjects.GColor.ColumnColor == null)
            {
                APP.DataObjects.GColor.ColumnColor = new _ColumnColor();
            }
            //初始化模块(不存在则新增)
            APP.DataObjects.GColor.ColumnColor.Init(p_Tree.ModelName);

            //若是第一次使用列配色
            //APP.DataObjects.GColor.ColumnColor.Set(p_Tree.ModelName,);
            foreach (TreeListColumn col in p_Tree.Columns)
            {
                _CellStyle stype = new _CellStyle();
                stype.BColor = col.AppearanceCell.BackColor;
                //保存颜色
                APP.DataObjects.GColor.ColumnColor[p_Tree.ModelName].Set(col.FieldName, stype);
            }

            p_Tree.ColumnColor = APP.DataObjects.GColor.ColumnColor;
            p_Tree.Refresh();
        }