コード例 #1
0
        protected EmployeeBaseViewModel(
            IGooglePlacesService googlePlacesService,
            INetworkService networkService,
            INavigationService navigationService)
            : base(navigationService)
        {
            GooglePlacesService = googlePlacesService;
            NetworkService      = networkService;

            MinDateOfBirth = DateTime.UtcNow.AddYears(-65).Date;
            MaxDateOfBirth = DateTime.UtcNow.AddYears(-18).Date;

            FirstName   = new ValidatableObject <string>();
            Surname     = new ValidatableObject <string>();
            LastName    = new ValidatableObject <string>();
            Address     = new ValidatableObject <string>();
            PhoneNumber = new ValidatableObject <string>();
            Salary      = new ValidatableObject <double>();
            DateOfBirth = new ValidatableObject <DateTime> {
                Value = MaxDateOfBirth
            };
            Position = new ValidatableObject <string>();

            AddValidations();
        }
コード例 #2
0
ファイル: NewCustomerViewModel.cs プロジェクト: EdwOK/Catalog
 public NewCustomerViewModel(
     INavigationService navigationService,
     UnitOfWork unitOfWork,
     INetworkService networkService,
     IGooglePlacesService googlePlacesService)
     : base(networkService, navigationService, unitOfWork, googlePlacesService)
 {
 }
コード例 #3
0
 public GooglePlacesImporter(ISitecoreContext sitecoreContext,
                             IGooglePlacesItemProcessor googlePlacesItemProcessor, IMapper mapper,
                             IGooglePlacesService googlePlacesService) : base(sitecoreContext)
 {
     _googlePlacesItemProcessor = googlePlacesItemProcessor;
     _mapper = mapper;
     _googlePlacesService = googlePlacesService;
 }
コード例 #4
0
ファイル: NewEmployeeViewModel.cs プロジェクト: EdwOK/Catalog
 public NewEmployeeViewModel(
     INavigationService navigationService,
     UnitOfWork unitOfWork,
     IGooglePlacesService googlePlacesService,
     INetworkService networkService)
     : base(googlePlacesService, networkService, navigationService)
 {
     _unitOfWork = unitOfWork;
 }
コード例 #5
0
 public SearchController(IEstablishmentReadService establishmentReadService,
                         ICachedLookupService cachedLookupService,
                         IGroupReadService groupReadService,
                         IGooglePlacesService googlePlacesService)
 {
     _googlePlacesService      = googlePlacesService;
     _cachedLookupService      = cachedLookupService;
     _establishmentReadService = establishmentReadService;
     _groupReadService         = groupReadService;
 }
コード例 #6
0
 public ChangeEmployeeViewModel(
     Employee employee,
     UnitOfWork unitOfWork,
     IGooglePlacesService googlePlacesService,
     INetworkService networkService,
     INavigationService navigationService)
     : base(employee, googlePlacesService, networkService, navigationService)
 {
     _employee   = employee;
     _unitOfWork = unitOfWork;
 }
コード例 #7
0
        public AddressesPageViewModel(INavigationService navigationService, IGooglePlacesService placesService, IPlacesStorage storage)
            : base(navigationService)
        {
            Title = "Locations";

            PlacesService = placesService;
            _storage      = storage;

            SearchAddressCommand = new DelegateCommand <string>(SearchTextAsync, (t) => !string.IsNullOrWhiteSpace(t));
            PlaceSelectedCommand = new DelegateCommand <Place>(SelectedPlace, (t) => t != null);
        }
コード例 #8
0
 public ChangeCustomerViewModel(
     Customer customer,
     INetworkService networkService,
     INavigationService navigationService,
     UnitOfWork unitOfWork,
     IGooglePlacesService googlePlacesService)
     : base(customer, networkService, navigationService, unitOfWork, googlePlacesService)
 {
     _customer   = customer;
     _unitOfWork = unitOfWork;
 }
コード例 #9
0
 protected CustomerBaseViewModel(
     Customer customer,
     INetworkService networkService,
     INavigationService navigationService,
     UnitOfWork unitOfWork,
     IGooglePlacesService googlePlacesService)
     : this(networkService, navigationService, unitOfWork, googlePlacesService)
 {
     Name.Value        = customer.Name;
     Address.Value     = customer.Address;
     Email.Value       = customer.Email;
     PhoneNumber.Value = customer.PhoneNumber;
     PostalCode.Value  = customer.PostalCode;
 }
コード例 #10
0
 protected EmployeeBaseViewModel(
     Employee employee,
     IGooglePlacesService googlePlacesService,
     INetworkService networkService,
     INavigationService navigationService)
     : this(googlePlacesService, networkService, navigationService)
 {
     FirstName.Value   = employee.FirstName;
     Surname.Value     = employee.Surname;
     LastName.Value    = employee.LastName;
     Address.Value     = employee.Address;
     PhoneNumber.Value = employee.PhoneNumber;
     Salary.Value      = employee.Salary;
     DateOfBirth.Value = employee.DateOfBirth;
     Position.Value    = employee.Position;
 }
コード例 #11
0
        protected CustomerBaseViewModel(
            INetworkService networkService,
            INavigationService navigationService,
            UnitOfWork unitOfWork,
            IGooglePlacesService googlePlacesService)
            : base(navigationService)
        {
            NetworkService      = networkService;
            NavigationService   = navigationService;
            UnitOfWork          = unitOfWork;
            GooglePlacesService = googlePlacesService;

            Name        = new ValidatableObject <string>();
            Email       = new ValidatableObject <string>();
            Address     = new ValidatableObject <string>();
            PhoneNumber = new ValidatableObject <string>();
            PostalCode  = new ValidatableObject <string>();

            AddValidations();
        }
コード例 #12
0
		public CarWashesMapViewModel (IGooglePlacesService googlePlacesService,
		                              GeoLocation currentPosition)
		{
			_googlePlacesService = googlePlacesService;
			_currentPosition = currentPosition;
		}
コード例 #13
0
 public CarWashesMapViewModel(IGooglePlacesService googlePlacesService,
                              GeoLocation currentPosition)
 {
     _googlePlacesService = googlePlacesService;
     _currentPosition     = currentPosition;
 }
コード例 #14
0
 public AddressesPageViewModel(IMvxNavigationService navigationService, IGooglePlacesService placesService, IPlacesStorage storage)
 {
     _navigationService = navigationService;
     PlacesService      = placesService;
     _storage           = storage;
 }
コード例 #15
0
		public GroupMembersMapViewModel (IGooglePlacesService googlePlacesService,
		                              GeoLocation currentPosition)
		{
			_googlePlacesService = googlePlacesService;
			_currentPosition = currentPosition;
		}
コード例 #16
0
 protected void SetUp()
 {
     _service = new GooglePlacesService();
 }