public DriverViewModel() { _driverServiceClient = new DriverServiceClient(); _raceServiceClient = new RaceServiceClient(); LoadDrivers(); RefreshCommand = new RelayCommand(OnRefresh); NewCommand = new RelayCommand(OnNew); EditCommand = new RelayCommand(OnEdit, CanEdit); CopyCommand = new RelayCommand(OnCopy, CanCopy); DeleteCommand = new RelayCommand(OnDelete, CanDelete); SaveCommand = new RelayCommand(OnSave, CanSave); OnNew(); }
public RaceViewModel() { _raceServiceClient = new RaceServiceClient(); _driverServiceClient = new DriverServiceClient(); LoadRaces(); RefreshCommand = new RelayCommand(OnRefresh); NewCommand = new RelayCommand(OnNew); EditCommand = new RelayCommand(OnEdit, CanEdit); CopyCommand = new RelayCommand(OnCopy, CanCopy); DeleteCommand = new RelayCommand(OnDelete, CanDelete); SaveCommand = new RelayCommand(OnSave, CanSave); AddDriverCommand = new RelayCommand(OnAddDriver, CanAddDriver); RemoveDriverCommand = new RelayCommand(OnRemoveDriver, CanRemoveDriver); OnNew(); }