コード例 #1
0
        protected void btnTest_Click(object sender, EventArgs e)
        {
            var assistant = new MigrationAssistant();

            var results = assistant.Process(true);

            this.ltlResults.Text = string.Format("Found {0} addresses for {1} users", results.AddressesUpdated, results.UsersUpdated);
        }
コード例 #2
0
 protected virtual void btnTest_Click(object sender, EventArgs e)
 {
     try
     {
         int totalMigrated;
         using (new ShopContextSwitcher(GetSiteContext()))
         {
             var assistant = new MigrationAssistant(testOnly: true);
             totalMigrated = assistant.Process();
         }
         ltlResults.Text = string.Format("Would have migrated {0} orders.", totalMigrated);
     }
     catch (Exception ex)
     {
         ltlResults.Text = string.Format("Error testing migrating orders: {0}\n\r{1}", ex.Message, ex);
     }
 }
コード例 #3
0
 protected virtual void btnMigrate_Click(object sender, EventArgs e)
 {
     try
     {
         Assert.IsNotNullOrEmpty(txtFolderId.Text, "Please enter the Wish List Folder ID");
         int totalMigrated;
         using (new ShopContextSwitcher(GetSiteContext()))
         {
             var assistant = new MigrationAssistant(Sitecore.Data.ID.Parse(txtFolderId.Text));
             totalMigrated = assistant.Process();
         }
         ltlResults.Text = string.Format("Success! Migrated {0} wish lists.", totalMigrated);
     }
     catch (Exception ex)
     {
         ltlResults.Text = string.Format("Error migrating wish lists: {0}\n\r{1}", ex.Message, ex);
     }
 }