public void GetFactorDataTypes() { List <WebFactorDataType> factorDataTypes; UseTransaction = true; factorDataTypes = FactorManager.GetFactorDataTypes(GetContext()); Assert.IsTrue(factorDataTypes.IsNotEmpty()); foreach (WebFactorDataType factorDataType in factorDataTypes) { Assert.IsTrue(factorDataType.Fields.IsNotEmpty()); } UseTransaction = false; factorDataTypes = FactorManager.GetFactorDataTypes(GetContext()); Assert.IsTrue(factorDataTypes.IsNotEmpty()); foreach (WebFactorDataType factorDataType in factorDataTypes) { Assert.IsTrue(factorDataType.Fields.IsNotEmpty()); } }
private WebFactorField GetFactorField(Int32 factorDataTypeId, String databaseFieldName) { List <WebFactorDataType> factorDataTypes; factorDataTypes = FactorManager.GetFactorDataTypes(GetContext()); foreach (WebFactorDataType factorDataType in factorDataTypes) { if (factorDataType.Id == factorDataTypeId) { foreach (WebFactorField factorField in factorDataType.Fields) { if (factorField.DatabaseFieldName == databaseFieldName) { return(factorField); } } } } return(null); }