protected void UpdateProgress()
        {
            int remaining = RecryptionHelper.GetRecryptionWorkload();

            if (remaining == 0)
            {
                EstimatedWorkload.Text      = RecryptionHelper.EstimateRecryptionWorkload().ToString();
                ChangePanel.Visible         = true;
                ChangeProgressPanel.Visible = false;
                if (Page.IsPostBack)
                {
                    KeyUpdatedMessage.Visible = true;
                }
            }
            else
            {
                ChangePanel.Visible         = false;
                ChangeProgressPanel.Visible = true;
                trRestartCancel.Visible     = ((!Page.IsPostBack) || (RemainingWorkload.Text == remaining.ToString()));
                RemainingWorkload.Text      = remaining.ToString();
                ProgressDate.Text           = LocaleHelper.LocalNow.ToString("hh:mm:ss tt");
                //SPEED UP THE CHECK BECAUSE WE ARE ALMOST DONE!
                if (remaining < 10)
                {
                    ChangeProgressTimer.Interval = 1000;
                }
            }
            BindKey();
        }
 protected void CancelChangeButton_Click(object sender, EventArgs e)
 {
     RecryptionHelper.SetRecryptionFlag(false);
     UpdateProgress();
 }
 protected void RestartChangeButton_Click(object sender, EventArgs e)
 {
     // RESTART THE RECRYPTION PROCESS
     RecryptionHelper.RecryptDatabase(Context.ApplicationInstance);
     UpdateProgress();
 }