Пример #1
0
        public CustomerDetailViewModel(Account account)
        {
            if (account == null)
            {
                Account = new Account();
                Account.Industry = Account.IndustryTypes[0];
                Account.OpportunityStage = Account.OpportunityStages[0];

                this.Title = "New Account";
            }
            else
            {
                Account = account;
                this.Title = "Account";
            }

            this.Icon = "account.png";

            _DataClient = DependencyService.Get<IDataClient>();
            _GeoCodingService = DependencyService.Get<IGeoCodingService>();

            MessagingCenter.Subscribe<Account>(this, MessagingServiceConstants.ACCOUNT, (Account) =>
                {
                    IsInitialized = false;
                });
        }
Пример #2
0
        public CustomerDetailViewModel(Account account, Page currentPage)
        {
            if (account == null)
            {
                Account                  = new Account();
                Account.Industry         = Account.IndustryTypes[0];
                Account.OpportunityStage = Account.OpportunityStages[0];

                this.Title = "New Account";
            }
            else
            {
                Account    = account;
                this.Title = "Account";
            }

            _CurrentPage = currentPage;

            this.Icon = "account.png";

            _DataClient       = DependencyService.Get <IDataService>();
            _GeoCodingService = DependencyService.Get <IGeoCodingService>();

            MessagingCenter.Subscribe <Account>(this, MessagingServiceConstants.ACCOUNT, (Account) =>
            {
                IsInitialized = false;
            });
        }
Пример #3
0
        public LeadDetailViewModel(INavigation navigation, Account lead = null)
        {
            if (navigation == null)
            {
                throw new ArgumentNullException("navigation", "An instance of INavigation must be passed to the LeadDetailViewModel constructor.");
            }

            Navigation = navigation;

            if (lead == null)
            {
                Lead       = new Account();
                this.Title = TextResources.Leads_NewLead;
            }
            else
            {
                Lead       = lead;
                this.Title = lead.Company;
            }

            this.Icon = "contact.png";

            _DataClient = DependencyService.Get <IDataClient>();

            _GeoCodingService = DependencyService.Get <IGeoCodingService>();
        }
 public TrackingService(IReponsitory <TrackingHistory> trackingHistoryRepository, IReponsitory <TrackingSession> trackingSessionRepository, IReponsitory <Vehicle> vehicleRepository, IGeoCodingService geoCodingService)
 {
     _trackingHistoryRepository = trackingHistoryRepository;
     _trackingSessionRepository = trackingSessionRepository;
     _vehicleRepository         = vehicleRepository;
     _geoCodingService          = geoCodingService;
 }
Пример #5
0
        public LeadDetailViewModel(INavigation navigation, Account lead = null)
        {
            if (navigation == null)
            {
                throw new ArgumentNullException("navigation", "An instance of INavigation must be passed to the LeadDetailViewModel constructor.");
            }

            Navigation = navigation;

            if (lead == null)
            {
                Lead = new Account();
                this.Title = TextResources.Leads_NewLead;
            }
            else
            {
                Lead = lead;
                this.Title = lead.Company;
            }

            this.Icon = "contact.png";

            _DataClient = DependencyService.Get<IDataClient>();

            _GeoCodingService = DependencyService.Get<IGeoCodingService>();
        }
        public SearchSpaceDetailViewModel(PublicSpace publicspace, Page currentPage)
        {
            PublicSpace = publicspace;
            this.Title  = publicspace.Title;

            _CurrentPage      = currentPage;
            _GeoCodingService = DependencyService.Get <IGeoCodingService>();
        }
 public CachingGeoCodingService(IGeoCodingService decoratedService, System.Runtime.Caching.ObjectCache cache)
     : base(cache)
 {
     _decoratedService = decoratedService;
 }
Пример #8
0
 //
 // GET: /Services/
 public ServicesController(NHibernateContext nHibernateContext, IFileSystem fileSystem, IGeoCodingService geoCodingService)
     : base(nHibernateContext)
 {
     _fileSystem = fileSystem;
     _geoCodingService = geoCodingService;
 }
Пример #9
0
 public GeoCodingBLL(IGeoCodingService geocodingService)
 {
     geoCodingService = geocodingService;
 }
Пример #10
0
        public GeoCodingServiceSpecs()
        {
            var key = ConfigurationManager.AppSettings["geoLocationKey"];

            _sut = new GeoCodingService(new GeoCodingServiceConfigProvider(key), new GeoCodingParser(), new GeoCodingDataMapper());
        }
Пример #11
0
 public CachingGeoCodingService(IGeoCodingService decoratedService, System.Runtime.Caching.ObjectCache cache) : base(cache)
 {
     _decoratedService = decoratedService;
 }
Пример #12
0
        private const double Distance = 10000; //10km
        //
        // GET: /Services/

        public ServicesController(NHibernateContext nHibernateContext, IFileSystem fileSystem, IGeoCodingService geoCodingService) : base(nHibernateContext)
        {
            _fileSystem       = fileSystem;
            _geoCodingService = geoCodingService;
        }
Пример #13
0
 public SearchController(IGeoCodingService geoCodingService, ICoordinateViewModelFactory viewModelFactory)
 {
     _geoCodingService = geoCodingService;
     _viewModelFactory = viewModelFactory;
 }
Пример #14
0
 public GeoCodingServiceSpecs()
 {
     var key = ConfigurationManager.AppSettings["geoLocationKey"];
     _sut = new GeoCodingService(new GeoCodingServiceConfigProvider(key), new GeoCodingParser(), new GeoCodingDataMapper());
 }
Пример #15
0
 /// <summary>
 /// Метод установки текущего геосериса
 /// </summary>
 /// <param name="geoService">Ссылка на геосервис</param>
 public void SetGeoService(string nameService)
 {
     _geoCodingService = MainGeoService.GetServiceByName(nameService);
 }
Пример #16
0
 public SearchController(IGeoCodingService geoCodingService, ICoordinateViewModelFactory viewModelFactory)
 {
     _geoCodingService = geoCodingService;
     _viewModelFactory = viewModelFactory;
 }