internal static void UpdateActivitiesLogs(IPRDEV sqlEntities, OperationName operation, ProgressChangedEventHandler progressChanged)
 {
     Linq2SQL.ArchivingOperationLogs _logs = new ArchivingOperationLogs()
     {
         Date      = DateTime.Now,
         Operation = operation.ToString(),
         UserName  = Extensions.UserName()
     };
     sqlEntities.ArchivingOperationLogs.InsertOnSubmit(_logs);
     sqlEntities.SubmitChanges();
     progressChanged(1, new ProgressChangedEventArgs(1, "Updated ActivitiesLogs"));
 }
        /// <summary>
        /// Gets the recent actions.
        /// </summary>
        /// <param name="entities">The _entities.</param>
        /// <param name="operation">The operation.</param>
        /// <returns></returns>
        public static ArchivingOperationLogs GetRecentActions(IPRDEV entities, OperationName operation)
        {
            ArchivingOperationLogs _recentActions = entities.ArchivingOperationLogs.Where <ArchivingOperationLogs>(x => x.Operation.Contains(operation.ToString())).OrderByDescending <ArchivingOperationLogs, DateTime>(x => x.Date).FirstOrDefault();

            return(_recentActions);
        }