Пример #1
0
        void btnAdd_Click(object sender, EventArgs e)
        {
            Model.Info_mtl_kind parent = null;

            if (this.treeView1.SelectedNode != null)
            {
                parent = this.treeView1.SelectedNode.Tag as Model.Info_mtl_kind;
            }

            FmMtlKind fm = new FmMtlKind();

            fm.Tag          = parent;
            fm.SelectValue += new Miles.Framework.UI.Forms.FmCustomInfo.SelectValueHandler(fm_SelectValue);
            fm.ShowDialog();
        }
Пример #2
0
        void btnEdit_Click(object sender, EventArgs e)
        {
            if (this.treeView1.SelectedNode == null)
            {
                return;
            }

            Model.Info_mtl_kind kind = this.treeView1.SelectedNode.Tag as Model.Info_mtl_kind;

            FmMtlKind fm = new FmMtlKind(kind);

            if (this.treeView1.SelectedNode.Level > 0)
            {
                fm.Tag = this.treeView1.SelectedNode.Parent.Tag;
            }

            fm.SelectValue += new Miles.Framework.UI.Forms.FmCustomInfo.SelectValueHandler(fm_SelectValue);
            fm.ShowDialog();
        }