コード例 #1
0
        /// <summary>
        /// Get active notification profile ids
        /// </summary>
        /// <returns></returns>
        private NotificationProfile GetActiveNotificationProfile(int storeID)
        {
            NotificationProfile notificationProfile = null;

            try
            {
                notificationProfile = new NotificationProfile();
                notificationProfile.NotifyProfileID = _notifyProfileID;
                notificationProfile.StoreID         = storeID;
                notificationProfile = notificationProfile.Execute();
            }
            catch (Exception ex)
            {
                /*Debug Object values for reference*/
                LogBook.Debug(notificationProfile, this);

                /*Write exception log*/
                LogBook.Write("Error has occurred while fetching notification profile Ids ", ex, "CooperAtkins.NotificationClient.NotificationComposer.NotificationEligibility");
            }
            finally
            {
                notificationProfile.Dispose();
            }

            return(notificationProfile);
        }
コード例 #2
0
        /// <summary>
        /// Get E-mail Notification ID
        /// </summary>
        /// <param name="notifyProfileID"></param>
        /// <returns></returns>
        private int GetEmailNotificationID(int notifyProfileID)
        {
            NotificationProfile notificationProfile = null;
            int emailNotificationID = 0;

            try
            {
                /*Create NotificationProfile instance*/
                notificationProfile = new NotificationProfile();
                /*Send criteria notifyProfileID to get the Notification ID*/
                notificationProfile.NotifyProfileID = notifyProfileID;
                /*Execute*/
                notificationProfile = notificationProfile.Execute();
                /*Assign the EmailNotifyID to local variable emailNotificationID*/
                emailNotificationID = notificationProfile.EmailNotifyID;
            }
            catch (Exception ex)
            {
                /*Debug Object values for reference*/
                LogBook.Debug(notificationProfile, this);

                /*Write exception log*/
                LogBook.Write("Error has occurred while fetching EmailNotifyID ", ex, "CooperAtkins.NotificationClient.NotificationComposer.EmailNotificationComposer");
            }
            finally
            {
                /*Dispose the notificationProfile object*/
                notificationProfile.Dispose();
            }
            return(emailNotificationID);
        }
コード例 #3
0
        /// <summary>
        /// Get Pager Notification ID
        /// </summary>
        /// <param name="notifyProfileID"></param>
        /// <returns></returns>
        private int GetPagerNotificationID(int notifyProfileID)
        {
            NotificationProfile notificationProfile = null;
            int pagerNotificationID = 0;

            try
            {
                notificationProfile = new NotificationProfile();
                notificationProfile.NotifyProfileID = notifyProfileID;
                notificationProfile = notificationProfile.Execute();
                pagerNotificationID = notificationProfile.PagerNotifyID;
            }
            catch (Exception ex)
            {
                /*Debug Object values for reference*/
                LogBook.Debug(notificationProfile, this);

                /*Write exception log*/
                LogBook.Write(_logContent + " Error has occurred while fetching PagerNotifyID ", ex, "CooperAtkins.NotificationClient.NotificationComposer.PagerNotificationComposer");
            }
            finally
            {
                notificationProfile.Dispose();
            }
            return(pagerNotificationID);
        }