Beispiel #1
0
        public IEnumerable <CaseModel> GetCasesInDatabase()
        {
            var caseModels = new List <CaseModel>();

            var casesInDatabase = _blaiseCaseApi.GetCases(
                BlaiseConfigurationHelper.InstrumentName, BlaiseConfigurationHelper.ServerParkName);

            while (!casesInDatabase.EndOfSet)
            {
                var caseRecord = casesInDatabase.ActiveRecord;
                var outcome    = _blaiseCaseApi.GetFieldValue(caseRecord, FieldNameType.HOut).IntegerValue.ToString(CultureInfo.InvariantCulture);
                var mode       = _blaiseCaseApi.GetFieldValue(caseRecord, FieldNameType.Mode).EnumerationValue;

                caseModels.Add(new CaseModel(_blaiseCaseApi.GetPrimaryKeyValue(caseRecord), outcome, (ModeType)mode, DateTime.Now));
                casesInDatabase.MoveNext();
            }

            return(caseModels);
        }
        private Dictionary <string, string> GetReportFieldData(IEnumerable <string> fieldIds, IDataRecord caseRecord)
        {
            var reportingData = new Dictionary <string, string>();

            foreach (var fieldId in fieldIds)
            {
                reportingData.Add(fieldId, _blaiseCaseApi.GetFieldValue(caseRecord, fieldId).ValueAsText);
            }

            return(reportingData);
        }
        public string GetPostCode(string serverParkName, string instrumentName, string caseId)
        {
            var caseRecord = _blaiseCaseApi.GetCase(caseId, instrumentName, serverParkName);

            return(_blaiseCaseApi.GetFieldValue(caseRecord, FieldNameType.PostCode).ValueAsText);
        }