public ServiceDetailWindow(SystemServiceViewModel systemServiceView,
                            ItemsMonitoringService itemsMonitoringService)
 {
     InitializeComponent();
     _systemServiceView      = systemServiceView;
     _itemsMonitoringService = itemsMonitoringService;
     Populate();
 }
Exemple #2
0
        private void InstanceServices()
        {
            var companyEndPoint = new CompanyEndPoint(_customHttpCliente);

            _agentService           = new AgentService(new AgentEndPoint(_customHttpCliente));
            _itemsMonitoringService = new ItemsMonitoringService(new ItemsEndPoint(_customHttpCliente));
            _userService            = new UserService(new UserEndPoint(_customHttpCliente), companyEndPoint);
            _companyService         = new CompanyService(companyEndPoint);
        }
Exemple #3
0
        public AgentsUserControl(AgentService agentService,
                                 ItemsMonitoringService itensMonitoringService,
                                 EventHandler onSwitchControl,
                                 UserBasicInformationViewModel userBasicInformation)
        {
            InitializeComponent();
            _agentService           = agentService;
            _onSwitchControl        = onSwitchControl;
            _itensMonitoringService = itensMonitoringService;
            _userBasicInformation   = userBasicInformation;
            _indexes = new Dictionary <Guid, AgentUC>();

            if (_userBasicInformation.UserLevel < (int)EUserLevel.Admin)
            {
                btnAdd.IsEnabled  = false;
                btnAdd.Visibility = Visibility.Collapsed;
            }
        }
        public ArchiveDetailWindow(EventHandler modified,
                                   ArchiveViewModel archiveViewModel,
                                   ItemsMonitoringService itemsMonitoringService,
                                   UserBasicInformationViewModel userBasicInformation)
        {
            _onModified             = modified;
            _archiveViewModel       = archiveViewModel;
            _itemsMonitoringService = itemsMonitoringService;
            _userBasicInformation   = userBasicInformation;
            InitializeComponent();
            Populate();


            if (_userBasicInformation.UserLevel < (int)EUserLevel.Admin)
            {
                btnEdit.IsEnabled  = false;
                btnEdit.Visibility = Visibility.Collapsed;
            }
        }
        public AgentDetailUC(Guid id, UserBasicInformationViewModel userBasicInformation,
                             AgentService agentService, ItemsMonitoringService itensMonitoringService)
        {
            InitializeComponent();
            _id = id;
            _userBasicInformation   = userBasicInformation;
            _itensMonitoringService = itensMonitoringService;
            _agentsService          = agentService;

            if (_userBasicInformation.UserLevel < (int)EUserLevel.Admin)
            {
                this.pnlProfile.IsEnabled = false;
            }

            PopulateServices();
            PopulateArchives();
            InsertAgentDetail().ContinueWith(task =>
            {
                PopulateCbProfile();
            }, TaskScheduler.FromCurrentSynchronizationContext());
        }
        public ArchivesUserControl(Guid agentId,
                                   UserBasicInformationViewModel userBasicInformation,
                                   ItemsMonitoringService itemsMonitoringService,
                                   AgentService agentService)
        {
            InitializeComponent();
            _agentId = agentId;
            _userBasicInformation   = userBasicInformation;
            _agentService           = agentService;
            _itemsMonitoringService = itemsMonitoringService;
            _indexes = new Dictionary <Guid, ArchiveUC>();
            _currentTaskScheduler = TaskScheduler.FromCurrentSynchronizationContext();

            if (_userBasicInformation.UserLevel < (int)EUserLevel.Admin)
            {
                btnAdd.IsEnabled  = false;
                btnAdd.Visibility = Visibility.Collapsed;
            }

            Populate();
        }