private void toolStripButtonAdd_Click(object sender, EventArgs e) { using (View.LendingManageForms.PersonAddEdit f = new View.LendingManageForms.PersonAddEdit()) { bool flag = (this.Parent as Njit.Common.Popup.Popup).AutoClose; (this.Parent as Njit.Common.Popup.Popup).AutoClose = true; f.ShowDialog(); (this.Parent as Njit.Common.Popup.Popup).AutoClose = flag; } }
private void toolStripButtonEdit_Click(object sender, EventArgs e) { if (radGridView.SelectedRows.Count != 1) { return; } Model.Archive.Person person = radGridView.SelectedRows[0].DataBoundItem as Model.Archive.Person; using (View.LendingManageForms.PersonAddEdit f = new View.LendingManageForms.PersonAddEdit(person.ID)) { bool flag = (this.Parent as Njit.Common.Popup.Popup).AutoClose; (this.Parent as Njit.Common.Popup.Popup).AutoClose = true; f.ShowDialog(); (this.Parent as Njit.Common.Popup.Popup).AutoClose = flag; } }