public IndexModel(
     ISectorService sectorService,
     IUserService userService)
 {
     _sectorService = sectorService;
     _userService   = userService;
 }
Exemple #2
0
        public EditEmployeeViewModel(EditEmployee editEmployeeOpen, vwEmployee employeeEdit)
        {
            eventObject     = new EventClass();
            editEmployee    = editEmployeeOpen;
            selectedMenager = new vwMenager();
            employee        = employeeEdit;

            selctedLocation = new vwLOCATION();
            selectedMenager = new vwMenager();
            //selectedMenager.Menager = employee.MenagerName;
            StartDate = (DateTime)employee.DateOfBirth;
            Sector    = employee.SectorName;

            locationService = new LocationService();
            employeeService = new EmployeeService();
            genderService   = new GenderService();
            sectorService   = new SectorService();

            LocationList = locationService.GetAllLocations().ToList();
            LocationList.OrderByDescending(x => x.Location);
            LocationList.Reverse();

            PotentialMenagers = employeeService.GetAllPotentialMenagersForEditWindow(employeeEdit.EmployeeID);

            eventObject.ActionPerformed += ActionPerformed;

            oldEmployee           = new vwEmployee();
            oldEmployee.FirstName = employee.FirstName;
            oldEmployee.LastName  = employee.LastName;
            oldEmployee.JMBG      = employee.JMBG;
        }
 public SectorsController(ApplicationDbContext context, ISectorService sectorService, ISecurityService securityService, IApplicationSectorService applicationSectorService, IApplicationService applicationService) : base(securityService)
 {
     _context                  = context;
     _sectorService            = sectorService;
     _applicationSectorService = applicationSectorService;
     _applicationService       = applicationService;
 }
Exemple #4
0
        public AddEmployeeViewModel(AddEmployee addEmployeeOpen)
        {
            eventObject = new EventClass();

            SelectedMenager = new ManagerDto();


            employee    = new tblEmployee();
            addEmployee = addEmployeeOpen;

            locationService = new LocationService();
            employeeService = new EmployeeService();

            sectorService = new SectorService();

            locationsInDb = locationService.GetAllLocations().ToList();

            LocationList    = ConvertLocationDtoList(locationsInDb);
            selctedLocation = LocationList.FirstOrDefault();
            LocationList.OrderByDescending(x => x.Location);
            LocationList.Reverse();



            managersInDb = employeeService.GetAllPotentialMenagers();

            PotentialMenagers = ConvertManagerListToDto(managersInDb);


            eventObject.ActionPerformed += ActionPerformed;
        }
Exemple #5
0
        public MainViewModel(MainWindow mainView)
        {
            view = mainView;

            employeeService = new EmployeeService();
            locationService = new LocationService();
            sectorService   = new SectorService();

            if (locationService.GetAllLocations().Count == 0)
            {
                LocationFileActions.AddLocationsToDatabase();
            }

            employees = employeeService.GetEmployees();

            EmployeeList = ConvertToListEmployeeDto(employees);

            worker         = new BackgroundWorker();
            worker.DoWork += DoWork;
            worker.WorkerReportsProgress      = true;
            worker.WorkerSupportsCancellation = true;
            worker.RunWorkerCompleted        += RunWorkerCompleted;

            worker.RunWorkerAsync();

            eventObject.ActionPerformed += ActionPerformed;
        }
