private void bbiAddUser_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { User user = null; try { this.Cursor = Cursors.WaitCursor; user = new User(PROF_IT.Common.Enumerations.TypeForm.NewForm); if (user.ShowDialog() == DialogResult.OK) { } } catch (System.Exception exception) { Exception thisException = exception; Management.ShowException(thisException); } finally { if (user != null) { user.Dispose(); } user = null; this.Cursor = Cursors.Default; } }
private void sbtnDetailUser_Click(object sender, EventArgs e) { User user = null; try { this.Cursor = Cursors.WaitCursor; if (gdvUsers.IsRowSelected(gdvUsers.FocusedRowHandle)) { user = new User(PROF_IT.Common.Enumerations.TypeForm.PropertyForm) { SetUser = (TIS.DL.Internal.User.UserObject)gdvUsers.GetRow(gdvUsers.FocusedRowHandle) }; if (user.ShowDialog() == DialogResult.OK) { this.FindAll(); } } } catch (System.Exception exception) { Exception thisException = exception; Management.ShowException(thisException); } finally { if (user != null) { user.Dispose(); } user = null; this.Cursor = Cursors.Default; } }