public SendNotificationRequest(string RequestId, string ElementId, PIS.Ground.Infotainment.Journaling.Notification.NotificationIdEnum NotificationId, string Parameter)
 {
     this.RequestId = RequestId;
     this.ElementId = ElementId;
     this.NotificationId = NotificationId;
     this.Parameter = Parameter;
 }
 public void SendNotification(string RequestId, string ElementId, PIS.Ground.Infotainment.Journaling.Notification.NotificationIdEnum NotificationId, string Parameter)
 {
     PIS.Ground.Infotainment.Journaling.Notification.SendNotificationRequest inValue = new PIS.Ground.Infotainment.Journaling.Notification.SendNotificationRequest();
     inValue.RequestId = RequestId;
     inValue.ElementId = ElementId;
     inValue.NotificationId = NotificationId;
     inValue.Parameter = Parameter;
     PIS.Ground.Infotainment.Journaling.Notification.SendNotificationResponse retVal = ((PIS.Ground.Infotainment.Journaling.Notification.INotificationGroundService)(this)).SendNotification(inValue);
 }
        internal static void OnTrainNotification(
            Guid pRequestId,
            PIS.Ground.Infotainment.Journaling.Notification.NotificationIdEnum pNotificationId,
            string pElementId,
            string pParameter)
        {
            try
            {
                switch (pNotificationId)
                {
                case PIS.Ground.Infotainment.Journaling.Notification.NotificationIdEnum.Completed:
                    //nothing to do
                    break;

                case PIS.Ground.Infotainment.Journaling.Notification.NotificationIdEnum.Failed:

                    int lFailedRemoteFolderId = 0;
                    if (int.TryParse(pParameter, out lFailedRemoteFolderId))
                    {
                        string      lGetFolderInformationError;
                        IFolderInfo lFolderInfo = _t2gManager.T2GFileDistributionManager.GetRemoteFolderInformation(lFailedRemoteFolderId, pElementId, ConfigurationSettings.AppSettings["ApplicationId"], out lGetFolderInformationError);
                        if (lFolderInfo != null)
                        {
                            Guid lRequestId = new Guid(lFolderInfo.FolderName);                                     // The folder name should have the GUID-formatted name, this is our request ID
                            SendNotificationToGroundApp(lRequestId, PIS.Ground.GroundCore.AppGround.NotificationIdEnum.Failed, pElementId);
                        }
                        else
                        {
                            LogManager.WriteLog(TraceType.ERROR, "Failure to retrieve folder info, error " + lGetFolderInformationError, "PIS.Ground.Infotainment.Journaling.JournalingService.OnTrainNotification", null, EventIdEnum.InfotainmentJournaling);
                        }
                    }
                    else
                    {
                        LogManager.WriteLog(TraceType.ERROR, "Invalid folder ID as notification parameter, actual value [" + pParameter + "]", "PIS.Ground.Infotainment.Journaling.JournalingService.OnTrainNotification", null, EventIdEnum.InfotainmentJournaling);
                    }
                    break;
                }
            }
            catch (System.Exception e)
            {
                LogManager.WriteLog(TraceType.ERROR, "Exception thrown", "PIS.Ground.Infotainment.Journaling.JournalingService.OnTrainNotification", e, EventIdEnum.InfotainmentJournaling);
            }
        }