public void Simple_Status_Constituency()
        {
            ICountyRepository countyRepository = Substitute.For <ICountyRepository>();
            var f            = new Fixture();
            var county       = f.Create <County>();
            var constituency = CreateConstituency(county.GetMasterDataRef());

            countyRepository.GetById(Arg.Any <Guid>()).Returns(county);
            var constituencyRepository = new ConstituencyRepository(ContextConnection(), countyRepository);

            constituencyRepository.Save(constituency);
            constituencyRepository.SetInactive(constituency);
            var inactive = constituencyRepository.GetById(constituency.Id);

            Assert.That(inactive.Status == EntityStatus.Inactive);

            constituencyRepository.SetActive(constituency);
            var active = constituencyRepository.GetById(constituency.Id);

            Assert.That(active.Status == EntityStatus.Active);

            constituencyRepository.SetAsDeleted(constituency);
            var deleted = constituencyRepository.GetById(constituency.Id);

            Assert.That(deleted.Status == EntityStatus.Deleted);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SearchController"/> class.
 /// </summary>
 /// <param name="county">The county.</param>
 /// Created by SMK
 public SearchController(ICountyRepository countyRepository, 
     IRegionRepository regionRepository,
     IAddressRepository addressRepository)
 {
     this.countyRepository = countyRepository;
     this.regionRepository = regionRepository;
     this.addressRepository = addressRepository;
 }
Ejemplo n.º 3
0
        public CountyController(ICountyRepository repository, string catalog, LoginView view)
        {
            this._LoginId  = view.LoginId.ToLong();
            this._UserId   = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog  = catalog;

            this.CountyRepository = repository;
        }
Ejemplo n.º 4
0
        public AreYouSure(ICountyRepository countyRepository, int CountyId)
        {
            _countyRepository = countyRepository;

            InitializeComponent();
            YesButton.Click += DeleteCountyYesButton_Click;
            NoButton.Click  += NoDeleteButton_Click;
            ObjectId         = CountyId;
        }
Ejemplo n.º 5
0
        public CountyController(ICountyRepository repository, string catalog, LoginView view)
        {
            this._LoginId = view.LoginId.ToLong();
            this._UserId = view.UserId.ToInt();
            this._OfficeId = view.OfficeId.ToInt();
            this._Catalog = catalog;

            this.CountyRepository = repository;
        }
Ejemplo n.º 6
0
 public InhabitantController(IPeopleRepository peopleRepo, 
     IAddressRepository addressRepo,
     ICountyRepository countyRepo,
     IProvinceRepository provinceRepo)
 {
     _peopleRepository = peopleRepo;
     _addressRepository = addressRepo;
     _countyRepository = countyRepo;
     _provinceRepository = provinceRepo;
 }
Ejemplo n.º 7
0
 public UnitOfWork(JeaPocContext jeaPocContext, IMasterPremiseRepository masterPremiseRepository, IStreetTypeRepository streetTypeRepository, IMasterServicePointRepository masterServicePointRepository, ICityCodeRepository cityCodeRepository, ICityRepository cityRepository, ICountyRepository countyRepository)
 {
     JeaPocContext                = jeaPocContext;
     MasterPremiseRepository      = masterPremiseRepository;
     StreetTypeRepository         = streetTypeRepository;
     MasterServicePointRepository = masterServicePointRepository;
     CityCodeRepository           = cityCodeRepository;
     CityRepository               = cityRepository;
     CountyRepository             = countyRepository;
 }
Ejemplo n.º 8
0
 public ConfigurationService(ICountyRepository countyRepository,
                             ICurrencyRepository currencyRepository,
                             ISalaryPayFrequencyRespository payFrequencyRespository,
                             ISalaryComponentRepository salaryComponentRepository)
 {
     _countryRepository         = countyRepository;
     _currencyRepository        = currencyRepository;
     _payFrequencyRespository   = payFrequencyRespository;
     _salaryComponentRepository = salaryComponentRepository;
 }
Ejemplo n.º 9
0
 public LookupService(ICountyRepository countyRepository, ISubCountyRepository subCountyRepository, IPracticeRepository practiceRepository, IPracticeTypeRepository practiceTypeRepository, IMaritalStatusRepository maritalStatusRepository, IKeyPopRepository keyPopRepository, IIdentifierTypeRepository identifierTypeRepository, IRelationshipTypeRepository relationshipTypeRepository, IEncounterTypeRepository encounterTypeRepository, ICategoryRepository categoryRepository)
 {
     _countyRepository           = countyRepository;
     _subCountyRepository        = subCountyRepository;
     _practiceRepository         = practiceRepository;
     _practiceTypeRepository     = practiceTypeRepository;
     _maritalStatusRepository    = maritalStatusRepository;
     _keyPopRepository           = keyPopRepository;
     _identifierTypeRepository   = identifierTypeRepository;
     _relationshipTypeRepository = relationshipTypeRepository;
     _encounterTypeRepository    = encounterTypeRepository;
     _categoryRepository         = categoryRepository;
 }
Ejemplo n.º 10
0
        public CountyController()
        {
            this._LoginId  = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId   = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog  = AppUsers.GetCurrentUserDB();

            this.CountyRepository = new MixERP.Net.Schemas.Core.Data.County
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId  = this._UserId
            };
        }
