Exemplo n.º 1
0
        /// <summary>
        /// Initializes the popup dialog for contacts entry
        /// </summary>
        private void DisplayContactForm(bool IsNew)
        {
            if (gvCompany.RowCount > 0)
                this.SetFocusedViewInstance(eViewType.Company);

            if (m_objCompany == null)
                return;

            m_objContactForm = new AddContact(m_objCompany.id);
            m_objContactForm.StartPosition = FormStartPosition.CenterScreen;
            if (m_objContactForm.ShowDialog(this.ParentForm) == DialogResult.OK) {
                this.PopulateContactView(m_objCompany.id);
                MessageBox.Show("Contact has been saved.", m_MessageBoxCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Displays the contact form
        /// </summary>
        /// <param name="IsNew"></param>
        private void DisplayContactForm(bool IsNew)
        {
            // WaitDialog.CreateWaitDialog("Loading add contact form...");

            if (IsNew)
                m_objContactForm = new AddContact(oAppointment.AccountId);
            else
                m_objContactForm = new AddContact(oAppointment.AccountId, m_oContactView.SelectedContact.id);

            m_objContactForm.simpleButtonCancel.Click += new EventHandler(m_objContactFormCancelButton_Click);
            m_objContactForm.simpleButtonSave.Click += new EventHandler(m_objContactFormSaveButton_Click);
            m_objContactForm.FormClosed += new FormClosedEventHandler(m_objContactForm_FormClosed);
            m_objContactForm.StartPosition = FormStartPosition.CenterScreen;
            //WaitDialog.CloseWaitDialog();
            m_objContactForm.ShowDialog(this.ParentForm);
        }