Ejemplo n.º 1
0
 public void UpdateWith(CurrentContactModel ccm)
 {
     Id           = ccm.Id;
     FirstName    = ccm.FirstName;
     LastName     = ccm.LastName;
     DateofBirth  = ccm.DateofBirth;
     Emails       = ccm.Emails.ToList();
     PhoneNumbers = ccm.PhoneNumbers.ToList();
 }
        private void btnCurrentContact_Click(object sender, RoutedEventArgs e)
        {
            Button    btn1 = (Button)sender;
            TextBlock tb   = btn1.FindName("contactName") as TextBlock;

            DataContext = new CurrentContactModel();
            CurrentContactViewModel control2 = new CurrentContactViewModel(tb.Text);

            ContactViewModel.control2.Children.Add(control2);
        }
Ejemplo n.º 3
0
 private void AddContactExecute(object obj)
 {
     try
     {
         CurrentContact = new CurrentContactModel();
     }
     catch (Exception)
     {
         throw;
     }
 }
        private void btnContact_Click(object sender, RoutedEventArgs e)
        {
            Button btn = (Button)sender;

            TextBlock tbContactName  = btn.FindName("tbContactName") as TextBlock;
            TextBlock tbContactEmail = btn.FindName("tbContactEmail") as TextBlock;

            DataContext = new CurrentContactModel();

            CurrentContactViewModel ctrl = new CurrentContactViewModel(tbContactName.Text, tbContactEmail.Text);

            ContactViewModel.ctrl.Children.Add(ctrl);
        }