コード例 #1
0
        //编辑部门
        private void editOfficer_Click(object sender, EventArgs e)
        {
            if (jobTree.SelectedNode == null)
            {
                GeneralClass.printErrorMsg("没有选择类别!");
                return;
            }

            var depart = db.Department.FirstOrDefault(x => x.name == jobTree.SelectedNode.Text);

            if (depart == null)
            {
                BathClass.printErrorMsg("所选节点异常,请确认!");
                return;
            }

            var form = new DepartmentForm(db, depart, this);

            if (form.ShowDialog() == DialogResult.OK)
            {
                createTree();
            }
        }
コード例 #2
0
        //编辑部门
        private void editOfficer_Click(object sender, EventArgs e)
        {
            if (jobTree.SelectedNode == null)
            {
                GeneralClass.printErrorMsg("没有选择类别!");
                return;
            }

            var depart = db.Department.FirstOrDefault(x => x.name == jobTree.SelectedNode.Text);
            if (depart == null)
            {
                BathClass.printErrorMsg("所选节点异常,请确认!");
                return;
            }

            var form = new DepartmentForm(db, depart, this);
            if (form.ShowDialog() == DialogResult.OK)
                createTree();
        }
コード例 #3
0
 //新增部门
 private void addOfficer_Click(object sender, EventArgs e)
 {
     var form = new DepartmentForm(db, null, this);
     form.ShowDialog();
 }
コード例 #4
0
        //新增部门
        private void addOfficer_Click(object sender, EventArgs e)
        {
            var form = new DepartmentForm(db, null, this);

            form.ShowDialog();
        }