예제 #1
0
        private void mnu_AddDivision_Click(object sender, EventArgs e)
        {
            Division          pc  = facilityTree.SelectedNode.Tag as Division;
            FrmDivisionDetail frm = new FrmDivisionDetail();

            frm.IsAdding       = true;
            frm.ParentDivision = pc;
            frm.ItemAdded     += delegate(object obj, ItemAddedEventArgs args)
            {
                Division item = args.AddedItem as Division;
                facilityTree.AddDivisionNode(item, facilityTree.SelectedNode);
                facilityTree.SelectedNode.Expand();
            };
            frm.ShowDialog();
        }
예제 #2
0
        private void mnu_DivisionProperty_Click(object sender, EventArgs e)
        {
            Division pc = facilityTree.SelectedNode.Tag as Division;

            if (pc != null)
            {
                FrmDivisionDetail frm = new FrmDivisionDetail();
                frm.IsAdding     = false;
                frm.UpdatingItem = pc;
                frm.ItemUpdated += delegate(object obj, ItemUpdatedEventArgs args)
                {
                    facilityTree.Init();
                    facilityTree.SelectNode(pc.ID);
                };
                frm.ShowDialog();
            }
        }
 private void mnu_DivisionProperty_Click(object sender, EventArgs e)
 {
     Division pc = facilityTree.SelectedNode.Tag as Division;
     if (pc != null)
     {
         FrmDivisionDetail frm = new FrmDivisionDetail();
         frm.IsAdding = false;
         frm.UpdatingItem = pc;
         frm.ItemUpdated += delegate(object obj, ItemUpdatedEventArgs args)
         {
             facilityTree.Init();
             facilityTree.SelectNode(pc.ID);
         };
         frm.ShowDialog();
     }
 }
 private void mnu_AddDivision_Click(object sender, EventArgs e)
 {
     Division pc = facilityTree.SelectedNode.Tag as Division;
     FrmDivisionDetail frm = new FrmDivisionDetail();
     frm.IsAdding = true;
     frm.ParentDivision = pc;
     frm.ItemAdded += delegate(object obj, ItemAddedEventArgs args)
     {
         Division item = args.AddedItem as Division;
         facilityTree.AddDivisionNode(item, facilityTree.SelectedNode);
         facilityTree.SelectedNode.Expand();
     };
     frm.ShowDialog();
 }