コード例 #1
0
        // 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();
        }
コード例 #2
0
 // Constructor:
 public RoomKeyBaseViewModel(IRepositoryManagerOperations <RoomKey> dataProvider) : base(dataProvider, "Baza Kluczy")
 {
     _presentedRecord = new PresentedRecordRoomKey();
 }
コード例 #3
0
 // Constructor:
 public EmployeeBaseViewModel(IRepositoryManagerOperations <Employee> dataProvider) : base(dataProvider, "Baza Pracowników")
 {
     _presentedRecord = new PresentedRecordEmployee();
 }