} /* UpdateProcessDelete */ private void UpdateProcessMerge(PicesDataBase updDbConn) { RunLogAddMsg("Merging Class [" + selectedClass.Name + "] into [" + mergeClass.Name + "]" + "\n"); // First: Update the Images table. // Second: Update Classes table. String sqlCmd = "Call MLClassMergeComprehensive (" + "\"" + selectedClass.Name + "\"" + ", " + "\"" + mergeClass.Name + "\"" + ")"; updDbConn.QueryStatement(sqlCmd, null); PicesClassList.UpdateParent(mergeClass, selectedClass); if (mergeClass.Parent != null) { if (mergeClass.Parent.Children != null) { mergeClass.Parent.Children.Remove(mergeClass); } } selectedClass.StoredOnDataBase = false; selectedClass = mergeClass; } /* UpdateProcessMerge */
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 */