public AgreementPlotForm(SupplementalAgreementPlotPresenter plotPresenter) { InitializeComponent(); m_plotPresenter = plotPresenter; txtPlotName.Text = plotPresenter.m_PlotName; }
public void Activate(IGTCustomCommandHelper CustomCommandHelper) { if (GTDataContext.IsRoleGranted("PRIV_DESIGN_ALL")) { try { SupplementalAgreementPlotPresenter presenter = new SupplementalAgreementPlotPresenter(GTDataContext , GTDDCKeyObjects, m_iGtApplication, CustomCommandHelper); if (presenter.IsValidCommand()) { AgreementPlotForm agreementPlotForm = new AgreementPlotForm(presenter); agreementPlotForm.StartPosition = FormStartPosition.CenterParent; agreementPlotForm.ShowDialog(m_iGtApplication.ApplicationWindow); } else { MessageBox.Show(presenter.m_UserMessage, "G/Technology", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); ExitCommand(CustomCommandHelper); } } catch (Exception ex) { MessageBox.Show(ex.Message, "G/Technology", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); ExitCommand(CustomCommandHelper); } } else { MessageBox.Show("User does not have PRIV_DESIGN_ALL role.", "G/Technology", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }