DatePicker implemented
This commit is contained in:
@@ -22,18 +22,19 @@ namespace Apollon.WPF.ViewModels
|
||||
OnPropertyChanged(nameof(Organisation));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private string _tournamentname;
|
||||
public string Tournamentname
|
||||
private string _tournamentName;
|
||||
public string TournamentName
|
||||
{
|
||||
get
|
||||
{
|
||||
return _tournamentname;
|
||||
return _tournamentName;
|
||||
}
|
||||
set
|
||||
{
|
||||
_tournamentname = value;
|
||||
OnPropertyChanged(nameof(Tournamentname));
|
||||
_tournamentName = value;
|
||||
OnPropertyChanged(nameof(TournamentName));
|
||||
OnPropertyChanged(nameof(CanSubmit));
|
||||
}
|
||||
}
|
||||
@@ -52,31 +53,37 @@ namespace Apollon.WPF.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private string _startdate;
|
||||
public string Startdate
|
||||
private DateTime _startDate = DateTime.Today;
|
||||
|
||||
|
||||
|
||||
public DateTime StartDate
|
||||
{
|
||||
|
||||
get
|
||||
{
|
||||
return _startdate;
|
||||
|
||||
return _startDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
_startdate = value;
|
||||
OnPropertyChanged(nameof(Startdate));
|
||||
_startDate = value;
|
||||
|
||||
OnPropertyChanged(nameof(StartDate));
|
||||
}
|
||||
}
|
||||
|
||||
private string _enddate;
|
||||
public string Enddate
|
||||
private DateTime _endDate = DateTime.Today;
|
||||
public DateTime EndDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return _enddate;
|
||||
return _endDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
_enddate = value;
|
||||
OnPropertyChanged(nameof(Enddate));
|
||||
_endDate = value;
|
||||
OnPropertyChanged(nameof(EndDate));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +115,7 @@ namespace Apollon.WPF.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanSubmit => !string.IsNullOrEmpty(Tournamentname);
|
||||
public bool CanSubmit => !string.IsNullOrEmpty(TournamentName);
|
||||
|
||||
public ICommand SubmitCommand { get; }
|
||||
public ICommand CancelCommand { get; }
|
||||
|
||||
@@ -21,10 +21,10 @@ namespace Apollon.WPF.ViewModels
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel(submitCommand, cancelCommand )
|
||||
{
|
||||
Organisation = tournament.Organisation,
|
||||
Tournamentname = tournament.Tournamentname,
|
||||
TournamentName = tournament.TournamentName,
|
||||
Competition = tournament.Competition,
|
||||
Startdate = tournament.Startdate,
|
||||
Enddate = tournament.Enddate,
|
||||
StartDate = tournament.StartDate,
|
||||
EndDate = tournament.EndDate,
|
||||
Location = tournament.Location,
|
||||
Rounds = tournament.Rounds,
|
||||
};
|
||||
|
||||
@@ -16,10 +16,10 @@ namespace Apollon.WPF.ViewModels
|
||||
|
||||
public bool HasSelectedTournament => SelectedTournament != null;
|
||||
public string Organisation => SelectedTournament?.Organisation ?? "keine Organisation";
|
||||
public string Tournamentname => SelectedTournament?.Tournamentname ?? "kein Name";
|
||||
public string TournamentName => SelectedTournament?.TournamentName ?? "kein Name";
|
||||
public string Category => SelectedTournament?.Competition ?? "keine Kategorie";
|
||||
public string Startdate => SelectedTournament?.Startdate ?? "kein Datum";
|
||||
public string Enddate => SelectedTournament?.Enddate ?? "kein Datum";
|
||||
public string StartDate => SelectedTournament?.StartDate.ToString("d") ?? "kein Datum";
|
||||
public string EndDate => SelectedTournament?.EndDate.ToString("d") ?? "kein Datum";
|
||||
public string Location => SelectedTournament?.Location ?? "kein Ort";
|
||||
public int Rounds => SelectedTournament?.Rounds ?? 0;
|
||||
|
||||
@@ -40,10 +40,10 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
OnPropertyChanged(nameof(HasSelectedTournament));
|
||||
OnPropertyChanged(nameof(Organisation));
|
||||
OnPropertyChanged(nameof(Tournamentname));
|
||||
OnPropertyChanged(nameof(TournamentName));
|
||||
OnPropertyChanged(nameof(Category));
|
||||
OnPropertyChanged(nameof(Startdate));
|
||||
OnPropertyChanged(nameof(Enddate));
|
||||
OnPropertyChanged(nameof(StartDate));
|
||||
OnPropertyChanged(nameof(EndDate));
|
||||
OnPropertyChanged(nameof(Location));
|
||||
OnPropertyChanged(nameof(Rounds));
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public Tournament Tournament { get;}
|
||||
|
||||
public string Tournamentname => Tournament.Tournamentname;
|
||||
public string TournamentName => Tournament.TournamentName;
|
||||
public string Location => Tournament.Location;
|
||||
public ICommand DeleteCommand { get; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user