示例#1
0
 private void EditActivityCommandExecuted(ActivityModel item)
 {
     RaisePropertyChanged("DisableParentWindow");
     _originalActivity = item.Clone();
     var window = new AddActivityView(Enquiry, item);
     window.ShowDialog();
     if (window.DialogResult != null && !window.DialogResult.Value)
     {
         item.ActivityType.ID = _originalActivity.ActivityType.ID;
         item.Details = _originalActivity.Details;
         item.Direction = _originalActivity.Direction;
         item.Length = _originalActivity.Length;
         item.Date = _originalActivity.Date;
         //item.FollowUp = _originalActivity.FollowUp;
         
         item.Refresh();
     }
     else
     {
         Enquiry.Activities = new ObservableCollection<ActivityModel>(Enquiry.Activities.OrderByDescending(x => x.Date));
     }
     RaisePropertyChanged("EnableParentWindow");
 }
示例#2
0
        private void EditActivityCommandExecute(ActivityModel item)
        {
            RaisePropertyChanged("DisableParentWindow");

            var window = new AddActivityView(_allEnquiries, item);
            window.ShowDialog();

            RaisePropertyChanged("EnableParentWindow");

            item.Refresh();

            if (window.DialogResult == null || window.DialogResult != true) return;

            ReloadEnquiries();
        }