コード例 #1
0
        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");
                }
            }
        }
コード例 #2
0
        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();
        }