private ActivityLog TransferToActivityLogRec(ActivityLogList ALList)
 {
     ActivityLog ALogRec = new ActivityLog();
     //
     ALogRec.ID = ALList.ID;
     ALogRec.ActivityType = ALList.ActivityType;
     ALogRec.ItemID = ALList.ItemID;
     ALogRec.LogDateTime = ALList.LogDateTime;
     ALogRec.LogTimeInSeconds = ALList.LogTimeInSeconds;
     ALogRec.Location = ALList.Location;
     ALogRec.LogNotes = ALList.LogNotes;
     ALogRec.Battery1ItemID = ALList.Battery1ItemID;
     ALogRec.Battery2ItemID = ALList.Battery2ItemID;
     //
     return ALogRec;
 }
 public int SaveActivityLog(ActivityLog ActivityLogRec)
 {
     lock (locker)
     {
         if (ActivityLogRec.ID != 0)
         {
             database.Update(ActivityLogRec);
             return ActivityLogRec.ID;
         }
         else
         {
             return database.Insert(ActivityLogRec);
         }
     }
 }