public async Task <DataTable> GetLASLogHeaders(ConnectParameters source, ConnectParameters target) { DataAccessDef dataType = _dataDef.First(x => x.DataType == "Log"); string select = dataType.Select; string query = $" where 0 = 1"; _dbConn.OpenConnection(target); DataTable dt = _dbConn.GetDataTable(select, query); List <string> files = new List <string>(); files = await GetLASFileNames(source.Catalog); foreach (LASSections ls in lasSections) { GetVersionInfo(ls.versionInfo); string json = GetHeaderInfo(ls.wellInfo); _logNames = new List <string>(); GetCurveInfo(ls.curveInfo); int logCount = _logNames.Count(); GetIndexValues(); for (int k = 1; k < logCount; k++) { Dictionary <string, string> logHeader = new Dictionary <string, string>(); string[] attributes = Common.GetAttributes(dataType.Select); foreach (string attribute in attributes) { logHeader.Add(attribute.Trim(), ""); } logHeader["NULL_REPRESENTATION"] = _nullRepresentation; logHeader["VALUE_COUNT"] = "-99999.0"; logHeader["MAX_INDEX"] = "-99999.0"; logHeader["MIN_INDEX"] = "-99999.0"; logHeader["UWI"] = _uwi; logHeader["ROW_CREATED_BY"] = _dbConn.GetUsername(); logHeader["ROW_CHANGED_BY"] = _dbConn.GetUsername(); string logName = Common.FixAposInStrings(_logNames[k]); logHeader["CURVE_ID"] = logName; json = JsonConvert.SerializeObject(logHeader, Formatting.Indented); DataRow row = dt.NewRow(); JObject jo = JObject.Parse(json); foreach (JProperty property in jo.Properties()) { string strValue = property.Value.ToString(); if (!string.IsNullOrEmpty(strValue)) { if (row.Table.Columns.Contains(property.Name)) { row[property.Name] = property.Value; } } } dt.Rows.Add(row); } } return(dt); }