Exemple #6
0
        public EditEmployeeViewModel(EditEmployee editEmployeeView, tblEmployee employeeLogedIn)
        {
            view           = editEmployeeView;
            qualifications = new List <string>()
            {
                "I", "II", "III", "IV", "V", "VI", "VII"
            };

            userService     = new UserService();
            sectorService   = new SectorService();
            employeeService = new EmployeeService();
            positionService = new PositionService();
            managerService  = new ManagerService();
            requestService  = new RequestService();

            User           = new tblUser();
            EmployeeToEdit = employeeService.GetvwEmployeeByEmployeeId(employeeLogedIn.EmployeeID);
            //Employee = new tblEmployee();
            SectorList   = sectorService.GetSectors();
            PositionList = positionService.GetPositions();
            //MessageBox.Show(employeeLogedIn.EmployeeID.ToString());
            oldEmployee = employeeLogedIn;

            oldUserName = EmployeeToEdit.Username;
            oldJMBG     = EmployeeToEdit.JMBG;
        }
 public HomeController(ISectorService sectorService, IApplicationService applicationService,
                       ISecurityService securityService, IDatasetService datasetService) : base(securityService)
 {
     _sectorService      = sectorService;
     _applicationService = applicationService;
     _datasetService     = datasetService;
 }
Exemple #8
0
        public EmployeeRegisterViewModel(EmployeeRegisterView employeeRegisterView)
        {
            view           = employeeRegisterView;
            qualifications = new List <string>()
            {
                "I", "II", "III", "IV", "V", "VI", "VII"
            };

            userService     = new UserService();
            sectorService   = new SectorService();
            employeeService = new EmployeeService();
            positionService = new PositionService();
            managerService  = new ManagerService();

            User         = new tblUser();
            Employee     = new tblEmployee();
            SectorList   = sectorService.GetSectors();
            PositionList = positionService.GetPositions();

            //if (SectorList.Count==0)
            //{
            //    ViewNoSectorMessage = Visibility.Visible;

            //}
            //else
            //{
            //    ViewNoSectorMessage = Visibility.Hidden;

            //}
        }
 public HomeController(
     ISectorService sectorService,
     ISubmissionService submissionService
     )
 {
     _sectorService     = sectorService;
     _submissionService = submissionService;
 }
 public CompanyDetailService(ICompanyDetailRepository companyDetailRepository, ISectorRepository sectorRepository, ISectorService sectorService, IUserService userService, IMessageService messageService)
 {
     _companyDetailRepository = companyDetailRepository;
     _sectorRepository        = sectorRepository;
     _sectorService           = sectorService;
     _userService             = userService;
     _messageService          = messageService;
 }
        public AddSectorViewModel(AddSector addSector)
        {
            view = addSector;


            sectorService = new SectorService();

            Sector = new tblSector();
        }
 public CompanyDetailController(ICompanyDetailService companyDetailService, ISectorService sectorService, IUserService userService, IJobAdvertisementService jobAdvertisementService, IUserDetailService userDetailService, IUserCurriculumVitaeService userCurriculumVitaeService)
 {
     _companyDetailService       = companyDetailService;
     _sectorService              = sectorService;
     _userService                = userService;
     _jobAdvertisementService    = jobAdvertisementService;
     _userDetailService          = userDetailService;
     _userCurriculumVitaeService = userCurriculumVitaeService;
 }
Exemple #13
0
 public CompaniesController(ICompanyService companyService, ICountyService countyService, ICountryService countryService, ICityService cityService, ISectorService sectorService, IHostingEnvironment environment)
 {
     this.companyService = companyService;
     this.countyService  = countyService;
     this.countryService = countryService;
     this.cityService    = cityService;
     this.sectorService  = sectorService;
     this._environment   = environment;
 }
 public CompaniesController(ICompanyService companyService, ICompanyTypeService companyTypeService, ICityService cityService, ICountryService countryService, IRegionService regionService, ISectorService sectorService)
 {
     this.companyService     = companyService;
     this.companyTypeService = companyTypeService;
     this.cityService        = cityService;
     this.countryService     = countryService;
     this.regionService      = regionService;
     this.sectorService      = sectorService;
 }
 public SuppliersController(ISupplierService supplierService, IBusinessAreaService businessAreaService, ICompanyService companyService, ICountryService countryService, ICityService cityService, ISectorService sectorService)
 {
     this.supplierService     = supplierService;
     this.businessAreaService = businessAreaService;
     this.companyService      = companyService;
     this.countryService      = countryService;
     this.cityService         = cityService;
     this.sectorService       = sectorService;
 }
