public RepairMainViewModel(IRepairsManager repairsManager)
        {
            _repairsManager          = repairsManager;
            _customNavigationService = ServiceLocator.Current.GetInstance <ICustomNavigationService>("RepairInternal");

            LoadData();
        }
Ejemplo n.º 2
0
        public RepairAddViewModel(
            IArchitecturesManager architecturesManager,
            IRestorationsManager restorationsManager,
            IRepairsManager repairsManager)
        {
            _architecturesManager = architecturesManager;
            _restorationsManager  = restorationsManager;
            _repairsManager       = repairsManager;

            _customNavigationService = ServiceLocator.Current.GetInstance <ICustomNavigationService>("RepairInternal");

            _repair = _customNavigationService.CurrentPageParams as RepairModel;

            _isAddingMode = _repair == null;

            SaveCommand = _isAddingMode
                ? new RelayCommand(AddRepair)
                : new RelayCommand(UpdateRepair);

            ActionText = _isAddingMode ? "Добавление" : "Редактирование";
            ButtonText = _isAddingMode ? "Добавить" : "Сохранить изменения";

            InitData();
            SetupFields();
        }
Ejemplo n.º 3
0
 static DbInitializer()
 {
     _architectsManager    = ServiceLocator.Current.GetInstance <IArchitectManager>();
     _architecturesManager = ServiceLocator.Current.GetInstance <IArchitecturesManager>();
     _repairsManager       = ServiceLocator.Current.GetInstance <IRepairsManager>();
     _restorationsManager  = ServiceLocator.Current.GetInstance <IRestorationsManager>();
     _sourcesManager       = ServiceLocator.Current.GetInstance <ISourcesManager>();
     _stylesManager        = ServiceLocator.Current.GetInstance <IStylesManager>();
 }
Ejemplo n.º 4
0
        public ArchitectureReportsViewModel(IRepairsManager repairsManager, IArchitecturesManager architecturesManager)
        {
            _repairsManager          = repairsManager;
            _architecturesManager    = architecturesManager;
            _customNavigationService = ServiceLocator.Current.GetInstance <ICustomNavigationService>("ArchitectureInternal");

            DataList = new List <object>();

            LoadData();

            ReportFor  = 10;
            ReportType = RepairAndExpensesType;
        }
        public RepairAutomatisationViewModel(
            IArchitecturesManager architecturesManager,
            IRestorationsManager restorationsManager,
            IRepairsManager repairsManager)
        {
            _architecturesManager = architecturesManager;
            _restorationsManager  = restorationsManager;
            _repairsManager       = repairsManager;

            _customNavigationService = ServiceLocator.Current.GetInstance <ICustomNavigationService>("RepairInternal");

            LoadData();

            CalcAutomatisationCommand = new RelayCommand(CalcAutomatisation);
        }
        public ArchitectureStatisticsViewModel(IRepairsManager repairsManager, IArchitecturesManager architecturesManager,
                                               IStylesManager stylesManager)
        {
            _repairsManager          = repairsManager;
            _architecturesManager    = architecturesManager;
            _stylesManager           = stylesManager;
            _customNavigationService = ServiceLocator.Current.GetInstance <ICustomNavigationService>("ArchitectureInternal");

            _architectureCountryStateList = new List <object>();
            _architectureArchStyleList    = new List <object>();
            _dateSumRepairList            = new List <object>();
            _restorationKindList          = new List <object>();
            DataList = new List <object>();

            LoadData();

            StatisticsType = "Состояние сооружений по странам";
        }