예제 #1
0
        private void DeleteContact(string distinguishedName)
        {
            // Create new contact
            ExchangeContactViewModel viewModel = new ExchangeContactViewModel();
            viewModel.ViewModelEvent += viewModel_ViewModelEvent;

            viewModel.DeleteContact(distinguishedName, WebSessionHandler.SelectedCompanyCode);

            GetContacts();
        }
예제 #2
0
        private void CreateContact()
        {
            MailContactObject newContact = new MailContactObject();
            newContact.DisplayName = txtDisplayName.Text;
            newContact.Email = txtEmail.Text;
            newContact.Hidden = cbHidden.Checked;

            // Create new contact
            ExchangeContactViewModel viewModel = new ExchangeContactViewModel();
            viewModel.ViewModelEvent += viewModel_ViewModelEvent;

            viewModel.NewContact(WebSessionHandler.SelectedCompanyCode, newContact);

            GetContacts();
        }
예제 #3
0
        private void GetContact(string distinguishedName)
        {
            ExchangeContactViewModel viewModel = new ExchangeContactViewModel();
            viewModel.ViewModelEvent += viewModel_ViewModelEvent;

            MailContactObject contact = viewModel.GetContact(distinguishedName);
            hfContactDistinguishedName.Value = distinguishedName;
            txtDisplayName.Text = contact.DisplayName;
            txtEmail.Text = contact.Email;
            cbHidden.Checked = contact.Hidden;

            txtEmail.ReadOnly = true;

            panelContactList.Visible = false;
            panelEditContact.Visible = true;
        }
예제 #4
0
        private void UpdateContact(string distinguishedName)
        {
            MailContactObject updateContact = new MailContactObject();
            updateContact.DisplayName = txtDisplayName.Text;
            updateContact.Hidden = cbHidden.Checked;

            // Create new contact
            ExchangeContactViewModel viewModel = new ExchangeContactViewModel();
            viewModel.ViewModelEvent += viewModel_ViewModelEvent;

            viewModel.UpdateContact(distinguishedName, updateContact);

            GetContacts();
        }
예제 #5
0
        private void GetContacts()
        {
            ExchangeContactViewModel viewModel = new ExchangeContactViewModel();
            viewModel.ViewModelEvent += viewModel_ViewModelEvent;

            List<MailContactObject> contacts = viewModel.GetContacts(WebSessionHandler.SelectedCompanyCode);
            repeaterContactList.DataSource = contacts;
            repeaterContactList.DataBind();

            panelContactList.Visible = true;
            panelEditContact.Visible = false;
        }