public SaveResourceBlockOperation(ResourceBlockViewModel resourceBlock,
                                   ResourceManagerDatabaseSchema databaseSchema, int scheduleId)
 {
     _resourceBlock  = resourceBlock;
     _databaseSchema = databaseSchema;
     _scheduleId     = scheduleId;
 }
 public SavePersonalScheduleOperation(WeekScheduleViewModel selectedSchedule,
                                      PersonalScheduleViewModel personalSchedule,
                                      ResourceManagerDatabaseSchema databaseSchema)
 {
     _selectedSchedule = selectedSchedule;
     _personalSchedule = personalSchedule;
     _databaseSchema   = databaseSchema;
 }
Beispiel #3
0
        public static IDataRepository Instance()
        {
            if (_instance == null)
            {
                var schemaVersion = ConfigurationManager.AppSettings["sql.schema.version"];

                var sqlSchemaVerifier = new SqlSchemaVerifier(schemaVersion);
                var databaseLocation  = Environment.ExpandEnvironmentVariables(ConfigurationManager.AppSettings["sql.database.location"]);
                var databaseSchema    = new ResourceManagerDatabaseSchema(databaseLocation, sqlSchemaVerifier);
                _instance = new SqliteDataRepository(databaseSchema);
            }
            return(_instance);
        }
Beispiel #4
0
        private SqliteDataRepository(ResourceManagerDatabaseSchema databaseSchema)
        {
            _databaseSchema = databaseSchema;
            _allPeople      = new ObservableCollection <IPerson>();
            AllPeople       = new DataCollection <IPerson>(_allPeople);

            _allProjects = new ObservableCollection <IProject>();
            AllProjects  = new DataCollection <IProject>(_allProjects);

            _allSchedules      = new ObservableCollection <IWeeklySchedule>();
            AllWeeklySchedules = new DataCollection <IWeeklySchedule>(_allSchedules);

            _allResourceBlocks = new ObservableCollection <IResourceBlock>();
            AllResourceBlocks  = new DataCollection <IResourceBlock>(_allResourceBlocks);

            LoadInitalData();
        }
 public LoadInitialDataOperation(ResourceManagerDatabaseSchema databaseSchema)
 {
     _databaseSchema = databaseSchema;
 }
Beispiel #6
0
 public UserOperationsBuilder(OperationsQueue operationsQueue, ResourceManagerDatabaseSchema databaseSchema)
 {
     _operationsQueue = operationsQueue;
     _databaseSchema  = databaseSchema;
 }
Beispiel #7
0
 public SaveProjectOperation(ProjectViewModel selectedProject, ResourceManagerDatabaseSchema databaseSchema)
 {
     _selectedProject = selectedProject;
     _databaseSchema  = databaseSchema;
 }
 public SavePersonOperation(PersonViewModel selectedPerson, ResourceManagerDatabaseSchema databaseSchema)
 {
     _selectedPerson = selectedPerson;
     _databaseSchema = databaseSchema;
 }
Beispiel #9
0
 public SaveWeeklyScheduleOperation(WeekScheduleViewModel weekScheduleViewModel, ResourceManagerDatabaseSchema databaseSchema)
 {
     _weekScheduleViewModel = weekScheduleViewModel;
     _databaseSchema        = databaseSchema;
 }