Ejemplo n.º 1
0
        public async Task ChangeRouteStopOrdinal(RouteStop stop)
        {
            var rec = new RouteRecord {
                Id  = stop.RecordId,
                Ord = stop.Ordinal
            };

            await RouteTable.UpdateRecord(rec, RouteRecord.ORD);
        }
Ejemplo n.º 2
0
        public async Task AddRouteStop(RouteStop stop)
        {
            var route = AppScope.Instance.Route;

            var rec = new RouteRecord {
                Date     = route.Date,
                Ord      = stop.Ordinal,
                CodeName = stop.CodeName
            };

            switch (stop.Kind)
            {
            case RouteStopKind.StartPoint:
                rec.Tags = Tag.startpoint;
                break;

            case RouteStopKind.EndPoint:
                rec.Tags = Tag.endpoint;
                break;

            case RouteStopKind.MidPoint:
                rec.Tags = Tag.midpoint;
                break;
            }

            switch (stop.Status)
            {
            case RoutеStopStatus.Enroute:
                rec.Status = RouteRecord.Enroute;
                break;

            case RoutеStopStatus.Arrived:
                rec.Status = RouteRecord.Arrived;
                break;

            case RoutеStopStatus.Departed:
                rec.Status = RouteRecord.Departed;
                break;
            }

            rec = await RouteTable.CreateRecord(rec);

            stop.RecordId = rec.Id;
        }
Ejemplo n.º 3
0
        public async Task ChangeRouteStopStatus(RouteStop stop)
        {
            var rec = new RouteRecord {
                Id = stop.RecordId
            };

            switch (stop.Status)
            {
            case RoutеStopStatus.Enroute:
                rec.Status = RouteRecord.Enroute;
                break;

            case RoutеStopStatus.Arrived:
                rec.Status = RouteRecord.Arrived;
                break;

            case RoutеStopStatus.Departed:
                rec.Status = RouteRecord.Departed;
                break;
            }

            await RouteTable.UpdateRecord(rec, RouteRecord.STATUS);
        }