Click here to Skip to main content
11,479,083 members (60,096 online)
Click here to Skip to main content
Add your own
alternative version

GPS Tracer Extension: storing the path on SQL2005 via Web Services

, 7 Sep 2007 24.3K 348 32
This article extends Leonardo Salvatore's project "A GPS tracer application for Windows Mobile CE 5" using the Web Service Software Factory. It shows how to create a robust solution for storing the path on a DB server, using Web Services and SQL
gpstracerserver.zip
Source
Business Logic
GpsTracerServer.BusinessEntities
Properties
GpsTracerServer.BusinessLogic
Properties
Resource Access
GpsTracerServer.DataAccess
Generic
Properties
SQLServer
Service Interface
GpsTracerServer.DataTypes
Properties
GpsTracerServer.Host
App_Code
vwd.webinfo
GpsTracerServer.ServiceContracts
Properties
GpsTracerServer.ServiceImplementation
Properties
Settings.settings
Web References
Tests
Functional Tests
GpsTracerServer.Client
GpsTracerServer.Client.csproj.user
Properties
Settings.settings
Web References
localhost
GpsTracerServiceContract.disco
GpsTracerServiceContract.wsdl
Reference.map
Unit Tests
Article.gif
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.832
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace GpsTracerServer.ServiceImplementation.Translators
{
    using System;
    using GpsTracerServer.DataTypes;
    using GpsTracerServer.BusinessEntities;


    public class TranslateBetweenDevicePlusLocationTypeAndLocationEntry
    {

        public static GpsTracerServer.BusinessEntities.LocationEntry TranslateDevicePlusLocationTypeToLocationEntry(GpsTracerServer.DataTypes.DevicePlusLocationType from)
        {
            GpsTracerServer.BusinessEntities.LocationEntry to = new GpsTracerServer.BusinessEntities.LocationEntry();
            to.Heading = from.LocationHeading;
            to.Quote = from.LocationQuote;
            to.Speed = from.LocationSpeed;
            to.WhenInserted = from.LocationWhenInserted;
            to.Longitude = from.LocationLongitude;
            to.Latitude = from.LocationLatitude;
            // Create mapping for property ID
            // Create mapping for property IDDevice
            to.IDDevice = new Guid(from.DeviceID.ToString());
            // to.ID is intentionally empty: i's filled when a location is inserted into the DB
            return to;
        }

        //public static GpsTracerServer.DataTypes.DevicePlusLocationType TranslateLocationEntryToDevicePlusLocationType(GpsTracerServer.BusinessEntities.LocationEntry from)
        //{
        //    GpsTracerServer.DataTypes.DevicePlusLocationType to = new GpsTracerServer.DataTypes.DevicePlusLocationType();
        //    // Create mapping for property DeviceID
        //    // Create mapping for property DeviceCreationDate
        //    // Create mapping for property DeviceLastLoginDate
        //    // Create mapping for property LocationLatitude
        //    // Create mapping for property LocationLongitude
        //    // Create mapping for property LocationWhenInserted
        //    // Create mapping for property LocationSpeed
        //    // Create mapping for property LocationQuote
        //    // Create mapping for property LocationHeading
        //    return to;
        //}
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Lorenzo Consegni
Web Developer
Italy Italy
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150520.1 | Last Updated 7 Sep 2007
Article Copyright 2007 by Lorenzo Consegni
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid