private void UpdateProcessDelete(PicesDataBase updDbConn) { RunLogAddMsg("Deleting Class[" + selectedClass.Name + "]" + "\n"); // Go through each sipper file and change the class name in there related Images table entries. TimeSpan startProcessTime = System.Diagnostics.Process.GetCurrentProcess().TotalProcessorTime; PicesDataBaseLogEntry logEntry = updDbConn.LogEntriesProcessStart("DL", "ClassMaintenanceDelete", ExecutableDateTimeStamp(), "ClassMaintenance::UpdateProcessDelete " + selectedClass.Name, "" ); String sqlCmd = "Call MLClassDeleteComprehensive (\"" + selectedClass.Name + "\")"; updDbConn.QueryStatement(sqlCmd, null); PicesClassList.UpdateParent(selectedClass, selectedClass.Parent); if (selectedClass.Parent != null) { if (selectedClass.Parent.Children != null) { selectedClass.Parent.Children.Remove(mergeClass); } } TimeSpan endProcessTime = System.Diagnostics.Process.GetCurrentProcess().TotalProcessorTime; updDbConn.LogEntriesProcessEnd(logEntry, (float)((startProcessTime - endProcessTime).TotalSeconds), "Done"); selectedClass.StoredOnDataBase = false; } /* UpdateProcessDelete */
} /* ToCmdLine */ private void ImportValidatedClassAssignments() { importingRunning = true; importingCompleted = false; PicesDataBase.ThreadInit(); PicesRunLog runLog = new PicesRunLog(); PicesDataBase threadConn = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog); extractionLogEntryId = threadConn.LogEntriesProcessStart("IV", "ImportValidatedClass", ExecutableDateTimeStamp(), ToCmdLine(), OSservices.GetRootName(sipperFileName) ); totalImagesUpdated = 0; ImportValidatedClassAssignmentsDir(threadConn, sourceDirectory); if (cancelImporting) { RunLogAddMsg("\n" + "Importing Assignments has been Canceled." + "\n\n"); } else { RunLogAddMsg("\n\n" + "Total Images[" + totalImagesUpdated.ToString("###,##0") + "\n\n"); } threadConn.Close(); threadConn = null; GC.Collect(); PicesDataBase.ThreadEnd(); importingRunning = false; importingCompleted = true; } /* ImportValidatedClassAssignments */
} /* ToCmdLine */ private void ImportImagesIntoDeploymentProcess() { importingRunning = true; importingCompleted = false; PicesDataBase.ThreadInit(); PicesRunLog runLog = new PicesRunLog(); PicesDataBase threadConn = PicesDataBase.GetGlobalDatabaseManagerNewInstance(runLog); extractionLogEntryId = threadConn.LogEntriesProcessStart("II", "ImportImagesIntoDeployment", ExecutableDateTimeStamp(), ToCmdLine(), "" ); totalImagesUpdated = 0; ImportImagesFromDirectoryStructure(threadConn, sourceDirectory); if (cancelImporting) { runLog.Writeln("\n" + "Importing Images has been Canceled." + "\n\n"); } else { runLog.Writeln("\n\n" + "Total Images[" + totalImagesUpdated.ToString("###,##0") + "\n\n"); } threadConn.Close(); threadConn = null; GC.Collect(); PicesDataBase.ThreadEnd(); importingRunning = false; importingCompleted = true; } /* ImportImagesIntoDeploymentProcess */