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;
                });
        }
Example #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;
            });
        }
Example #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;
 }
Example #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;
 }
 //
 // GET: /Services/
 public ServicesController(NHibernateContext nHibernateContext, IFileSystem fileSystem, IGeoCodingService geoCodingService)
     : base(nHibernateContext)
 {
     _fileSystem = fileSystem;
     _geoCodingService = geoCodingService;
 }
Example #9
0
 public GeoCodingBLL(IGeoCodingService geocodingService)
 {
     geoCodingService = geocodingService;
 }
        public GeoCodingServiceSpecs()
        {
            var key = ConfigurationManager.AppSettings["geoLocationKey"];

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

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