Exemplo n.º 1
0
        public JsonResult DumpItems(CatalogJobParameter catalog,
            RestoreAdminUserInfo restoreAdminUserInfo,
            LoadedTreeItem selectedItem,
            string notificationAddress,
            ExportType exportType)
        {
            var password = RSAUtil.AsymmetricDecrypt(restoreAdminUserInfo.Password);
            IRestoreServiceEx restore = RestoreFactory.Instance.NewRestoreServiceEx(restoreAdminUserInfo.UserAddress, password, string.Empty, restoreAdminUserInfo.Organization);

            restore.CurrentRestoreCatalogJob = catalog;
            restore.Destination = RestoreFactory.Instance.NewDumpDestination();
            restore.Destination.ExportType = exportType;
            restore.Destination.SetOtherInformation(notificationAddress);
            restore.Restore(selectedItem);
            return Json(new { IsSuccess = true });
        }
Exemplo n.º 2
0
 public JsonResult RestoreItemsToOrg(CatalogJobParameter catalog,
     RestoreAdminUserInfo restoreAdminUserInfo,
     RestoreDestination destination,
     LoadedTreeItem selectedItem)
 {
     var password = RSAUtil.AsymmetricDecrypt(restoreAdminUserInfo.Password);
     IRestoreServiceEx restore = RestoreFactory.Instance.NewRestoreServiceEx(restoreAdminUserInfo.UserAddress, password, string.Empty, restoreAdminUserInfo.Organization);
     restore.CurrentRestoreCatalogJob = catalog;
     var context = ((RestoreServiceEx)restore).ServiceContext;
     var dataAccess = RestoreFactory.Instance.NewCatalogDataAccessInternal();
     restore.Destination = RestoreFactory.Instance.NewRestoreDestinationOrgEx(restore.ServiceContext.Argument, dataAccess);
     restore.Destination.SetOtherInformation(destination.FolderPath);
     restore.Restore(selectedItem);
     return Json(new { IsSuccess = true });
 }