private void DeleteContact(string distinguishedName) { // Create new contact ExchangeContactViewModel viewModel = new ExchangeContactViewModel(); viewModel.ViewModelEvent += viewModel_ViewModelEvent; viewModel.DeleteContact(distinguishedName, WebSessionHandler.SelectedCompanyCode); GetContacts(); }
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(); }
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; }
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(); }
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; }