Ejemplo n.º 11
0
        public CountyController()
        {
            this._LoginId = AppUsers.GetCurrent().View.LoginId.ToLong();
            this._UserId = AppUsers.GetCurrent().View.UserId.ToInt();
            this._OfficeId = AppUsers.GetCurrent().View.OfficeId.ToInt();
            this._Catalog = AppUsers.GetCurrentUserDB();

            this.CountyRepository = new MixERP.Net.Schemas.Core.Data.County
            {
                _Catalog = this._Catalog,
                _LoginId = this._LoginId,
                _UserId = this._UserId
            };
        }
        public void SimpeHydrate_Constituency()
        {
            ICountyRepository countyRepository = Substitute.For <ICountyRepository>();
            var f            = new Fixture();
            var county       = f.Create <County>();
            var constituency = CreateConstituency(county.GetMasterDataRef());

            countyRepository.GetById(Arg.Any <Guid>()).Returns(county);
            var constituencyRepository = new ConstituencyRepository(ContextConnection(), countyRepository);
            var id = constituencyRepository.Save(constituency);

            Assert.IsNotNull(id);
            Assert.AreEqual(id, constituency.Id);
        }
Ejemplo n.º 13
0
 public MainPage(IConferenceRepository conferenceRepository, ICountryRepository countryRepository,
                 IAttendeeButtonsRepository attendeeButtonsRepository, ISpeakerRepository speakerRepository, ICountyRepository
                 countyRepository, ICityRepository cityRepository, ITypeRepository typeRepository, ICategoryRepository categoryRepository)
 {
     _conferenceRepository = conferenceRepository;
     _countryRepository    = countryRepository;
     _attendeeButtons      = attendeeButtonsRepository;
     _speakerRepository    = speakerRepository;
     _countyRepository     = countyRepository;
     _cityRepository       = cityRepository;
     _typeRepository       = typeRepository;
     _categoryRepository   = categoryRepository;
     InitializeComponent();
     this.ShowDialog();
 }
        public void SimpeDeHydrateAll_Constituency()
        {
            ICountyRepository countyRepository = Substitute.For <ICountyRepository>();
            var f            = new Fixture();
            var county       = f.Create <County>();
            var constituency = CreateConstituency(county.GetMasterDataRef());

            countyRepository.GetById(Arg.Any <Guid>()).Returns(county);
            var constituencyRepository = new ConstituencyRepository(ContextConnection(), countyRepository);

            constituencyRepository.Save(constituency);
            var owner = constituencyRepository.GetAll();

            Assert.That(owner.Any());
        }
Ejemplo n.º 15
0
 public PropertyController(IPropertyService propertyService,
                           IContactRepository contactRepository,
                           ICommentRepository commentRepository,
                           IUserRepository userRepository,
                           ICountyRepository countyRepository,
                           IReadRepository <City> cityRepository,
                           IMapper mapper)
 {
     _propertyService   = propertyService ?? throw new ArgumentNullException(nameof(propertyService));
     _contactRepository = contactRepository ?? throw new ArgumentNullException(nameof(contactRepository));
     _commentRepository = commentRepository ?? throw new ArgumentNullException(nameof(commentRepository));
     _userRepository    = userRepository ?? throw new ArgumentNullException(nameof(userRepository));
     _countyRepository  = countyRepository ?? throw new ArgumentNullException(nameof(countyRepository));
     _cityRepository    = cityRepository ?? throw new ArgumentNullException(nameof(cityRepository));
     _mapper            = mapper ?? throw new ArgumentNullException(nameof(mapper));
 }
