/// <summary> /// Return a table containing all of the PickLists and PickItem entries /// </summary> /// <returns></returns> public DataTable EnumeratePickLists() { if (isDebugEnabled) { logger.Debug(System.Reflection.MethodBase.GetCurrentMethod().Name + " in"); } DataTable table = new DataTable(TableNames.UDDD); if (compactDatabaseType) { try { using (SqlCeConnection conn = DatabaseConnection.CreateOpenCEConnection()) { string commandText = "SELECT _PICKLISTID, _NAME ,_PARENTID " + "FROM PICKLISTS " + "ORDER BY _PICKLISTID"; using (SqlCeCommand command = new SqlCeCommand(commandText, conn)) { new SqlCeDataAdapter(command).Fill(table); } } } catch (SqlCeException ex) { Utility.DisplayErrorMessage("A database error has occurred in AuditWizard." + Environment.NewLine + Environment.NewLine + "Please see the log file for further details."); logger.Error("Exception in " + System.Reflection.MethodBase.GetCurrentMethod().Name, ex); } catch (Exception ex) { Utility.DisplayErrorMessage("A database error has occurred in AuditWizard." + Environment.NewLine + Environment.NewLine + "Please see the log file for further details."); logger.Error("Exception in " + System.Reflection.MethodBase.GetCurrentMethod().Name, ex); } } else { AuditWizardDataAccess lAuditWizardDataAccess = new AuditWizardDataAccess(); table = lAuditWizardDataAccess.EnumeratePickLists(); } if (isDebugEnabled) { logger.Debug(System.Reflection.MethodBase.GetCurrentMethod().Name + " out"); } return(table); }