public void AddAddressNote(string routeId, int addressId)
        {
            // Create the manager with the api key
            Route4MeManager route4Me = new Route4MeManager(c_ApiKey);

            NoteParameters noteParameters = new NoteParameters()
            {
                RouteId      = routeId,
                AddressId    = addressId,
                Latitude     = 33.132675170898,
                Longitude    = -83.244743347168,
                DeviceType   = DeviceType.Web.Description(),
                ActivityType = StatusUpdateType.DropOff.Description()
            };

            // Run the query
            string      errorString;
            string      contents = "Test Note Contents " + DateTime.Now.ToString();
            AddressNote note     = route4Me.AddAddressNote(noteParameters, contents, out errorString);

            Console.WriteLine("");

            if (note != null)
            {
                Console.WriteLine("AddAddressNote executed successfully");

                Console.WriteLine("Note ID: {0}", note.NoteId);
            }
            else
            {
                Console.WriteLine("AddAddressNote error: {0}", errorString);
            }
        }
        public void AddAddressNoteWithFile()
        {
            // Create the manager with the api key
            var route4Me = new Route4MeManager(ActualApiKey);

            RunOptimizationSingleDriverRoute10Stops();
            OptimizationsToRemove = new List <string>()
            {
                SD10Stops_optimization_problem_id
            };

            var noteParameters = new NoteParameters()
            {
                RouteId      = SD10Stops_route_id,
                AddressId    = (int)SD10Stops_route.Addresses[1].RouteDestinationId,
                Latitude     = 33.132675170898,
                Longitude    = -83.244743347168,
                DeviceType   = DeviceType.Web.Description(),
                ActivityType = StatusUpdateType.DropOff.Description()
            };

            string[] names = Assembly.GetExecutingAssembly().GetManifestResourceNames();

            foreach (string nm in names)
            {
                Console.WriteLine(nm);
            }

            string tempFilePath = null;

            using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Route4MeSDKTest.Resources.test.png"))
            {
                var tempFiles = new TempFileCollection();
                {
                    tempFilePath = tempFiles.AddExtension("png");
                    Console.WriteLine(tempFilePath);
                    using (Stream fileStream = File.OpenWrite(tempFilePath))
                    {
                        stream.CopyTo(fileStream);
                    }
                }
            }

            // Run the query
            string      contents = "Test Note Contents with Attachment " + DateTime.Now.ToString();
            AddressNote note     = route4Me.AddAddressNote(
                noteParameters,
                contents,
                tempFilePath,
                out string errorString);

            PrintExampleAddressNote(note, errorString);

            RemoveTestOptimizations();
        }
        public void AddAddressNoteWithFile(string routeId, int addressId)
        {
            // Create the manager with the api key
            Route4MeManager route4Me = new Route4MeManager(c_ApiKey);

            NoteParameters noteParameters = new NoteParameters()
            {
                RouteId      = routeId,
                AddressId    = addressId,
                Latitude     = 33.132675170898,
                Longitude    = -83.244743347168,
                DeviceType   = DeviceType.Web.Description(),
                ActivityType = StatusUpdateType.DropOff.Description()
            };

            string[] names = Assembly.GetExecutingAssembly().GetManifestResourceNames();

            foreach (string nm in names)
            {
                Console.WriteLine(nm);
            }

            string tempFilePath = null;

            using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Route4MeSDKTest.Resources.test.png"))
            {
                var tempFiles = new TempFileCollection();
                {
                    tempFilePath = tempFiles.AddExtension("png");
                    System.Console.WriteLine(tempFilePath);
                    using (Stream fileStream = File.OpenWrite(tempFilePath))
                    {
                        stream.CopyTo(fileStream);
                    }
                }
            }

            // Run the query
            string      errorString;
            string      contents = "Test Note Contents with Attachment " + DateTime.Now.ToString();
            AddressNote note     = route4Me.AddAddressNote(noteParameters, contents, tempFilePath, out errorString);

            Console.WriteLine("");

            if (note != null)
            {
                Console.WriteLine("AddAddressNoteWithFile executed successfully");

                Console.WriteLine("Note ID: {0}", note.NoteId);
            }
            else
            {
                Console.WriteLine("AddAddressNoteWithFile error: {0}", errorString);
            }
        }