public MunicipalityServiceTests() { _municipalityRepositoryMock = new Mock <IMunicipalityRepository>(); _schedulTaxRateFactory = new ScheduledTaxRateFactory(); _service = new MunicipalityService(_municipalityRepositoryMock.Object, _schedulTaxRateFactory); }
public EditRuleViewModel(IRuleStorage ruleStorage, IProvinceService provinceService, IMunicipalityService municipalityService) { _ruleStorage = ruleStorage; _provinceService = provinceService; _municipalityService = municipalityService; PropertyChanged += EditRuleViewModel_PropertyChanged; }
public UserController(IUserService userService, IHttpContextAccessor httpContextAccessor, ISecurityService securityService, IMapper mapper, IMunicipalityService municipalityService) { this.usersService = userService; this.securityService = securityService; this.mapper = mapper; this.municipalityService = municipalityService; this.httpContextAccessor = httpContextAccessor; }
public DirectUpdateInfoGeoJsonService( IGeoJsonProvider provider, IDirectUpdateInfoGeoJsonGenerator geonerator, IMunicipalityService municipalityService) { _provider = provider; _geonerator = geonerator; _municipalityService = municipalityService; }
public MunicipalityPopup() { municipalityService = DependencyResolver.Kernel.Get <IMunicipalityService>(); InitializeComponent(); // MVVM Data binding (this.Content as FrameworkElement).DataContext = this; AddHandler(Keyboard.PreviewKeyDownEvent, (KeyEventHandler)HandleKeyDownEvent); }
public MappingProjectController( IMappingProjectService mappingProjectService, IMunicipalityService municipalityService, IOfficeService offices, KosContext kosContext) { _mappingProjectService = mappingProjectService; _municipalityService = municipalityService; _offices = offices; _dbContext = kosContext; }
public GeosynchronizationController( KosContext kosContext, IContextViewModelHelper contextViewModelHelper, IMunicipalityService municipalityService, ICountyService countyService ) { _dbContext = kosContext; _contextViewModelHelper = contextViewModelHelper; _countyService = countyService; _municipalityService = municipalityService; }
public MunicipalityAddEdit(MunicipalityViewModel MunicipalityViewModel, bool isCreateProcess, bool isPopup = false) { // Initialize service MunicipalityService = DependencyResolver.Kernel.Get <IMunicipalityService>(); InitializeComponent(); this.DataContext = this; CurrentMunicipality = MunicipalityViewModel; IsCreateProcess = isCreateProcess; IsPopup = isPopup; }
public MunicipalityList() { // Get required services this.municipalityService = DependencyResolver.Kernel.Get <IMunicipalityService>(); InitializeComponent(); this.DataContext = this; Thread displayThread = new Thread(() => SyncData()); displayThread.IsBackground = true; displayThread.Start(); }
public DataQualityDistributionController( IContextViewModelHelper contextViewModelHelper, IDataQualityDistributionService dataQualityDistributionService, ICountyService countyService, IMunicipalityService municipalityService, ApplicationSettings applicationSettings) { _contextViewModelHelper = contextViewModelHelper; _dataQualityDistributionService = dataQualityDistributionService; _countyService = countyService; _municipalityService = municipalityService; _applicationSettings = applicationSettings; _urlAdminUnits = _dataQualityDistributionService.GetAdminstrativeUnitsWmsUrl(); }
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 DataQualityClassificationController( IContextViewModelHelper contextViewModelHelper, IDataQualityClassificationService dataQualityClassificationService, ICountyService countyService, IMunicipalityService municipalityService, ApplicationSettings applicationSettings) { _contextViewModelHelper = contextViewModelHelper; _dataQualityClassificationService = dataQualityClassificationService; _countyService = countyService; _municipalityService = municipalityService; _url = _dataQualityClassificationService.GetWmsUrl(); _urlAdminUnits = _dataQualityClassificationService.GetAdminstrativeUnitsWmsUrl(); _metadataUrl = applicationSettings.ExternalUrls.MetadataDataQualityClassification; }
public DirectUpdateInfoController( IMunicipalityService municipalityService, ICountyService countyService, IDataSetService dataSetService, IContextViewModelHelper contextViewModelHelper, IDirectUpdateInfoGeoJsonService geoJsonService, ApplicationSettings applicationSettings) { _municipalityService = municipalityService; _countyService = countyService; _dataSetService = dataSetService; _contextViewModelHelper = contextViewModelHelper; _geoJsonService = geoJsonService; _applicationSettings = applicationSettings; }
public TransactionDataController( IContextViewModelHelper contextViewModelHelper, ITransactionDataService transactionDataService, ICountyService countyService, IMunicipalityService municipalityService, ApplicationSettings applicationSettings) { _contextViewModelHelper = contextViewModelHelper; _transactionDataService = transactionDataService; _countyService = countyService; _municipalityService = municipalityService; _dataSetToLayerMap = applicationSettings.DataSetToLayerMap; _url = _transactionDataService.GetWmsUrl(); _urlAdminUnits = transactionDataService.GetAdminstrativeUnitsWmsUrl(); _metadataUrl = applicationSettings.ExternalUrls.MetadataTransactionData; }
/// <summary> /// Initializes a new instance of the <see cref="V7CodeListController"/> class. /// </summary> /// <param name="commonService">The common service.</param> /// <param name="municipalityService">The municipality service.</param> /// <param name="countryService">The country service.</param> /// <param name="postalCodeService">The postal code service.</param> /// <param name="languageService">The language service.</param> /// <param name="userOrganizationService">The user organization service.</param> /// <param name="settings">The settings.</param> /// <param name="logger">The logger.</param> public V7CodeListController( ICommonService commonService, IMunicipalityService municipalityService, ICountryService countryService, IPostalCodeService postalCodeService, ILanguageService languageService, IUserOrganizationService userOrganizationService, IOptions <AppSettings> settings, ILogger <V7CodeListController> logger) : base(userOrganizationService, settings, logger) { this.commonService = commonService; this.municipalityService = municipalityService; this.countryService = countryService; this.postalCodeService = postalCodeService; this.languageService = languageService; pageSize = Settings.PageSize > 0 ? Settings.PageSize : 1000; }
public ContextViewModelHelper(ICountyService countyService, IMunicipalityService municipalityService) { _countyService = countyService; _municipalityService = municipalityService; }
public TaxRatesController(ITaxRatesService taxRatesService, IMunicipalityService mService) { this.taxRatesService = taxRatesService; this.mService = mService; }
public Home() { businessPartnerService = DependencyResolver.Kernel.Get <IBusinessPartnerService>(); businessPartnerTypeService = DependencyResolver.Kernel.Get <IBusinessPartnerTypeService>(); businessPartnerBankService = DependencyResolver.Kernel.Get <IBusinessPartnerBankService>(); businessPartnerDocumentService = DependencyResolver.Kernel.Get <IBusinessPartnerDocumentService>(); businessPartnerInstitutionService = DependencyResolver.Kernel.Get <IBusinessPartnerInstitutionService>(); businessPartnerLocationService = DependencyResolver.Kernel.Get <IBusinessPartnerLocationService>(); businessPartnerNoteService = DependencyResolver.Kernel.Get <IBusinessPartnerNoteService>(); //businessPartnerOrganizationUnitService = DependencyResolver.Kernel.Get<IBusinessPartnerOrganizationUnitService>(); businessPartnerPhoneService = DependencyResolver.Kernel.Get <IBusinessPartnerPhoneService>(); employeeService = DependencyResolver.Kernel.Get <IEmployeeService>(); employeeProfessionService = DependencyResolver.Kernel.Get <IEmployeeProfessionService>(); employeeNoteService = DependencyResolver.Kernel.Get <IEmployeeNoteService>(); employeeLicenceService = DependencyResolver.Kernel.Get <IEmployeeLicenceService>(); employeeItemService = DependencyResolver.Kernel.Get <IEmployeeItemService>(); employeeDocumentService = DependencyResolver.Kernel.Get <IEmployeeDocumentService>(); employeeCardService = DependencyResolver.Kernel.Get <IEmployeeCardService>(); licenceTypeService = DependencyResolver.Kernel.Get <ILicenceTypeService>(); familyMemberService = DependencyResolver.Kernel.Get <IFamilyMemberService>(); physicalPersonService = DependencyResolver.Kernel.Get <IPhysicalPersonService>(); physicalPersonProfessionService = DependencyResolver.Kernel.Get <IPhysicalPersonProfessionService>(); physicalPersonNoteService = DependencyResolver.Kernel.Get <IPhysicalPersonNoteService>(); physicalPersonLicenceService = DependencyResolver.Kernel.Get <IPhysicalPersonLicenceService>(); physicalPersonItemService = DependencyResolver.Kernel.Get <IPhysicalPersonItemService>(); physicalPersonDocumentService = DependencyResolver.Kernel.Get <IPhysicalPersonDocumentService>(); physicalPersonCardService = DependencyResolver.Kernel.Get <IPhysicalPersonCardService>(); outputInvoiceService = DependencyResolver.Kernel.Get <IOutputInvoiceService>(); inputInvoiceService = DependencyResolver.Kernel.Get <IInputInvoiceService>(); countryService = DependencyResolver.Kernel.Get <ICountryService>(); regionService = DependencyResolver.Kernel.Get <IRegionService>(); municipalityService = DependencyResolver.Kernel.Get <IMunicipalityService>(); cityService = DependencyResolver.Kernel.Get <ICityService>(); sectorService = DependencyResolver.Kernel.Get <ISectorService>(); professionService = DependencyResolver.Kernel.Get <IProfessionService>(); bankService = DependencyResolver.Kernel.Get <IBankService>(); agencyService = DependencyResolver.Kernel.Get <IAgencyService>(); constructionSiteService = DependencyResolver.Kernel.Get <IConstructionSiteService>(); constructionSiteDocumentService = DependencyResolver.Kernel.Get <IConstructionSiteDocumentService>(); constructionSiteCalculationService = DependencyResolver.Kernel.Get <IConstructionSiteCalculationService>(); constructionSiteNoteService = DependencyResolver.Kernel.Get <IConstructionSiteNoteService>(); //employeeByBusinessPartnerService = DependencyResolver.Kernel.Get<IEmployeeByBusinessPartnerService>(); //radnici po firmama? //employeeByConstructionSiteService = DependencyResolver.Kernel.Get<IEmployeeByConstructionSiteService>(); // radnici po gradilistu //businessPartnerByConstructionSiteService = DependencyResolver.Kernel.Get<IBusinessPartnerByConstructionSiteService>(); //firme po gradilistu taxAdministrationService = DependencyResolver.Kernel.Get <ITaxAdministrationService>(); limitationService = DependencyResolver.Kernel.Get <ILimitationService>(); userService = DependencyResolver.Kernel.Get <IUserService>(); vatService = DependencyResolver.Kernel.Get <IVatService>(); discountService = DependencyResolver.Kernel.Get <IDiscountService>(); serviceDeliveryService = DependencyResolver.Kernel.Get <IServiceDeliveryService>(); statusService = DependencyResolver.Kernel.Get <IStatusService>(); shipmentService = DependencyResolver.Kernel.Get <IShipmentService>(); toDoService = DependencyResolver.Kernel.Get <IToDoService>(); phonebookService = DependencyResolver.Kernel.Get <IPhonebookService>(); callCentarService = DependencyResolver.Kernel.Get <ICallCentarService>(); employeeByConstructionSiteService = DependencyResolver.Kernel.Get <IEmployeeByConstructionSiteService>(); businessPartnerByConstructionSiteService = DependencyResolver.Kernel.Get <IBusinessPartnerByConstructionSiteService>(); employeeByBusinessPartnerService = DependencyResolver.Kernel.Get <IEmployeeByBusinessPartnerService>(); documentFolderService = DependencyResolver.Kernel.Get <IDocumentFolderService>(); documentFileService = DependencyResolver.Kernel.Get <IDocumentFileService>(); InitializeComponent(); this.DataContext = this; var resp = new CompanyUserSQLiteRepository().GetCompanyUser(MainWindow.CurrentCompanyId, MainWindow.CurrentUser?.Identifier ?? Guid.Empty); if (resp.Success) { var userRoles = resp.CompanyUser?.UserRoles ?? new List <UserRoleViewModel>(); if (userRoles.Any(x => x.Name == "CallCentar") || userRoles.Any(x => x.Name == "Admin")) { CallCentarList.Visibility = System.Windows.Visibility.Visible; } else { CallCentarList.Visibility = System.Windows.Visibility.Collapsed; } } }
/// <summary> /// Constructor of organization controller /// </summary> /// <param name="organizationService">organization service responsible for operation related to organizations - injected by framework</param> /// <param name="municipalityService">municipality service responsible for operation related to municipalities - injected by framework</param> /// <param name="serviceManager">manager responsible for wrapping of individual service call to UI output format - injected by framework</param> /// <param name="logger">logger commponent to support logging - injected by framework</param> public RESTOrganizationController(IOrganizationService organizationService, IMunicipalityService municipalityService, IServiceManager serviceManager, ILogger <RESTOrganizationController> logger) : base(logger) { this.organizationService = organizationService; this.municipalityService = municipalityService; this.serviceManager = serviceManager; }
public MunicipalityController() { munService = new MunicipalityService(); dynamicList = new DynamicSelectList(); }
public MunicipalitiesController(IMunicipalityService service) { this.service = service; }
public MunicipalityController(IMunicipalityService municipalityService, IMapper mapper, ILogger <MunicipalityController> logger) { _municipalityService = municipalityService; _mapper = mapper; _logger = logger; }
public void Sync(IMunicipalityService municipalityService, Action <int, int> callback = null) { try { SyncMunicipalityRequest request = new SyncMunicipalityRequest(); request.CompanyId = MainWindow.CurrentCompanyId; request.LastUpdatedAt = GetLastUpdatedAt(MainWindow.CurrentCompanyId); int toSync = 0; int syncedItems = 0; MunicipalityListResponse response = municipalityService.Sync(request); if (response.Success) { toSync = response?.Municipalities?.Count ?? 0; List <MunicipalityViewModel> municipalitysFromDB = response.Municipalities; using (SqliteConnection db = new SqliteConnection(SQLiteHelper.SqLiteTableName)) { db.Open(); using (var transaction = db.BeginTransaction()) { SqliteCommand deleteCommand = db.CreateCommand(); deleteCommand.CommandText = "DELETE FROM Municipalities WHERE Identifier = @Identifier"; SqliteCommand insertCommand = db.CreateCommand(); insertCommand.CommandText = SqlCommandInsertPart; foreach (var municipality in municipalitysFromDB) { deleteCommand.Parameters.AddWithValue("@Identifier", municipality.Identifier); deleteCommand.ExecuteNonQuery(); deleteCommand.Parameters.Clear(); if (municipality.IsActive) { municipality.IsSynced = true; insertCommand = AddCreateParameters(insertCommand, municipality); insertCommand.ExecuteNonQuery(); insertCommand.Parameters.Clear(); syncedItems++; callback?.Invoke(syncedItems, toSync); } } transaction.Commit(); } db.Close(); } } else { throw new Exception(response.Message); } } catch (Exception ex) { MainWindow.ErrorMessage = ex.Message; } }
public MunicipalityController(IMunicipalityService municipalityService) => this.municipalityService = municipalityService;
public MunicipalityController(IServiceProvider provider) { MunicipalityService = provider.GetRequiredService <IMunicipalityService>(); }
public MunicipalityController(IMunicipalityService municipalityService, IMapper mapper) { _municipalityService = municipalityService; _mapper = mapper; }
public MunicipalitiesController(IMunicipalityService municipalityService, ITaxService taxService) { _municipalityService = municipalityService; _taxService = taxService; }
public MunicipalityController(IMunicipalityService municipalityService) { _municipalityService = municipalityService; }
public MunicipalityController(IMunicipalityService municipalityService, IImportService importService) { _importService = importService; _municipalityService = municipalityService; }