Esempio n. 1
0
        private void btnNewGroup_Click(object sender, EventArgs e)
        {
            int id = TextUtils.ToInt(treeData.FocusedNode != null ? treeData.FocusedNode.GetValue(colIDTree) : 0);
            frmPBDLStructure frm = new frmPBDLStructure();

            frm.ParentID     = id;
            frm.DepartmentID = TextUtils.ToInt(cboParent.SelectedValue);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                _curentNode = frm.CurentNode;
                loadTree();
            }
        }
Esempio n. 2
0
 private void btnEditGroup_Click(object sender, EventArgs e)
 {
     try
     {
         int id = TextUtils.ToInt(treeData.FocusedNode.GetValue(colIDTree));
         if (id == 0)
         {
             return;
         }
         PBDLStructureModel model = (PBDLStructureModel)PBDLStructureBO.Instance.FindByPK(id);
         frmPBDLStructure   frm   = new frmPBDLStructure();
         frm.Model        = model;
         frm.ParentID     = model.ParentID;
         frm.DepartmentID = TextUtils.ToInt(cboParent.SelectedValue);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             _curentNode = frm.CurentNode;
             loadTree();
         }
     }
     catch (Exception)
     {
     }
 }