private void mnu_CategoryProperty_Click(object sender, EventArgs e)
        {
            RelatedCompanyType          pc  = categoryTree.SelectedNode.Tag as RelatedCompanyType;
            FrmRelatedCompanyTypeDetail frm = new FrmRelatedCompanyTypeDetail();

            frm.IsAdding     = false;
            frm.UpdatingItem = pc;
            frm.ItemUpdated += delegate(object obj, ItemUpdatedEventArgs args)
            {
                categoryTree.SelectedNode.Text = string.Format("{0}", pc.Name);
            };
            frm.ShowDialog();
        }
        private void mnu_AddCategory_Click(object sender, EventArgs e)
        {
            RelatedCompanyType          pc  = categoryTree.SelectedNode.Tag as RelatedCompanyType;
            FrmRelatedCompanyTypeDetail frm = new FrmRelatedCompanyTypeDetail();

            frm.IsAdding       = true;
            frm.ParentCategory = pc;
            frm.ItemAdded     += delegate(object obj, ItemAddedEventArgs args)
            {
                RelatedCompanyType item = args.AddedItem as RelatedCompanyType;
                AddNode(item, categoryTree.SelectedNode);
            };
            frm.ShowDialog();
        }
Beispiel #3
0
        protected override FrmDetailBase GetDetailForm()
        {
            FrmRelatedCompanyTypeDetail frm = new FrmRelatedCompanyTypeDetail();

            return(frm);
        }