private void InitialiseMembers() { CurrentImport = new EmptyImportQueue(); CurrentException = new EmptyImportError(); CurrentAction = enums.ImportAction.NotSet; CurrentFeatureGroup = string.Empty; CurrentFeatureSubGroup = new EmptyFeatureGroup(); CurrentFeature = new EmptyFeature(); CurrentMarket = new EmptyMarket(); AvailableDocuments = Enumerable.Empty <OXODoc>(); AvailableEngines = Enumerable.Empty <ModelEngine>(); AvailableTransmissions = Enumerable.Empty <ModelTransmission>(); AvailableBodies = Enumerable.Empty <ModelBody>(); AvailableTrim = Enumerable.Empty <OxoTrim>(); AvailableSpecialFeatures = Enumerable.Empty <SpecialFeature>(); AvailableMarkets = Enumerable.Empty <Market>(); AvailableFeatures = Enumerable.Empty <FdpFeature>(); AvailableFeatureGroups = Enumerable.Empty <FeatureGroup>(); AvailableDerivatives = Enumerable.Empty <Derivative>(); AvailableImportDerivatives = Enumerable.Empty <ImportDerivative>(); AvailableImportTrimLevels = Enumerable.Empty <ImportTrim>(); AvailableExceptionTypes = Enumerable.Empty <ImportExceptionType>(); AvailableImportStatuses = Enumerable.Empty <ImportStatus>(); AvailableTrimLevels = Enumerable.Empty <TrimLevel>(); IdentifierPrefix = "Page"; }
public ImportQueue ImportQueueGet(int importQueueId) { ImportQueue retVal = new EmptyImportQueue(); using (IDbConnection conn = DbHelper.GetDBConnection()) { try { var para = new DynamicParameters(); para.Add("@FdpImportQueueId", importQueueId, DbType.Int32); var result = conn.Query <ImportQueueDataItem>("dbo.Fdp_ImportQueue_Get", para, commandType: CommandType.StoredProcedure).FirstOrDefault(); if (result != null) { result.ImportType = ImportTypeDataItem.ToImportType(result); result.ImportStatus = ImportStatusDataItem.ToImportStatus(result); //HydrateImportErrors(result, conn); retVal = ImportQueueDataItem.ToImportQueue(result); } } catch (Exception ex) { Log.Error(ex); throw; } } return(retVal); }
private void InitialiseMembers() { CurrentImport = new EmptyImportQueue(); CurrentException = new EmptyImportError(); CurrentAction = enums.ImportAction.NotSet; CurrentFeatureGroup = string.Empty; CurrentFeatureSubGroup = new EmptyFeatureGroup(); CurrentFeature = new EmptyFeature(); CurrentMarket = new EmptyMarket(); AvailableDocuments = Enumerable.Empty<OXODoc>(); AvailableEngines = Enumerable.Empty<ModelEngine>(); AvailableTransmissions = Enumerable.Empty<ModelTransmission>(); AvailableBodies = Enumerable.Empty<ModelBody>(); AvailableTrim = Enumerable.Empty<OxoTrim>(); AvailableSpecialFeatures = Enumerable.Empty<SpecialFeature>(); AvailableMarkets = Enumerable.Empty<Market>(); AvailableFeatures = Enumerable.Empty<FdpFeature>(); AvailableFeatureGroups = Enumerable.Empty<FeatureGroup>(); AvailableDerivatives = Enumerable.Empty<Derivative>(); AvailableImportDerivatives = Enumerable.Empty<ImportDerivative>(); AvailableImportTrimLevels = Enumerable.Empty<ImportTrim>(); AvailableExceptionTypes = Enumerable.Empty<ImportExceptionType>(); AvailableImportStatuses = Enumerable.Empty<ImportStatus>(); AvailableTrimLevels = Enumerable.Empty<TrimLevel>(); IdentifierPrefix = "Page"; }
public ImportController(IDataContext context) : base(context, ControllerType.SectionChild) { CurrentQueuedItem = new EmptyImportQueue(); }
public ImportQueue ImportQueueGet(int importQueueId) { ImportQueue retVal = new EmptyImportQueue(); using (IDbConnection conn = DbHelper.GetDBConnection()) { try { var para = new DynamicParameters(); para.Add("@FdpImportQueueId", importQueueId, DbType.Int32); var result = conn.Query<ImportQueueDataItem>("dbo.Fdp_ImportQueue_Get", para, commandType: CommandType.StoredProcedure).FirstOrDefault(); if (result != null) { result.ImportType = ImportTypeDataItem.ToImportType(result); result.ImportStatus = ImportStatusDataItem.ToImportStatus(result); //HydrateImportErrors(result, conn); retVal = ImportQueueDataItem.ToImportQueue(result); } } catch (Exception ex) { Log.Error(ex); throw; } } return retVal; }