Ejemplo n.º 16
0
        public void SetUp()
        {
            _liveSetting = new LiveSetting(_database.DatabasePath);

            _countyRepository           = new CountyRepository(_liveSetting);
            _subCountyRepository        = new SubCountyRepository(_liveSetting);
            _practiceTypeRepository     = new PracticeTypeRepository(_liveSetting);
            _practiceRepository         = new PracticeRepository(_liveSetting);
            _maritalStatusRepository    = new MaritalStatusRepository(_liveSetting);
            _keyPopRepository           = new KeyPopRepository(_liveSetting);
            _identifierTypeRepository   = new IdentifierTypeRepository(_liveSetting);
            _relationshipTypeRepository = new RelationshipTypeRepository(_liveSetting);
            _categoryRepository         = new CategoryRepository(_liveSetting);



            _lookupService = new LookupService(_countyRepository, _subCountyRepository, _practiceRepository, _practiceTypeRepository, _maritalStatusRepository, _keyPopRepository, _identifierTypeRepository, _relationshipTypeRepository, _encounterTypeRepository, _categoryRepository);
        }
Ejemplo n.º 17
0
 public CityService(ICityRepository cityRepository, ICountyRepository countyRepository)
 {
     this._cityRepository   = cityRepository;
     this._countyRepository = countyRepository;
 }
Ejemplo n.º 18
0
 public CountyService(ICountyRepository countyRepository)
 {
     this._countyRepository = countyRepository;
 }
Ejemplo n.º 19
0
 /// <summary>
 /// 市辖区、县级市、县
 /// </summary>
 /// <param name="countyRepository">市辖区、县级市、县接口</param>
 public CountyController(ICountyRepository countyRepository)
 {
     _countyRepository = countyRepository;
 }
 public CountyService(ICountyRepository countyRepository, IMapper iMapper)
 {
     _countyRepository = countyRepository;
     _iMapper          = iMapper;
 }
Ejemplo n.º 21
0
 public CountiesController(ICountyRepository repo)
 {
     this.repo = repo;
 }
 public ContactAdministrationService(ICountyRepository countyRepository, ICountryRepository countryRepository, IContactRepository contactRepository)
 {
     this.countyRepository = countyRepository;
     this.countryRepository = countryRepository;
     this.contactRepository = contactRepository;
 }
Ejemplo n.º 23
0
 public CountyController(ICountyRepository repo) // ------------------------------
 {
     repository = repo;
     MakeDictionary(); // create
 } // eo constructor -----------------------------------------------------------------------
 public CountyBusinessService(ICountyRepository repository, IUnitOfWork unitOfWork) : base(repository, unitOfWork)
 {
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CountyService"/> class with an <see cref="ICountyRepository"/> instance.
 /// </summary>
 /// <param name="repository">The repository.</param>
 public CountyService(ICountyRepository repository)
 {
     this.repository = repository;
 }
Ejemplo n.º 26
0
 public CountyViewModelBuilder(ICountyRepository countyRepository, IRegionRepository regionRepository)
 {
     _countyRepository = countyRepository;
     _regionRepository = regionRepository;
 }
Ejemplo n.º 27
0
 public CountyService(ICountyRepository countryRepository)
 {
     _countyRepository = countryRepository;
 }
 public CountyImportService(ICountyRepository countyRepository, IRegionRepository regionRepository)
 {
     _countyRepository = countyRepository;
     _regionRepository = regionRepository;
 }
Ejemplo n.º 29
0
 public CountyService(ICountyRepository countyRepository, IUnitOfWork unitOfWork)
 {
     this._countyRepository = countyRepository;
     this._unitOfWork       = unitOfWork;
 }
        public GardenService(IGardenRepository gardenRepository, ICityRepository cityRepository,
			ICountyRepository countyRepository, IGardenSizeRepository gardenSizeRepository, IGardenTypeRepository gardenTypeRepository,
			IGardenReasonRepository gardenReasonRepository, IPlantTypeRepository plantTypeRepository)
        {
            GardenRepository = gardenRepository;
            CityRepository = cityRepository;
            CountyRepository = countyRepository;
            GardenSizeRepository = gardenSizeRepository;
            GardenTypeRepository = gardenTypeRepository;
            GardenReasonRepository = gardenReasonRepository;
            PlantTypeRepository = plantTypeRepository;
        }
 public ConstituencyRepository(ContextConnection contextConnection, ICountyRepository countyRepository)
     : base(contextConnection)
 {
     _countyRepository = countyRepository;
 }
Ejemplo n.º 32
0
 public ConstituencyViewModelBuilder(IConstituencyRepository constituencyRepository, ICountyRepository countyRepository)
 {
     _constituencyRepository = constituencyRepository;
     _countyRepository       = countyRepository;
 }
 public CountyService(ICountyRepository countyRepository)
 {
     CountyRepository = countyRepository;
 }
 public CitiesController(ICountyRepository countyRepository)
 {
     CountyRepository = countyRepository;
 }