protected void btnInstall_Click(object sender, EventArgs e) { InstallationManager im = Installer; if (Request.QueryString["export"] == "true") { im.ExportSchema(Response.Output); Response.End(); } else { if (ExecuteWithErrorHandling(im.Install) != null) { if (ExecuteWithErrorHandling(im.Install) == null) { // retry once upon error lblInstall.Text = "Database created, now insert root items."; ShowTab("Content"); } } else { ShowTab("Content"); } } }
protected void btnExportSchema_Click(object sender, EventArgs e) { Response.ContentType = "application/octet-stream"; Response.AddHeader("Content-Disposition", "attachment;filename=n2_create.sql"); InstallationManager im = Installer; im.ExportSchema(Response.Output); Response.End(); }