Beispiel #1
0
        private void btnAccountExecutiveLookup_Click(object sender, EventArgs e)
        {
            var peoplePicker = new Popups.PeoplePicker {
                txtFind = { Text = txtExecutiveName.Text }
            };

            this.TopMost = false;

            peoplePicker.ShowDialog();
            if (peoplePicker.SelectedUser == null)
            {
                return;
            }

            txtExecutiveName.Text   = peoplePicker.SelectedUser.DisplayName;
            txtExecutiveTitle.Text  = peoplePicker.SelectedUser.Title;
            txtExecutiveEmail.Text  = peoplePicker.SelectedUser.EmailAddress;
            txtExecutivePhone.Text  = peoplePicker.SelectedUser.VoiceTelephoneNumber;
            txtBranchAddress1.Text  = peoplePicker.SelectedUser.BranchAddressLine1;
            txtExecutiveMobile.Text = peoplePicker.SelectedUser.Mobile;
            txtBranchAddress2.Text  = peoplePicker.SelectedUser.BranchAddressLine2;

            txtExecutiveDepartment.Text = peoplePicker.SelectedUser.Branch;

            txtBranchPhone.Text = peoplePicker.SelectedUser.BranchPhone;
            txtFax.Text         = peoplePicker.SelectedUser.Fax;

            //TODO fix this (we have no branch postal addresses)
            txtPostal1.Text = peoplePicker.SelectedUser.BranchPostalAddress.GetPostalAddressFragment(true);
            txtPostal2.Text = peoplePicker.SelectedUser.BranchPostalAddress.GetPostalAddressFragment(false);
        }
        private void btnOtherContactLookup_Click(object sender, EventArgs e)
        {
            var peoplePicker = new Popups.PeoplePicker {
                txtFind = { Text = txtOtherContactName.Text }
            };

            this.TopMost = false;
            peoplePicker.ShowDialog();
            if (peoplePicker.SelectedUser == null)
            {
                return;
            }

            txtOtherContactName.Text    = peoplePicker.SelectedUser.DisplayName;
            txtOtherContactTitle.Text   = peoplePicker.SelectedUser.Title;
            txtOtherContactEmail.Text   = peoplePicker.SelectedUser.EmailAddress;
            txtOtherContactPhone.Text   = peoplePicker.SelectedUser.VoiceTelephoneNumber;
            txtOtherExecDepartment.Text = peoplePicker.SelectedUser.Branch;
        }
        private void btnClaimsExecutiveLookup_Click(object sender, EventArgs e)
        {
            var peoplePicker = new Popups.PeoplePicker(txtClaimsExecutiveName.Text, this);

            if (peoplePicker.SelectedUser == null)
            {
                this.TopMost = false;

                peoplePicker.ShowDialog();
                if (peoplePicker.SelectedUser == null)
                {
                    return;
                }
            }

            txtClaimsExecutiveName.Text  = peoplePicker.SelectedUser.DisplayName;
            txtClaimsExecutiveTitle.Text = peoplePicker.SelectedUser.Title;
            txtClaimsExecutiveEmail.Text = peoplePicker.SelectedUser.EmailAddress;
            txtClaimsExecutivePhone.Text = peoplePicker.SelectedUser.VoiceTelephoneNumber;
            txtClaimExecDepartment.Text  = peoplePicker.SelectedUser.Branch;
        }
Beispiel #4
0
        private void btnAccountExecutiveLookup_Click(object sender, EventArgs e)
        {
            var peoplePicker = new Popups.PeoplePicker {
                txtFind = { Text = txtExecutiveName.Text }
            };

            this.TopMost = false;
            peoplePicker.ShowDialog();
            if (peoplePicker.SelectedUser == null)
            {
                return;
            }



            txtExecutiveName.Text       = peoplePicker.SelectedUser.DisplayName;
            txtExecutiveEmail.Text      = peoplePicker.SelectedUser.EmailAddress;
            txtExecutivePhone.Text      = peoplePicker.SelectedUser.VoiceTelephoneNumber;
            txtExecutiveMobile.Text     = peoplePicker.SelectedUser.Mobile;
            txtExecutiveDepartment.Text = peoplePicker.SelectedUser.Branch;
        }