Exemplo n.º 1
0
        private new void Update()
        {
            UltraGridRow row = ultraGrid1.ActiveRow;

            if (row == null)
            {
                MetroMessageBox.Show(this, "请选择需要修改的岗位!");
                return;
            }
            SysPost     post  = row.ListObject as SysPost;
            string      orgId = post.PostOrgId;
            DlgPostEdit dlg   = new DlgPostEdit(post, EditType.Update, this.Action);

            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                QueryPost(orgId);
            }
        }
Exemplo n.º 2
0
        private void Add()
        {
            UltraTreeNode node = ultraTree1.ActiveNode;

            if (node == null)
            {
                MetroMessageBox.Show(this, "请选择需要新增岗位的组织机构!");
                return;
            }
            SysPost post = new SysPost();

            post.PostOrgId = (node.Tag as SysOrganization).OrganizationId;
            DlgPostEdit dlg = new DlgPostEdit(post, EditType.Add, this.Action);

            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                QueryPost(post.PostOrgId);
            }
        }