Exemple #16
0
 public SectorsController(ISectorRepository sectorRepository,
                          IMapper mapper,
                          ISectorService sectorService,
                          INotifier notificador) : base(notificador)
 {
     _sectorRepository = sectorRepository;
     _mapper           = mapper;
     _sectorService    = sectorService;
 }
Exemple #17
0
        public SectorsViewModel(Sectors sectors)
        {
            view = sectors;


            sectorService = new SectorService();

            Sector     = new tblSector();
            SectorList = sectorService.GetSectors();
        }
Exemple #18
0
 public LeadsController(ILeadService leadService, ICountryService countryService, ISectorService sectorService, ICityService cityService, IRegionService regionService, ILeadSourceService leadSourceService, ILeadStatusService leadStatusService)
 {
     this._leadService       = leadService;
     this._cityService       = cityService;
     this._leadSourceService = leadSourceService;
     this._leadStatusService = leadStatusService;
     this._regionService     = regionService;
     this._sectorService     = sectorService;
     this._countryService    = countryService;
 }
Exemple #19
0
 public ApplicationsController(ISecurityService securityService, IApplicationService applicationService, IUserService userService,
                               ISectorService sectorService, INationalComponentService nationalComponentsService, IAppRegistry appRegistry, IVendorService vendorService) : base(securityService)
 {
     _applicationService        = applicationService;
     _userService               = userService;
     _sectorService             = sectorService;
     _nationalComponentsService = nationalComponentsService;
     _appRegistry               = appRegistry;
     _vendorService             = vendorService;
 }
        public AddMenagerViewModel(AddMenagerView addMenagerOpen)
        {
            addMenager         = addMenagerOpen;
            accessLevelService = new AccessLevelService();
            sectorService      = new SectorService();
            managerService     = new MenagerService();

            accessLevelList = accessLevelService.GetAllAccessLevels();
            sectors         = sectorService.GetAllSectors();
            Menager         = new tblEmployee();
        }
        public SectorPopup()
        {
            SectorService = DependencyResolver.Kernel.Get <ISectorService>();

            InitializeComponent();

            // MVVM Data binding
            (this.Content as FrameworkElement).DataContext = this;

            AddHandler(Keyboard.PreviewKeyDownEvent, (KeyEventHandler)HandleKeyDownEvent);
        }
        public SectorServiceTests()
        {
            unitOfWork = Substitute.For <IUnitOfWork>();
            var config = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile <SectorProfile>();
            });

            mapper        = new AutoMapper.Mapper(config);
            sectorService = new SectorService(unitOfWork, mapper);
        }
Exemple #23
0
 public ItemController(
     ISectorService sectorService,
     IItemNACategoryService itemNACategoryService
     , IUserCategoryService userCategoryService
     , IItemService itemService
     )
 {
     _sectorService         = sectorService;
     _itemNACategoryService = itemNACategoryService;
     _userCategoryService   = userCategoryService;
     _itemService           = itemService;
 }
Exemple #24
0
 public UserController(IUserService userService,
                       IUserManager userManager,
                       IRoleService roleService,
                       ISectorService sectorService,
                       IDocumentService documentService)
 {
     this.userService     = userService;
     this.userManager     = userManager;
     this.roleService     = roleService;
     this.sectorService   = sectorService;
     this.documentService = documentService;
 }
