private void AddButton_Click_1(object sender, EventArgs e) { UIErrorHelper.CheckedExecNonModal(delegate() { if (this.AddButton.Text == VMwareMMCIDP.UI.Common.Utilities.MMCUIConstants.EDIT) { SetUIToolsEditability(); this.AddButton.Text = VMwareMMCIDP.UI.Common.Utilities.MMCUIConstants.UPDATE; } else if (UIErrorHelper.ShowConfirm(VMwareMMCIDP.UI.Common.Utilities.MMCUIConstants.CONFIRM) == DialogResult.Yes) { DoValidateControls(); FillDTOWithUIControls(); this.Close(); this.DialogResult = DialogResult.OK; } }); }
private void AddButton_Click(object sender, EventArgs e) { if (this.AddButton.Text == "Edit") { this.AddButton.Text = "Update"; SetEditableFields(); } else if (UIErrorHelper.ShowConfirm(VMwareMMCIDP.UI.Common.Utilities.MMCUIConstants.CONFIRM) == DialogResult.Yes) { UIErrorHelper.CheckedExecNonModal(delegate() { DoValidateControls(); UpdateObjectClassDTOWithUIValues(); this.DialogResult = DialogResult.OK; this.Close(); }); } }