/// <summary> /// Handles the Click event of the btnAdd control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// 创建人:桂书丛 /// 创建日期:2013-02-23 private void btnAdd_Click(object sender, EventArgs e) { Random myRandom = new Random(); this.RightID = myRandom.Next(0, 32767); ClassAssist.DataOperator.OperatorTree(this.tvwModule, null); frmRightAdd myfrmRightAdd = new frmRightAdd(this.RightID); if (myfrmRightAdd.ShowDialog() == DialogResult.OK) { InitializeDate(); } }
/// <summary> /// Handles the Click event of the btnUpdate control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> /// 创建人:桂书丛 /// 创建日期:2013-02-23 private void btnUpdate_Click(object sender, EventArgs e) { if (this.gridViewMain.SelectedRowsCount <= 0) { XtraMessageBox.Show("请先选择要修改的项", "操作违规", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } object[] tempInfo = ClassAssist.CommonOperator.GetGVSelectRowInfo(this.gridViewMain); if (tempInfo != null) { frmRightAdd myfrmRightAdd = new frmRightAdd(tempInfo); if (myfrmRightAdd.ShowDialog() == DialogResult.OK) { InitializeDate(); } } }