Create Tournament screen is wired up an is functioning

This commit is contained in:
2020-05-18 21:29:14 +02:00
parent bcb1a561d4
commit 1207617a7c
8 changed files with 334 additions and 143 deletions

View File

@ -53,6 +53,12 @@ namespace TrackerWPFUI.ViewModels
}
}
public void CancelCreation()
{
EventAggregationProvider.TrackerEventAggregator.PublishOnCurrentThread(new PrizeModel());
this.TryClose();
}
public bool CanCreatePrize(int placeNumber, string placeName, decimal prizeAmount, double prizePercentage)
{
return ValidateForm(placeNumber, placeName, prizeAmount, prizePercentage);
@ -69,8 +75,8 @@ namespace TrackerWPFUI.ViewModels
};
GlobalConfig.Connection.CreatePrize(model);
//TODO Close out the form and alert the calling form
EventAggregationProvider.TrackerEventAggregator.PublishOnCurrentThread(model);
this.TryClose();
}
private bool ValidateForm(int placeNumber, string placeName, decimal prizeAmount, double prizePercentage)