/// <summary>
        /// Mark Address as Visited
        /// </summary>
        /// <returns> status </returns>
        public void MarkAddressVisited(AddressParameters aParams)
        {
            // Create the manager with the api key
            Route4MeManager route4Me = new Route4MeManager(c_ApiKey);

            // Run the query

            {
                string errorString = "";
                int result = route4Me.MarkAddressVisited(aParams, out errorString);

                Console.WriteLine("");

                if (result != null)
                {
                    if (result==1)
                    {
                        Console.WriteLine("MarkAddressVisited executed successfully");
                    }
                    else
                    {
                        Console.WriteLine("MarkAddressVisited error: {0}", errorString);
                    }
                }
                else
                {
                    Console.WriteLine("MarkAddressVisited error: {0}", errorString);
                }
            }
        }
        /// <summary>
        /// Mark Address as Marked as Visited
        /// </summary>
        /// <returns> status </returns>
        public void MarkAddressAsMarkedAsVisited(AddressParameters aParams)
        {
            // Create the manager with the api key
            Route4MeManager route4Me = new Route4MeManager(c_ApiKey);

            // Run the query

            string errorString = "";
            Address resultAddress = route4Me.MarkAddressAsMarkedAsVisited(aParams, out errorString);

            Console.WriteLine("");

            if (resultAddress != null)
            {
                Console.WriteLine("MarkAddressAsMarkedAsVisited executed successfully");

                Console.WriteLine("Marked Address ID: {0}", resultAddress.RouteDestinationId);

            }
            else
            {
                Console.WriteLine("MarkAddressAsMarkedAsVisited error: {0}", errorString);

            }
        }
Esempio n. 3
0
        public void GetAddress(string routeId, int routeDestinationId)
        {
            // Create the manager with the api key
              Route4MeManager route4Me = new Route4MeManager(c_ApiKey);

              AddressParameters addressParameters = new AddressParameters()
              {
            RouteId = routeId,
            RouteDestinationId = routeDestinationId,
            Notes = true
              };

              // Run the query
              string errorString;
              Address dataObject = route4Me.GetAddress(addressParameters, out errorString);

              Console.WriteLine("");

              if (dataObject != null)
              {
            Console.WriteLine("GetAddress executed successfully");
            Console.WriteLine("RouteId: {0}; RouteDestinationId: {1}", dataObject.RouteId, dataObject.RouteDestinationId);
            Console.WriteLine("");
              }
              else
              {
            Console.WriteLine("GetAddress error: {0}", errorString);
            Console.WriteLine("");
              }
        }