|
@@ -492,10 +492,10 @@ namespace PRS.Mobile
|
|
if (_currenttimesheet.Date != DateTime.Today)
|
|
if (_currenttimesheet.Date != DateTime.Today)
|
|
{
|
|
{
|
|
var here = GPSLocation();
|
|
var here = GPSLocation();
|
|
- _currenttimesheet.FinishLocation = here;
|
|
|
|
|
|
+ _currenttimesheet.FinishLocation.CopyFrom(here);
|
|
_currenttimesheet.Finish = TimeSpan.FromDays(1).Subtract(TimeSpan.FromSeconds(1));
|
|
_currenttimesheet.Finish = TimeSpan.FromDays(1).Subtract(TimeSpan.FromSeconds(1));
|
|
new Client<TimeSheet>().Save(_currenttimesheet,
|
|
new Client<TimeSheet>().Save(_currenttimesheet,
|
|
- "Closing Timesheet at Modnight on Mobile Device");
|
|
|
|
|
|
+ "Closing Timesheet at Midnight on Mobile Device");
|
|
CreateTimeSheet(_currenttimesheet.JobLink.ID, _currenttimesheet.JobLink.JobNumber, _currenttimesheet.JobLink.Name, here, here.Address, "Creating Timeheet at Midnight on Mobile Device");
|
|
CreateTimeSheet(_currenttimesheet.JobLink.ID, _currenttimesheet.JobLink.JobNumber, _currenttimesheet.JobLink.Name, here, here.Address, "Creating Timeheet at Midnight on Mobile Device");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -583,7 +583,7 @@ namespace PRS.Mobile
|
|
{
|
|
{
|
|
_currenttimesheet.Finish =
|
|
_currenttimesheet.Finish =
|
|
new TimeSpan(DateTime.Now.TimeOfDay.Hours, DateTime.Now.TimeOfDay.Minutes, 0);
|
|
new TimeSpan(DateTime.Now.TimeOfDay.Hours, DateTime.Now.TimeOfDay.Minutes, 0);
|
|
- _currenttimesheet.FinishLocation = here;
|
|
|
|
|
|
+ _currenttimesheet.FinishLocation .CopyFrom(here);
|
|
//bUpdatingTimesheet = true;
|
|
//bUpdatingTimesheet = true;
|
|
new Client<TimeSheet>().Save(_currenttimesheet, "Clocking Off");
|
|
new Client<TimeSheet>().Save(_currenttimesheet, "Clocking Off");
|
|
}
|
|
}
|
|
@@ -849,22 +849,16 @@ namespace PRS.Mobile
|
|
{
|
|
{
|
|
_currenttimesheet = new TimeSheet
|
|
_currenttimesheet = new TimeSheet
|
|
{
|
|
{
|
|
- EmployeeLink =
|
|
|
|
- {
|
|
|
|
- ID = App.Data.Me.ID
|
|
|
|
- },
|
|
|
|
Date = DateTime.Today,
|
|
Date = DateTime.Today,
|
|
- StartLocation = location,
|
|
|
|
- JobLink =
|
|
|
|
- {
|
|
|
|
- ID = jobid,
|
|
|
|
- JobNumber = jobnumber,
|
|
|
|
- Name = jobname
|
|
|
|
- },
|
|
|
|
Address = address,
|
|
Address = address,
|
|
SoftwareVersion = MobileUtils.AppVersion.InstalledVersionNumber + App.DeviceString,
|
|
SoftwareVersion = MobileUtils.AppVersion.InstalledVersionNumber + App.DeviceString,
|
|
Start = (DateTime.Now - DateTime.Today).Floor(TimeSpan.FromMinutes(1))
|
|
Start = (DateTime.Now - DateTime.Today).Floor(TimeSpan.FromMinutes(1))
|
|
};
|
|
};
|
|
|
|
+ _currenttimesheet.EmployeeLink.ID = App.Data.Me.ID;
|
|
|
|
+ _currenttimesheet.JobLink.ID = jobid;
|
|
|
|
+ _currenttimesheet.JobLink.JobNumber = jobnumber;
|
|
|
|
+ _currenttimesheet.JobLink.Name = jobname;
|
|
|
|
+ _currenttimesheet.StartLocation.CopyFrom(location);
|
|
new Client<TimeSheet>().Save(_currenttimesheet, auditmessage);
|
|
new Client<TimeSheet>().Save(_currenttimesheet, auditmessage);
|
|
|
|
|
|
}
|
|
}
|