private void btnAdd_Click(object sender, EventArgs e) { var frmRoleAdd = new FrmEditRole(); if (frmRoleAdd.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { // 获得角色列表 this.GetList(); // 设置数据过滤 this.SetRowFilter(); // 设置按钮状态 this.SetControlState(); } }
private void btnEdit_Click(object sender, EventArgs e) { //var frmRoleEdit = new FrmEditRole(this.TargetRoleId); string tmpId = BasePageLogic.GetDataGridViewEntityId(dgvInfo, PiRoleTable.FieldId); if (string.IsNullOrEmpty(tmpId)) { return; } var frmRoleEdit = new FrmEditRole(tmpId); if (frmRoleEdit.ShowDialog(this) == DialogResult.OK) { this.FormOnLoad(false); } }