private void LoadForm()
 {
     Affinity.SystemSetting ss = new Affinity.SystemSetting(this.phreezer);
     ss.Load(Affinity.SystemSetting.DefaultCode);
     pnlForm.Controls.Clear();
     pnlForm.Controls.Add(xmlForm.GetFormFieldControl(rtype.Definition, ss.Data));
 }
    protected void UpdateSettings()
    {
        Affinity.SystemSetting ss = new Affinity.SystemSetting(this.phreezer);
        ss.Load(Affinity.SystemSetting.DefaultCode);

        ss.Data = XmlForm.XmlToString(xmlForm.GetResponse(pnlForm));
        ss.Update();

        // we have to update the application global as well because otherwise it won't
        // reflect the changes until the web application is restarted
        Application[Affinity.SystemSetting.DefaultCode] = ss.Settings;

        this.Master.ShowFeedback("System Settings have been updated", MasterPage.FeedbackType.Information);
    }