Exemple #25
0
        public EditEmployeeViewModel(EditEmployee editEmployeeOpen, EmployeeDto employeeEdit)
        {
            eventObject  = new EventClass();
            editEmployee = editEmployeeOpen;

            Employee = employeeEdit;

            selctedLocation = new LocationDto();

            StartDate = (DateTime)employee.DateOfBirth;
            Sector    = employee.SectorName;

            locationService = new LocationService();
            employeeService = new EmployeeService();

            sectorService = new SectorService();

            potentialManagersInDb = employeeService.GetAllPotentialMenagers();
            PotentialMenagers     = ConvertManagerListToDto(potentialManagersInDb);
            PotentialMenagers     = PotentialMenagers.Where(x => x.ID != Employee.EmployeeID).ToList();

            locations = locationService.GetAllLocations().ToList();

            tblLocation locataionForPresent = locationService.GetLocationByID((int)Employee.LocationID);

            tblEmployee managerToPresent = null;

            if (Employee.ManagerId != null)
            {
                managerToPresent = employeeService.GetEmployeeByID((int)Employee.ManagerId);
            }

            LocationList = ConvertLocationDtoList(locations);

            SelctedLocation = LocationList.Where(x => x.ID == locataionForPresent.LocationID).FirstOrDefault();
            LocationList.OrderByDescending(x => x.Location);
            LocationList.Reverse();

            //if (managerToPresent!=null)
            //{
            //    SelectedMenager = PotentialMenagers.Where(x=>x.ID==Employee.ManagerId).FirstOrDefault();
            //}



            eventObject.ActionPerformed += ActionPerformed;

            oldEmployee           = new EmployeeDto();
            oldEmployee.FirstName = employee.FirstName;
            oldEmployee.LastName  = employee.LastName;
            oldEmployee.JMBG      = employee.JMBG;
        }
        public Sector_AddEdit(SectorViewModel sectorViewModel, bool isCreateProcess, bool isPopup = false)
        {
            sectorService = DependencyResolver.Kernel.Get <ISectorService>();

            // Initialize form components
            InitializeComponent();

            this.DataContext = this;

            CurrentSector   = sectorViewModel;
            IsCreateProcess = isCreateProcess;
            IsPopup         = isPopup;
        }
        public SectorServiceTests()
        {
            var config = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile <SectorProfile>();
            });

            sectorRepositoryMock = new Mock <IBaseRepository <Sector> >();
            unitOfWorkMock       = new Mock <IUnitOfWork>();
            unitOfWorkMock.Setup(uow => uow.SaveAsync()).ReturnsAsync(true);
            unitOfWorkMock.Setup(uow => uow.SectorRepository).Returns(sectorRepositoryMock.Object);
            sectorService = new SectorService(unitOfWorkMock.Object, config.CreateMapper());
        }
 public HomeController(ICountryService countryService, IRegionService regionService, IJobTypeService jobTypeService,
                       ISectorService sectorService, IExperienceService experienceService, IGenderService genderService,
                       IJobPostService jobPostService, IGeneralService generalService, IMapper mapper)
 {
     _countryService    = countryService;
     _regionService     = regionService;
     _jobTypeService    = jobTypeService;
     _sectorService     = sectorService;
     _experienceService = experienceService;
     _genderService     = genderService;
     _jobPostService    = jobPostService;
     _generalService    = generalService;
     _mapper            = mapper;
 }
 public SeedDataController(IServiceProvider provider)
 {
     countryService           = provider.GetRequiredService <ICountryService>();
     regionService            = provider.GetRequiredService <IRegionService>();
     municipalityService      = provider.GetRequiredService <IMunicipalityService>();
     cityService              = provider.GetRequiredService <ICityService>();
     bankService              = provider.GetRequiredService <IBankService>();
     professionService        = provider.GetRequiredService <IProfessionService>();
     licenceTypeService       = provider.GetRequiredService <ILicenceTypeService>();
     sectorService            = provider.GetRequiredService <ISectorService>();
     agencyService            = provider.GetRequiredService <IAgencyService>();
     taxAdministrationService = provider.GetRequiredService <ITaxAdministrationService>();
     companyService           = provider.GetRequiredService <ICompanyService>();
 }
        public Sector_List()
        {
            // Get required services
            sectorService = DependencyResolver.Kernel.Get <ISectorService>();

            // Initialize form components
            InitializeComponent();

            this.DataContext = this;

            Thread displayThread = new Thread(() => SyncData());

            displayThread.IsBackground = true;
            displayThread.Start();
        }