Esempio n. 1
0
        private void mnu_CategoryProperty_Click(object sender, EventArgs e)
        {
            SupplierType          pc  = categoryTree.SelectedNode.Tag as SupplierType;
            FrmSupplierTypeDetail frm = new FrmSupplierTypeDetail();

            frm.IsAdding     = false;
            frm.UpdatingItem = pc;
            frm.ItemUpdated += delegate(object obj, ItemUpdatedEventArgs args)
            {
                categoryTree.Init();
                categoryTree.SelectSupplierTypeNode(pc.ID);
                FreshData();
            };
            frm.ShowDialog();
        }
Esempio n. 2
0
        private void mnu_AddCategory_Click(object sender, EventArgs e)
        {
            SupplierType          pc  = categoryTree.SelectedNode.Tag as SupplierType;
            FrmSupplierTypeDetail frm = new FrmSupplierTypeDetail();

            frm.IsAdding       = true;
            frm.ParentCategory = pc;
            frm.ItemAdded     += delegate(object obj, ItemAddedEventArgs args)
            {
                SupplierType item = args.AddedItem as SupplierType;
                TreeNode     node = categoryTree.AddSupplierTypeNode(item, categoryTree.SelectedNode);
                categoryTree.SelectedNode.Expand();
            };
            frm.ShowDialog();
        }