public bool InsertMeterReadingHeader(int siteId, string dataJson) { ServiceLog sl = new ServiceLog(); try { SiteId = siteId; mq = new MeterQueries(siteId); METERREADINGHEADEREntity data = JsonConvert.DeserializeObject <METERREADINGHEADEREntity>(dataJson); if (data == null) { return(false); } mq.AddMeterReadingHeader(data); return(true); } catch (Exception ex) { //log... sl.Log(Guid.Empty, "InsertMeterReadingHeader", "FirebirdDatabaseService", ex.StackTrace, $"SiteId: {SiteId} - Exception: {ex.Message}", dataJson, ServiceLog.TraceEventType.Error); return(false); } }