예제 #1
0
        //添加
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            if (treeList1.FocusedNode == null)
            {
                return;
            }
            BasicClass.cResult r = new BasicClass.cResult();
            r.RowChanged += new BasicClass.RowChangedHandler(r_RowChanged);
            Form fr = new frZaiYaoOne(r, dt, Convert.ToInt32(treeList1.FocusedNode.GetValue("ID")), 0);

            fr.ShowDialog();
        }
예제 #2
0
 private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     if (treeList1.FocusedNode.Level == 0)
     {
         XtraMessageBox.Show("顶级项目不能修改");
     }
     else
     {
         if (treeList1.FocusedNode == null)
         {
             return;
         }
         BasicClass.cResult r = new BasicClass.cResult();
         r.RowChanged += new BasicClass.RowChangedHandler(r_RowChanged);
         Form fr = new frZaiYaoOne(r, dt, Convert.ToInt32(treeList1.FocusedNode.ParentNode.GetValue("ID")), Convert.ToInt32(treeList1.FocusedNode.GetValue("ID")));
         fr.ShowDialog();
     }
 }