Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            ArrayList fields = new ArrayList();

            for (int i = 0; i < dgvShow.Columns.Count; i++)
            {
                if (!dgvShow.Columns[i].HeaderText.Trim().Equals("id"))
                {
                    fields.Add(dgvShow.Columns[i].HeaderText);
                }
            }
            FrmTreeField treeFieldForm = new FrmTreeField();

            treeFieldForm.FieldNames = fields;
            treeFieldForm.ShowDialog();
            if (treeFieldForm.DialogResult == DialogResult.Yes)
            {
                treefields = fields;
                viewStatus();

                if (fields.Count > 0)
                {
                    CostEditLogic logic = new CostEditLogic();
                    treeView1.Nodes.Clear();
                    logic.DistillAlterBitumenExpenditureTree(ref treeView1, fields);
                }
            }
        }
Ejemplo n.º 2
0
        private void FormInit()
        {
            bottonSearch();
            treefields.Clear();
            treefields.Add("费用类别");
            CostEditLogic logic = new CostEditLogic();

            treeView1.Nodes.Clear();
            logic.DistillAlterBitumenExpenditureTree(ref treeView1, treefields);
            viewStatus();
        }