/// <summary>
        /// Custom Staging Task generation
        /// </summary>
        /// <param name="RelationshipSiteObj"></param>
        /// <param name="TaskType"></param>
        private void RelationshipNameSite_CreateStagingTask(RelationshipNameSiteInfo RelationshipSiteObj, TaskTypeEnum TaskType)
        {
            List <ServerInfo>    ActiveServers   = ServerInfo.Provider.Get().WhereEquals("ServerSiteID", SiteContext.CurrentSiteID).WhereEquals("ServerEnabled", true).ToList();
            RelationshipNameInfo RelationshipObj = RelationshipNameInfo.Provider.Get(RelationshipSiteObj.RelationshipNameID);

            // If relationship obj is already gone, then the Site deletion thing is already handled with the deletion of the relationship name.
            if (RelationshipObj == null)
            {
                return;
            }

            if (IsCustomAdhocRelationshipName(RelationshipObj) && ActiveServers.Count > 0)
            {
                string Data         = "<NewDataSet>" + RelationshipObj.ToXML("CMS_RelationshipName", false) + "</NewDataSet>";
                string TaskTitle    = "";
                string TaskTitleEnd = "";
                switch (TaskType)
                {
                case TaskTypeEnum.AddToSite:
                    TaskTitle    = "Add";
                    TaskTitleEnd = "to";
                    break;

                case TaskTypeEnum.RemoveFromSite:
                    TaskTitle    = "Remove";
                    TaskTitleEnd = "from";
                    break;
                }
                StagingTaskInfo SiteTask = new CMS.Synchronization.StagingTaskInfo()
                {
                    TaskTitle      = string.Format("{0} Relationship name '{1}' {2} site", TaskTitle, RelationshipObj.RelationshipDisplayName, TaskTitleEnd),
                    TaskType       = TaskType,
                    TaskObjectType = RelationshipNameInfo.OBJECT_TYPE,
                    TaskObjectID   = RelationshipObj.RelationshipNameId,
                    TaskData       = Data,
                    TaskTime       = DateTime.Now,
                    TaskSiteID     = SiteContext.CurrentSiteID
                };
                StagingTaskInfo.Provider.Set(SiteTask);

                foreach (ServerInfo ServerObj in ActiveServers)
                {
                    // Create synchronization
                    SynchronizationInfo SyncSiteInfo = new SynchronizationInfo()
                    {
                        SynchronizationTaskID   = SiteTask.TaskID,
                        SynchronizationServerID = ServerObj.ServerID
                    };
                    SynchronizationInfo.Provider.Set(SyncSiteInfo);
                }

                TaskGroupInfo TaskGroup = TaskGroupInfoProvider.GetUserTaskGroupInfo(MembershipContext.AuthenticatedUser.UserID);
                if (TaskGroup != null)
                {
                    TaskGroupTaskInfo.Provider.Add(TaskGroup.TaskGroupID, SiteTask.TaskID);
                }
            }
        }
        /// <summary>
        /// Creates the Staging Task manually
        /// </summary>
        /// <param name="RelationshipObj"></param>
        /// <param name="TaskType"></param>
        private void RelationshipName_CreateStagingTask(RelationshipNameInfo RelationshipObj, TaskTypeEnum TaskType)
        {
            List <ServerInfo> ActiveServers = ServerInfo.Provider.Get().WhereEquals("ServerSiteID", SiteContext.CurrentSiteID).WhereEquals("ServerEnabled", true).ToList();

            if (IsCustomAdhocRelationshipName(RelationshipObj) && ActiveServers.Count > 0)
            {
                string Data      = "<NewDataSet>" + RelationshipObj.ToXML("CMS_RelationshipName", false) + "</NewDataSet>";
                string TaskTitle = "";
                switch (TaskType)
                {
                case TaskTypeEnum.CreateObject:
                    TaskTitle = "Create";
                    break;

                case TaskTypeEnum.UpdateObject:
                    TaskTitle = "Update";
                    break;

                case TaskTypeEnum.DeleteObject:
                    TaskTitle = "Delete";
                    break;
                }
                StagingTaskInfo Task = new StagingTaskInfo()
                {
                    TaskTitle      = string.Format("{0} Relationship name '{1}'", TaskTitle, RelationshipObj.RelationshipDisplayName),
                    TaskType       = TaskType,
                    TaskObjectType = RelationshipNameInfo.OBJECT_TYPE,
                    TaskObjectID   = RelationshipObj.RelationshipNameId,
                    TaskData       = Data,
                    TaskTime       = DateTime.Now
                };
                StagingTaskInfo.Provider.Set(Task);

                foreach (ServerInfo ServerObj in ActiveServers)
                {
                    // Create synchronization
                    SynchronizationInfo SyncInfo = new SynchronizationInfo()
                    {
                        SynchronizationTaskID   = Task.TaskID,
                        SynchronizationServerID = ServerObj.ServerID
                    };
                    SynchronizationInfo.Provider.Set(SyncInfo);
                }

                TaskGroupInfo TaskGroup = TaskGroupInfoProvider.GetUserTaskGroupInfo(MembershipContext.AuthenticatedUser.UserID);
                if (TaskGroup != null)
                {
                    TaskGroupTaskInfo.Provider.Add(TaskGroup.TaskGroupID, Task.TaskID);
                }
            }
        }