Ejemplo n.º 1
0
 public RoadSurvey(Road road)
 {
     Id = DateTime.Now.ToFileTime() + "-" + road.Id;
     IsFinished = false;
     Date = DateTime.Now;
     RoadId = road.Id;
     PlaceId = road.PlaceId;
 }
Ejemplo n.º 2
0
        public static async Task AddNewRoadSurvey(RoadSurvey survey, Road road = null)
        {
            await App.LocalRoadSurveyTable.InsertAsync(survey);
            if (road == null)
                road = await App.LocalRoadTable.LookupAsync(survey.RoadId);

            await road.AddNewSurvey(survey);
        }
Ejemplo n.º 3
0
 private void editRoadToTrashRoad(Road rd)
 {
     rd.Id = "100869999999";
     rd.PlaceId = "10086";
 }
Ejemplo n.º 4
0
        private async Task<bool> checkHasUnfinishedSurvey(Road road, RoadSurvey roadSurvey)
        {
            if (roadSurvey == null)
            {
                road.HasUnfinishedSurvey = false;
                await App.LocalRoadTable.UpdateAsync(road);
                return false;
            }
            var unSurveyedSegments = await GetUnSurveyedSegments(ViewModel.Segments, roadSurvey);
            if (unSurveyedSegments==null || unSurveyedSegments.Count == 0)
                return false;

            return true;
        }