public frmRoleEdit(frmRoleList _frmRoleList, SysUser _User, string _PrimaryKey, int _OperationType) { InitializeComponent(); PrimaryKey = _PrimaryKey; OperationType = _OperationType; User = _User; frmParent = _frmRoleList; if (OperationType == 3) { getDetail(); this.btnSave.Visible = false; } if (OperationType == 2) { getDetail(); this.R_UpdateBy.Text = User.F_Account; this.R_Code.ReadOnly = true; } if (OperationType == 1) { R_CreateBy.Text = User.F_Account; } }
private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e) { frmRoleList frmRole = new frmRoleList(this); frmRole.WindowState = FormWindowState.Maximized; foreach (DockContent frm in this.panMain.Contents) { if (frm.Name == frmRole.Name) { frm.Activate();//激活 return; } } frmRole.Show(this.panMain); }