コード例 #1
0
 void ListContacts_Loaded(object sender, RoutedEventArgs e)
 {
     _vm = this.DataContext as NewListContactViewModel;
   // _vm.NewListContactsLoadedCommand.Execute(null);
    
     
 }
コード例 #2
0
 private void chkShowInactive_Unchecked(object sender, RoutedEventArgs e)
 {
     _vm = this.DataContext as NewListContactViewModel;
     _vm.ShowInactive = false;
     _vm.GetContacts();
 }
コード例 #3
0
 /// <summary>
 /// Provides a deterministic way to create the ListContactViewModel property.
 /// </summary>
 public static void CreateNewListContactViewModel()
 {
     if (_newlistContactViewModelPropertyName == null)
     {
         _newlistContactViewModelPropertyName = new NewListContactViewModel();
     }
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 /// <summary>
 /// Provides a deterministic way to delete the ListContactViewModel property.
 /// </summary>
 public static void ClearNewListContactViewModel()
 {
     _newlistContactViewModelPropertyName.Cleanup();
     _newlistContactViewModelPropertyName = null;
 }