Exemplo n.º 1
0
        protected void b_UpdateDatabase_Click(object sender, EventArgs e)
        {
            HatCMSMigrator databasemigrator = new HatCMSMigrator();
            StringBuilder  html             = new StringBuilder();

            if (databasemigrator.IsOutDated())
            {
                html.Append("<p style=\"color: red;\">Your database needs update.</p>");
            }
            else
            {
                html.Append("<p style=\"color: red;\">Your have the latest database.</p>");
            }

            ph_ValidationErrors.Controls.Clear();
            ph_ValidationErrors.Controls.Add(new LiteralControl(html.ToString()));
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            RequestState   requeststate     = new RequestState();
            HatCMSMigrator databasemigrator = new HatCMSMigrator();

            //this.updatecontent.InnerText = requeststate.Fetch("http://hatcms.googlecode.com/svn/HatCMS_DatabaseMigrationGenerator/version/version.txt");
            StringBuilder html = new StringBuilder();

            html.Append("<p style=\"color: red;\">The latest HatCMS database version is Version: ");
            html.Append(requeststate.Fetch("http://hatcms.googlecode.com/svn/HatCMS_DatabaseMigrationGenerator/version/version.txt"));
            html.Append("</p>");

            html.Append("<p style=\"color: red;\">The Current Database Version of the System is Version: ");
            html.Append(databasemigrator.currentVersion());
            html.Append("</p>");

            ph_ValidationErrors.Controls.Clear();
            ph_ValidationErrors.Controls.Add(new LiteralControl(html.ToString()));
        }