Exemplo n.º 1
0
        public CloneView(IMessenger messenger, IShellService shell, IStorage storage, IWebService web)
        {
            InitializeComponent();

            var vm = new CloneViewModel(this, messenger, shell, storage, web);

            DataContext = vm;
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Clone(int pageAssociationId)
        {
            var pageAssociation = await _associationService.GetAsync(pageAssociationId);

            var model = new CloneViewModel
            {
                PageAssociationId = pageAssociationId,
                PageList          = await _pageService.GetAsync()
            };

            var currentPage = model.PageList.FirstOrDefault(x => x.PageId == pageAssociation.PageId);

            model.PageList.Remove(currentPage);

            return(View("_Clone", model));
        }
Exemplo n.º 3
0
        public ActionResult Clone(int pageAssociationId)
        {
            var pageAssociation = _associationService.Get(pageAssociationId);

            var model = new CloneViewModel
            {
                PageAssociationId = pageAssociationId,
                PageList          = _pageService.Get().ToList()
            };

            var currentPage = model.PageList.FirstOrDefault(x => x.PageId == pageAssociation.PageId);

            model.PageList.Remove(currentPage);

            return(View("_Clone", model));
        }
Exemplo n.º 4
0
        public async Task <ActionResult> Clone(CloneViewModel model)
        {
            await _associationService.CloneAsync(model.PageAssociationId, model.PageId);

            return(Content("Refresh"));
        }
Exemplo n.º 5
0
        public ActionResult Clone(CloneViewModel model)
        {
            _associationService.Clone(model.PageAssociationId, model.PageId);

            return(Content("Refresh"));
        }