Ejemplo n.º 1
0
        /// <summary>
        /// 新增组织管理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_addOrg_Click(object sender, EventArgs e)
        {
            FrmOrganize frmO = new FrmOrganize();

            frmO.operationType  = Common.Enum.OperationType.Add;
            frmO._current_orgID = trv_org.SelectedNode == null ? string.Empty : trv_org.SelectedNode.Tag.ToString();
            if (frmO.ShowDialog() == DialogResult.OK)
            {
                InitTreeRoot();
                new PubUtils().ShowNoteOKMsg("新增成功");
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 修改组织管理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btn_editOrg_Click(object sender, EventArgs e)
        {
            if (trv_org.SelectedNode == null)
            {
                new PubUtils().ShowNoteNGMsg("请先选中节点", 1, grade.OrdinaryError);
                return;
            }
            FrmOrganize frmO = new FrmOrganize();

            frmO.operationType  = Common.Enum.OperationType.Edit;
            frmO._current_orgID = trv_org.SelectedNode == null ? string.Empty : trv_org.SelectedNode.Tag.ToString();

            frmO._Parent_orgID = trv_org.SelectedNode == null ? string.Empty : (trv_org.SelectedNode.Parent == null ? "0" : trv_org.SelectedNode.Parent.Tag.ToString());

            if (frmO.ShowDialog() == DialogResult.OK)
            {
                InitTreeRoot();
                new PubUtils().ShowNoteOKMsg("修改成功");
            }
        }