示例#1
0
        private void btnAddRole_Click(object sender, EventArgs e)
        {
            Man_UserRole_Editor form = new Man_UserRole_Editor();

            form.Visible = false;
            form.Editor_Add();
            form.ShowDialog();
            if (form.DialogResult == DialogResult.OK)
            {
                this.DataBinding_ListView();
            }
        }
示例#2
0
        private void btnModRole_Click(object sender, EventArgs e)
        {
            if (this.listView.SelectedItems.Count == 0)
            {
                return;
            }
            if (this.listView.SelectedItems[0].SubItems[3].Text == "")
            {
                AppServer.ShowMsg_Warn("您无权修改系统内置定义的角色!");
                return;
            }
            int iRoleID = int.Parse(this.listView.SelectedItems[0].SubItems[2].Text);

            var form = new Man_UserRole_Editor();

            form.Visible = false;
            form.Editor_Mod(iRoleID, this.listView.SelectedItems[0].SubItems[0].Text, this.listView.SelectedItems[0].SubItems[1].Text);
            if (form.ShowDialog() == DialogResult.OK)
            {
                //修改当前Item的显示
                this.listView.SelectedItems[0].SubItems[0].Text = form.txtRoleName.Text;
                this.listView.SelectedItems[0].SubItems[1].Text = form.txtRoleMemo.Text;
            }
        }