예제 #1
0
 private void cmdAddContactsToVerify_Click(object sender, EventArgs e)
 {
     WaitDialog.Show("Loading form...");
     PopupDialog _pdlg = new PopupDialog();
     AddEmailVerifyContact _moAddContactEmail = new AddEmailVerifyContact();
     _moAddContactEmail.btnAddToQueue_OnClick += new AddEmailVerifyContact.btnAddToQueueOnClickEventHandler(_moAddContactEmail_btnAddToQueue_OnClick);
     _moAddContactEmail.Dock = DockStyle.Fill;
     _pdlg.FormBorderStyle = FormBorderStyle.FixedSingle;
     _pdlg.MinimizeBox = false;
     _pdlg.MaximizeBox = false;
     _pdlg.StartPosition = FormStartPosition.CenterScreen;
     _pdlg.Text = "Add Contact Emails for Verification";
     _pdlg.Size = new Size(_moAddContactEmail.Width + 2, _moAddContactEmail.Height + 2);
     _pdlg.Controls.Add(_moAddContactEmail);
     _pdlg.Show();
     WaitDialog.Close();
 }
예제 #2
0
        private void _moAddContactEmail_btnAddToQueue_OnClick(object sender, AddEmailVerifyContact.ContactEmailArgs e)
        {
            //m_lstContactEmailQueuer
            BrightPlatformEntities efDbModel = new BrightVision.Model.BrightPlatformEntities(UserSession.EntityConnection);
            foreach (CTEmailVerifyContact _item in e.lstEmailVerifyContacts)
            {
                if (m_lstContactEmails == null)
                    m_lstContactEmails = new List<Email.ContactEmail>();

                else if (m_lstContactEmails.Find(x => x.contact_id == _item.contact_id) != null)
                    continue;

                _item.email_verify_attempt_1 = _item.email_verify_attempt_1 == null ? 0 : _item.email_verify_attempt_1;
                _item.email_verify_attempt_2 = _item.email_verify_attempt_2 == null ? 0 : _item.email_verify_attempt_2;
                _item.email_verify_attempt_3 = _item.email_verify_attempt_3 == null ? 0 : _item.email_verify_attempt_3;

                Email.ContactEmail _ContactEmail = new Email.ContactEmail();
                _ContactEmail.company_name = _item.company_name;
                _ContactEmail.contact_id = _item.contact_id;
                _ContactEmail.email = _item.email;
                _ContactEmail.last_verified_by = _item.email_last_verified_by == null ? 0 : (int)_item.email_last_verified_by;
                _ContactEmail.last_verified_date = _item.email_last_verified_on;
                _ContactEmail.name = _item.first_name + " " + _item.last_name;
                _ContactEmail.s_verify_attempt_1 = Email.GetVerifyCodeValue((short)_item.email_verify_attempt_1);
                _ContactEmail.s_verify_attempt_2 = Email.GetVerifyCodeValue((short)_item.email_verify_attempt_2);
                _ContactEmail.s_verify_attempt_3 = Email.GetVerifyCodeValue((short)_item.email_verify_attempt_3);
                _ContactEmail.selected = true;
                _ContactEmail.verify_attempt_1 = (short)_item.email_verify_attempt_1;
                _ContactEmail.verify_attempt_2 = (short)_item.email_verify_attempt_2;
                _ContactEmail.verify_attempt_3 = (short)_item.email_verify_attempt_3;
                _ContactEmail.verify_no = _item.email_verify_attempt_1.ToString() + _item.email_verify_attempt_2.ToString() + _item.email_verify_attempt_3.ToString();
                m_lstContactEmails.Add(_ContactEmail);
            }

            this.LoadContactEmails();
        }