//EF_Specific_Conditions public List<DDDClass.SpecificConditionRecord> Get_EF_Specific_Conditions(int dataBlockId) { SQLDB_Records sqldbRecords = new SQLDB_Records(connectionString, sqlDB.GETMYSQLCONNECTION()); string paramName = "ef_specific_conditions"; string currentParam; List<DDDClass.SpecificConditionRecord> specificConditionData = new List<DDDClass.SpecificConditionRecord>(); DDDClass.SpecificConditionRecord specificConditionRecord = new DDDClass.SpecificConditionRecord(); List<string> entryTime = new List<string>(); List<string> specificConditionType = new List<string>(); currentParam = paramName + ".entryTime"; entryTime = sqldbRecords.Get_AllParamsArray(dataBlockId, currentParam); currentParam = paramName + ".specificConditionType"; specificConditionType = sqldbRecords.Get_AllParamsArray(dataBlockId, currentParam); if (entryTime.Count == specificConditionType.Count) { for (int i = 0; i < entryTime.Count; i++) { specificConditionRecord = new DDDClass.SpecificConditionRecord(); specificConditionRecord.entryTime = new DDDClass.TimeReal(entryTime[i]); specificConditionRecord.specificConditionType = new DDDClass.SpecificConditionType(specificConditionType[i]); specificConditionData.Add(specificConditionRecord); } } else throw new Exception("Ошибка, извлечение из БД информации об особых состояниях неуспешно!"); return specificConditionData; }
public List<DDDClass.SpecificConditionRecord> Get_VehicleActivities_VuSpecificConditionData(int dataBlockId) { SQLDB_Records sqldbRecords = new SQLDB_Records(connectionString, sqlDB.GETMYSQLCONNECTION()); string paramName = "vehicleActivities.vuSpecificConditionData.noOfSpecificConditionRecords"; string currentParamName; List<DDDClass.SpecificConditionRecord> vuSpecificConditionData = new List<DDDClass.SpecificConditionRecord>(); DDDClass.SpecificConditionRecord vuSpecificConditionRecord = new DDDClass.SpecificConditionRecord(); System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); byte[] _bytes; List<string> entryTime = new List<string>(); List<string> specificConditionType = new List<string>(); currentParamName = paramName + ".entryTime"; entryTime = sqldbRecords.Get_AllParamsArray(dataBlockId, currentParamName); currentParamName = paramName + ".specificConditionType"; specificConditionType = sqldbRecords.Get_AllParamsArray(dataBlockId, currentParamName); if (entryTime.Count == specificConditionType.Count) { for (int i = 0; i < entryTime.Count; i++) { vuSpecificConditionRecord = new DDDClass.SpecificConditionRecord(); vuSpecificConditionRecord.entryTime = new DDDClass.TimeReal(Convert.ToInt64(entryTime[i])); vuSpecificConditionRecord.specificConditionType = new DDDClass.SpecificConditionType(Convert.ToInt16(specificConditionType[i])); vuSpecificConditionData.Add(vuSpecificConditionRecord); } } else throw new Exception("Ошибка, не могу извлечь информацию из базы"); return vuSpecificConditionData; }