/// <summary> /// Record notification results in the database /// </summary> /// <param name="logText"></param> /// <param name="notificationID"></param> /// <param name="status"></param> /// <param name="notificationType"></param> public void RecordNotification(string logText, int notificationID, int transactionID, NotifyStatus status, NotifyTypes notificationType) { RecordNotification recordNotification = null; try { recordNotification = new RecordNotification(); /*Error or Notification response is recorded*/ recordNotification.LogText = logText; recordNotification.NotificationID = notificationID; recordNotification.TransID = transactionID; recordNotification.Status = status; recordNotification.NotifyType = notificationType; recordNotification.Execute(); } catch (Exception ex) { /*Debug Object values for reference*/ LogBook.Debug(recordNotification, this); /*Write exception log*/ LogBook.Write("Error has occurred while inserting record notification parameters into 'ttNotificationLog' table", ex, "CooperAtkins.NotificationClient.NotificationComposer.EmailNotificationComposer"); } finally { recordNotification.Dispose(); } }
private void Update(RecordNotification recordNotification) { this.txtRecords.AppendText(recordNotification.Record.Content + Environment.NewLine); }