// base constructor: public DataBaseViewModel(IRepositoryManagerOperations <T> dataProvider, string tabTitle) : base(tabTitle) { _dataProvider = dataProvider; _records = new ObservableCollection <T>(); GenerateAvailableIdCommand = new CommandRelay(GenerateAvailableId, CanExecute_GenerateAvailableIdCommand); SaveRecordCommand = new CommandRelay(SaveRecord, CanExecute_SaveRecordCommand); UpdateRecordCommand = new CommandRelay(UpdateRecord, CanExecute_UpdateCommand); DeleteRecordCommand = new CommandRelay(DeleteRecord, CanExecute_DeleteCommand); RefreshKeysCollection(); }
// Constructor: public RoomKeyBaseViewModel(IRepositoryManagerOperations <RoomKey> dataProvider) : base(dataProvider, "Baza Kluczy") { _presentedRecord = new PresentedRecordRoomKey(); }
// Constructor: public EmployeeBaseViewModel(IRepositoryManagerOperations <Employee> dataProvider) : base(dataProvider, "Baza Pracowników") { _presentedRecord = new PresentedRecordEmployee(); }