public void MoveUp(Guid moverActionId, Guid staticActionId, out ViewAction moverAction, out ViewAction staticAction)
        {
            moverAction  = ViewActionDao.FindById(moverActionId);
            staticAction = ViewActionDao.FindById(staticActionId);

            int seq1 = moverAction.Sequence;
            int seq2 = staticAction.Sequence;

            if (seq1 != seq2)
            {
                int temp = seq2;
                seq2 = seq1;
                seq1 = temp;
            }
            else
            {
                seq2++;
            }

            moverAction.Sequence  = seq1;
            staticAction.Sequence = seq2;

            ViewActionDao.SaveOrUpdate(moverAction);
            ViewActionDao.SaveOrUpdate(staticAction);
        }
        public void GetViewToActionMap(ViewAction viewAction, out PropertyMap viewToActionMap, out IList <IMappableProperty> sourceProperties, out IList <IMappableProperty> targetProperties)
        {
            ViewAction readViewAction = ViewActionDao.FindById(viewAction.Id);

            PropertyMap actionRequestMap = readViewAction.Action.RequestMap;

            if (actionRequestMap != null)
            {
                sourceProperties = new List <IMappableProperty>(
                    (from MappedProperty p in MetaManagerUtil.InitializePropertyMap(actionRequestMap).MappedProperties
                     where !(p.Target is UXSessionProperty)
                     select p).Cast <IMappableProperty>());
            }
            else
            {
                sourceProperties = new List <IMappableProperty>();
            }

            PropertyMap viewResponseMap = readViewAction.ViewNode.View.ResponseMap;

            if ((viewResponseMap != null) && (viewResponseMap != null))
            {
                targetProperties = new List <IMappableProperty>(MetaManagerUtil.InitializePropertyMap(viewResponseMap).MappedProperties.Cast <IMappableProperty>());
            }
            else
            {
                targetProperties = new List <IMappableProperty>();
            }

            IList <UXSessionProperty> sessionProperties = ApplicationService.GetUXSessionProperties(readViewAction.ViewNode.View.Application);

            targetProperties = new List <IMappableProperty>(targetProperties.Concat <IMappableProperty>(sessionProperties.Cast <IMappableProperty>()));

            viewToActionMap = readViewAction.ViewToActionMap;

            MetaManagerUtil.InitializePropertyMap(viewToActionMap);
        }