public frmDictionaryEdit(frmDictionaryList _frmDictionaryList, SysUser _User, string _PrimaryKey, int _OperationType) { InitializeComponent(); PrimaryKey = _PrimaryKey; OperationType = _OperationType; User = _User; frmParent = _frmDictionaryList; if (OperationType == 3) { getDetail(); this.btnSave.Visible = false; } if (OperationType == 2) { getDetail(); this.D_UpdateBy.Text = User.F_Account; this.D_Code.ReadOnly = true; } if (OperationType == 1) { D_CreateBy.Text = User.F_Account; } }
private void cmsDictionary_Click(object sender, EventArgs e) { frmDictionaryList frmDictionary = new frmDictionaryList(this); frmDictionary.TopLevel = false; frmDictionary.WindowState = FormWindowState.Maximized; foreach (DockContent frm in this.panMain.Contents) { if (frm.Name == frmDictionary.Name) { frm.Activate();//激活 return; } } frmDictionary.Show(this.panMain); }