Example #1
0
        private void cboAccountStatus_SelectedIndexChanged(object sender, EventArgs e)
        {
            /**
             * on release, send email.
             * depends on the subcampaign xml configuration on what is set as send_email="true".
             */
            //if (cboAccountStatus.SelectedIndex == m_BrightSalesProperty.CampaignBooking.AccountStatus.AccountStatusSendEmailIndex && !m_BrightSalesProperty.CommonProperty.CurrentWorkedAccountLockedByOtherUser()) {
            if (cboAccountStatus.SelectedIndex == m_BrightSalesProperty.CampaignBooking.AccountStatus.AccountStatuses.FindIndex(i => i.send_email == true) && !m_BrightSalesProperty.CommonProperty.CurrentWorkedAccountLockedByOtherUser()) {

                /**
                 * load send email contacts form.
                 * if return is OK(release button pressed), then load the send email recipients form.
                 */
                FrmSendEmailContacts _control = new FrmSendEmailContacts(FrmSendEmailContacts.eCallMode.OnRelease) {
                    StartPosition = FormStartPosition.CenterParent
                };
                DialogResult _dlg = _control.ShowDialog();

                /**
                 * release and send email.
                 */
                if (_dlg == DialogResult.OK) {
                    this.SaveLeadStatusChanges();
                    FrmSendEmailRecipients _recipients = new FrmSendEmailRecipients() {
                        StartPosition = FormStartPosition.CenterParent
                    };
                    _recipients.ShowDialog();
                }

                /**
                 * release only.
                 */
                else if (_dlg == DialogResult.Ignore)
                    this.SaveLeadStatusChanges();

                else if (_dlg == DialogResult.Cancel) {
                    m_IsReleaseCancel = true;
                    cboAccountStatus.SelectedIndex = int.Parse(cboAccountStatus.Tag.ToString());
                    m_IsReleaseCancel = false;
                }

            }
            else if (!m_IsReleaseCancel)
                this.SaveLeadStatusChanges();

            /**
                * [@jeff 05.16.2013]
                * https://brightvision.jira.com/browse/PLATFORM-2908
            */
            //WaitDialog.Show("Saving changes ...");
            //this.SaveCampaignBookingWorkStatus();
            //WaitDialog.Close();

            cboAccountStatus.Tag = cboAccountStatus.SelectedIndex;
            m_StatusChanged = true;
        }
Example #2
0
 private void btnSendMail_Click(object sender, EventArgs e)
 {
     FrmSendEmailContacts _control = new FrmSendEmailContacts(FrmSendEmailContacts.eCallMode.OnSendEmail) {
         StartPosition = FormStartPosition.CenterParent
     };
     DialogResult _dlg = _control.ShowDialog();
     if (_dlg == DialogResult.OK) {
         FrmSendEmailRecipients _recipients = new FrmSendEmailRecipients() {
             StartPosition = FormStartPosition.CenterParent
         };
         _recipients.ShowDialog();
     }
 }