void ListContacts_Loaded(object sender, RoutedEventArgs e) { _vm = this.DataContext as NewListContactViewModel; // _vm.NewListContactsLoadedCommand.Execute(null); }
private void chkShowInactive_Unchecked(object sender, RoutedEventArgs e) { _vm = this.DataContext as NewListContactViewModel; _vm.ShowInactive = false; _vm.GetContacts(); }
/// <summary> /// Provides a deterministic way to create the ListContactViewModel property. /// </summary> public static void CreateNewListContactViewModel() { if (_newlistContactViewModelPropertyName == null) { _newlistContactViewModelPropertyName = new NewListContactViewModel(); } }
private NewListContactViewModel Map(Contact item) { var contact = new NewListContactViewModel(); contact.Name = item.Firstname; contact.RowNumber = 0; contact.MaritalStats = item.MStatus; if (item.DateOfBirth != null) contact.DoB = (DateTime)item.DateOfBirth; contact.JobTitle = item.JobTitle; contact.Company = item.Company; contact.Address = item.PostalAddress; contact.BusinessPhone = item.BusinessPhone; contact.MobilePhone = item.MobilePhone; contact.Email = item.Email; contact.ContactClassification = item.ContactClassification; contact.Id = item.Id; return contact; }
/// <summary> /// Provides a deterministic way to delete the ListContactViewModel property. /// </summary> public static void ClearNewListContactViewModel() { _newlistContactViewModelPropertyName.Cleanup(); _newlistContactViewModelPropertyName = null; }