Пример #1
0
        public static SiteCheckin Create(ScheduleItemCheckedIn message)
        {
            var ci = (CultureInfo) CultureInfo.CurrentCulture.Clone();
            ci.NumberFormat.NumberDecimalSeparator = ".";

            var checkIn = new SiteCheckin
                {
                    CheckInMethod = message.CheckInMethod,
                    CheckInLatitude = float.Parse(message.CheckInLatitude, ci),
                    CheckInLongitude = float.Parse(message.CheckInLongitude, ci),
                    DistanceFromSite = float.Parse(message.DistanceFromSite, ci),
                    ServerCheckInTimeStampUtc = message.UtcCheckInTime,
                    ClientCheckInTimeStampLocal = message.Timestamp.ToDateTimeOffset()
                };

            return checkIn;
        }
 public static TeamDailyReportTransitionViewModel Create(ScheduleItemCheckedIn scheduleItemCheckedIn)
 {
     return new TeamDailyReportTransitionViewModel
         {
             Time = TimeOfDay.Create(scheduleItemCheckedIn.Timestamp.ToDateTimeOffset()),
             Method = scheduleItemCheckedIn.CheckInMethod,
             DistanceFromSite = scheduleItemCheckedIn.DistanceFromSite,
             Latitude = scheduleItemCheckedIn.CheckInLatitude,
             Longitude = scheduleItemCheckedIn.CheckInLongitude,
         };
 }