EventAggrigationProvider added to handle events between windows/usercontrols, persons can be added now
This commit is contained in:
@ -50,6 +50,12 @@ namespace TrackerWPFUI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public void CancelCreation()
|
||||
{
|
||||
EventAggregationProvider.TrackerEventAggregator.PublishOnUIThread(new PersonModel());
|
||||
this.TryClose();
|
||||
}
|
||||
|
||||
public bool CanCreatePerson(string firstName, string lastName, string email, string cellphone)
|
||||
{
|
||||
if(firstName.Length>0 && lastName.Length>0 && email.Length>0 && cellphone.Length > 0)
|
||||
@ -74,6 +80,9 @@ namespace TrackerWPFUI.ViewModels
|
||||
GlobalConfig.Connection.CreatePerson(p);
|
||||
|
||||
//TODO - Send results back to parent and close
|
||||
|
||||
EventAggregationProvider.TrackerEventAggregator.PublishOnUIThread(p);
|
||||
this.TryClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user