}//END getStreamedVideoField method.

    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="Page">Evado.UniForm.Model.Page object.</param>
    //  ------------------------------------------------------------------------------
    private void getDataObject_FieldGroup (
      Evado.UniForm.Model.Page Page )
    {
      this.LogMethod ( "getDataObject_FieldGroup" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( );
      Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( );
      Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( );

      // 
      // create the page pageMenuGroup
      // 
      pageGroup = Page.AddGroup (
         String.Empty,
         Evado.UniForm.Model.EditAccess.Inherited );
      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width;
      pageGroup.EditAccess = Evado.UniForm.Model.EditAccess.Enabled;

      pageGroup.SetCommandBackBroundColor (
        Evado.UniForm.Model.GroupParameterList.BG_Mandatory,
        Evado.UniForm.Model.Background_Colours.Red );

      //
      // Add the groups commands.
      //
      this.getDataObject_GroupCommands ( pageGroup );

      // 
      // Create the user id object
      // 
      groupField = pageGroup.createTextField (
         Evado.Digital.Model.EdUserProfile.FieldNames.UserId.ToString ( ),
        EdLabels.User_Profile_Identifier_Field_Label,
        this.Session.AdminUserProfile.UserId,
        80 );
      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled;


      // 
      // Create the comon name object
      // 
      groupField = pageGroup.createTextField (
         Evado.Digital.Model.EdUserProfile.FieldNames.CommonName,
        EdLabels.Dem_Registration_CommonName_Field_Label,
        this.Session.AdminUserProfile.CommonName,
        80 );
      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.Mandatory = true;

      // 
      // Create the user's email address object
      // 
      groupField = pageGroup.createTelephoneNumberField (
         Evado.Digital.Model.EdUserProfile.FieldNames.Telephone.ToString ( ),
        EdLabels.UserProfile_Telephone_Field_Label,
        this.Session.AdminUserProfile.Telephone );
      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.Mandatory = true;

      // 
      // Create the user's email address object
      // 
      groupField = pageGroup.createEmailAddressField (
         Evado.Digital.Model.EdUserProfile.FieldNames.Email_Address.ToString ( ),
        EdLabels.UserProfile_Email_Field_Label,
        this.Session.AdminUserProfile.EmailAddress );
      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.Mandatory = true;
      groupField.setBackgroundColor (
        Evado.UniForm.Model.FieldParameterList.BG_Mandatory,
        Evado.UniForm.Model.Background_Colours.Red );

    }//END getDataObject_FieldGroup Method
    }//END getPropertiesDataObject Method

    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="Page">Evado.UniForm.Model.Page object.</param>
    //  ------------------------------------------------------------------------------
    private void getPropertiesPage_GeneralGroup (
      Evado.UniForm.Model.Page Page )
    {
      this.LogMethod ( "getProperties_GeneralPageGroup" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( );
      Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( );
      Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( );
      Evado.UniForm.Model.Parameter parameter = new Evado.UniForm.Model.Parameter ( );
      List<EvOption> optionList = new List<EvOption> ( );
      //
      // Define the general properties pageMenuGroup..
      //
      pageGroup = Page.AddGroup (
        EdLabels.Form_Properties_General_Group_Title);
      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width;

      pageGroup.SetCommandBackBroundColor (
        Evado.UniForm.Model.GroupParameterList.BG_Mandatory,
        Evado.UniForm.Model.Background_Colours.Red );

      //
      // Define the form save commands.
      //
      this.GetDataObject_GroupCommands ( pageGroup );

      //
      // Define the page layout selection
      //
      this.GetDataObject_LayoutCommands ( pageGroup );

      //
      // Set the entity type
      //
      if ( this.Session.EntityLayout.Design.TypeId == EdRecordTypes.Null )
      {
        this.Session.EntityLayout.Design.TypeId = EdRecordTypes.Normal_Record;
      }

      //
      // Form title
      //
      groupField = pageGroup.createTextField (
        EdRecord.FieldNames.Layout_Id.ToString ( ),
        EdLabels.Label_Form_Id,
        this.Session.EntityLayout.LayoutId,
        10 );
      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = this._InitialAccess;

      //
      // Form title
      //
      groupField = pageGroup.createTextField (
        EdRecord.FieldNames.RecordPrefix,
        EdLabels.Record_Layout_Record_Prefix_Field_Label,
        this.Session.EntityLayout.Design.RecordPrefix,
        5 );
      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = this._InitialAccess;

      //
      // Form title
      //
      groupField = pageGroup.createTextField (
        EdRecord.FieldNames.Object_Title.ToString ( ),
        EdLabels.Form_Title_Field_Label,
        this.Session.EntityLayout.Design.Title,
        50 );
      groupField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Form reference
      //
      groupField = pageGroup.createTextField (
        EdRecord.FieldNames.Reference.ToString ( ),
        EdLabels.Form_Reference_Field_Label,
        this.Session.EntityLayout.Design.HttpReference,
        50 );
      groupField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Form Instructions
      //
      groupField = pageGroup.createFreeTextField (
        EdRecord.FieldNames.Instructions.ToString ( ),
        EdLabels.Form_Instructions_Field_Title,
        this.Session.EntityLayout.Design.Instructions,
        50, 4 );
      groupField.Layout = EuAdapter.DefaultFieldLayout;


      //
      // Form category
      //
      groupField = pageGroup.createTextField (
        EdRecord.FieldNames.FormCategory.ToString ( ),
        EdLabels.Form_Category_Field_Title,
        this.Session.EntityLayout.Design.RecordCategory,
        50 );
      groupField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Form Update reason
      //
      optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.UpdateReasonList ), false );

      groupField = pageGroup.createSelectionListField (
        EdRecord.FieldNames.UpdateReason.ToString ( ),
        EdLabels.Form_Update_Reason_Field_Title,
        this.Session.EntityLayout.Design.UpdateReason,
        optionList );

      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = this._DesignAccess;

      //
      // Form Change description
      //
      groupField = pageGroup.createFreeTextField (
        EdRecord.FieldNames.Description.ToString ( ),
        EdLabels.Form_Description_Field_Title,
        this.Session.EntityLayout.Design.Description,
        90, 5 );

      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = this._DesignAccess;


    }//END getProperties_GeneralPageGroup Method
    }//END getProperties_GeneralPageGroup Method

    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="Page">Evado.UniForm.Model.Page object.</param>
    //  ------------------------------------------------------------------------------
    private void getPropertiesPage_SettingGroup (
      Evado.UniForm.Model.Page Page )
    {
      this.LogMethod ( "getPropertiesPage_SettingGroup" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( );
      Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( );
      Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( );
      Evado.UniForm.Model.Parameter parameter = new Evado.UniForm.Model.Parameter ( );
      List<EvOption> optionList = new List<EvOption> ( );

      //
      // Define the general properties pageMenuGroup..
      //
      pageGroup = Page.AddGroup (
        EdLabels.Form_Properties_Settings_Group_Title );
      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width;

      pageGroup.SetCommandBackBroundColor (
        Evado.UniForm.Model.GroupParameterList.BG_Mandatory,
        Evado.UniForm.Model.Background_Colours.Red );

      this.GetDataObject_GroupCommands ( pageGroup );

      //
      // Layout field readonly display format settings
      //
      optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.FieldReadonlyDisplayFormats ), false );


      groupField = pageGroup.createSelectionListField (
        EdRecord.FieldNames.FieldReadonlyDisplayFormat.ToString ( ),
        EdLabels.EntityLayout_FieldDisplayFormat_Field_Title,
        this.Session.EntityLayout.Design.FieldReadonlyDisplayFormat,
        optionList );
      groupField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Form Update reason
      //
      optionList = this.AdapterObjects.Settings.GetRoleOptionList ( false );

      groupField = pageGroup.createCheckBoxListField (
        EdRecord.FieldNames.ReadAccessRoles.ToString ( ),
        EdLabels.Record_Layout_AccessRole_Field_Label,
        this.Session.EntityLayout.Design.EditAccessRoles,
        optionList );

      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = this._DesignAccess;


      groupField = pageGroup.createCheckBoxListField (
        EdRecord.FieldNames.EditAccessRoles.ToString ( ),
        EdLabels.Record_Layout_EditRole_Field_Label,
        this.Session.EntityLayout.Design.ReadAccessRoles,
        optionList );

      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = this._DesignAccess;

      //
      // Layout author only draft record access
      //
      optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.AuthorAccessList ), false );

      this.LogDebug ( "Author Access option list length: ", optionList );
      this.LogDebug ( "RecordLayout.Design.AuthorAccess: ", this.Session.EntityLayout.Design.AuthorAccess );

      groupField = pageGroup.createSelectionListField (
        EdRecord.FieldNames.AuthorAccess.ToString ( ),
        EdLabels.Record_Layout_Author_Access_Setting_Field_Title,
        this.Session.EntityLayout.Design.AuthorAccess,
        optionList );
      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = this._DesignAccess;

      //
      // Enable display if chiled entities.
      //
      groupField = pageGroup.createBooleanField (
        EdRecord.FieldNames.DisplayRelatedEntities.ToString ( ),
        EdLabels.EntityLayout_Display_Related_Entities_Field_Title,
        this.Session.EntityLayout.Design.DisplayRelatedEntities );

      groupField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Layout author only edit record access
      //
      optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.ParentTypeList ), true );

      groupField = pageGroup.createSelectionListField (
        EdRecord.FieldNames.ParentType.ToString ( ),
        EdLabels.Record_Layout_Parent_Object_Type_Field_Title,
        this.Session.EntityLayout.Design.ParentType,
        optionList );
      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = this._DesignAccess;

      //
      // Select the hierachical entities this entity can be referenced to.
      //

      if ( this.Session.EntityLayout.Design.ParentType == EdRecord.ParentTypeList.Entity )
      {
        optionList = this.AdapterObjects.GetIssuedEntityOptions ( false );

        groupField = pageGroup.createCheckBoxListField (
          EdRecord.FieldNames.ParentEntities.ToString ( ),
          EdLabels.Record_Layout_Parent_Entity_Selection_Field_Title,
          this.Session.EntityLayout.Design.ParentEntities,
          optionList );
        groupField.Layout = EuAdapter.DefaultFieldLayout;
      }
      //
      // Default field layout 
      //
      optionList = EvStatics.getOptionsFromEnum ( typeof ( Evado.UniForm.Model.FieldLayoutCodes ), false );

      if ( this.Session.EntityLayout.Design.DefaultPageLayout == null )
      {
        this.Session.EntityLayout.Design.DefaultPageLayout = EuAdapter.DefaultFieldLayout.ToString ( );
      }

      groupField = pageGroup.createSelectionListField (
        EdRecord.FieldNames.DefaultPageLayout.ToString ( ),
        EdLabels.Form_Llink_Default_Layout_Field_Title,
        this.Session.EntityLayout.Design.DefaultPageLayout,
        optionList );

      groupField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Record LLnk content setting
      //
      optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.LinkContentSetting ), false );

      if ( this.Session.EntityLayout.Design.LinkContentSetting == EdRecord.LinkContentSetting.Null )
      {
        this.Session.EntityLayout.Design.LinkContentSetting = EdRecord.LinkContentSetting.Default;
      }

      groupField = pageGroup.createSelectionListField (
        EdRecord.FieldNames.LinkContentSetting,
        EdLabels.Record_Link_Content_Setting_Field_Title,
        this.Session.EntityLayout.Design.LinkContentSetting,
        optionList );

      groupField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Record header layout settings
      //
      optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.HeaderFormat ), false );

      if ( this.Session.EntityLayout.Design.HeaderFormat == EdRecord.HeaderFormat.Null )
      {
        this.Session.EntityLayout.Design.HeaderFormat = EdRecord.HeaderFormat.Default;
      }

      groupField = pageGroup.createSelectionListField (
        EdRecord.FieldNames.HeaderFormat,
        EdLabels.RecordLayout_Header_Format_Field_Title,
        this.Session.EntityLayout.Design.HeaderFormat,
        optionList );

      groupField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Record footer layout settings
      //
      optionList = EvStatics.getOptionsFromEnum ( typeof ( EdRecord.FooterFormat ), false );

      if ( this.Session.EntityLayout.Design.FooterFormat == EdRecord.FooterFormat.Null )
      {
        this.Session.EntityLayout.Design.FooterFormat = EdRecord.FooterFormat.Default;
      }

      groupField = pageGroup.createSelectionListField (
        EdRecord.FieldNames.FooterFormat,
        EdLabels.RecordLayout_Footer_Format_Field_Title,
        this.Session.EntityLayout.Design.FooterFormat,
        optionList );

      groupField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Form CS Script
      //
      groupField = pageGroup.createBooleanField (
        EdRecord.FieldNames.HasCsScript.ToString ( ),
        EdLabels.Form_Cs_Script_Field_Title,
        this.Session.EntityLayout.Design.hasCsScript );

      groupField.Layout = EuAdapter.DefaultFieldLayout;
      groupField.EditAccess = this._DesignAccess;

      this.LogMethodEnd ( "getPropertiesPage_SettingGroup" );
    }//END getProperties_GeneralPageGroup Method
    }//END getDataObject_MUP_GeneralGroup Method

    // ==============================================================================
    /// <summary>
    /// This method add the user personal details update group.
    /// </summary>
    /// <param name="Page">Evado.UniForm.Model.Page object.</param>
    //  ------------------------------------------------------------------------------
    private void getDataObject_MUP_DetailsGroup (
      Evado.UniForm.Model.Page Page )
    {
      this.LogMethod ( "getDataObject_MUP_DetailsGroup" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( );
      Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( );
      Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( );

      // 
      // create the page pageMenuGroup
      // 
      pageGroup = Page.AddGroup (
        EdLabels.UserProfile_General_Details_Group_Title,
        Evado.UniForm.Model.EditAccess.Inherited );
      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width;
      pageGroup.EditAccess = Evado.UniForm.Model.EditAccess.Enabled;

      pageGroup.SetCommandBackBroundColor (
        Evado.UniForm.Model.GroupParameterList.BG_Mandatory,
        Evado.UniForm.Model.Background_Colours.Red );

      //
      // Add the groups commands.
      //
      this.getDataObject_UserGroupCommands ( pageGroup );


      this.LogDebug ( "ImageFileName {0}.", this.Session.UserProfile.ImageFileName );
      // 
      // Create the customer name object
      // 
      if ( this.AdapterObjects.Settings.hasHiddenUserProfileField ( EdUserProfile.FieldNames.Image_File_Name ) == false )
      {
        this.Session.UserProfile.CurrentImageFileName = this.Session.UserProfile.ImageFileName;

        groupField = pageGroup.createImageField (
          Evado.Digital.Model.EdUserProfile.FieldNames.Image_File_Name,
          EdLabels.UserProfile_ImageFileame_Field_Label,
          this.Session.UserProfile.ImageFileName,
          300,
          300 );
        groupField.Layout = EuAdapter.DefaultFieldLayout;

        try
        {
          String stTargetPath = this.UniForm_BinaryFilePath + this.Session.UserProfile.ImageFileName;
          String stImagePath = this.UniForm_ImageFilePath + this.Session.UserProfile.ImageFileName;

          this.LogDebug ( "Target path {0}.", stTargetPath );
          this.LogDebug ( "Image path {0}.", stImagePath );

          //
          // copy the file into the image directory.
          //
          System.IO.File.Copy ( stImagePath, stTargetPath, true );
        }
        catch ( Exception Ex )
        {
          this.LogException ( Ex );
        }
      }
      else
      {
        this.Session.UserProfile.ImageFileName = String.Empty;
      }

      if ( this.AdapterObjects.Settings.hasHiddenUserProfileField ( EdUserProfile.FieldNames.Title ) == false )
      {
        groupField = pageGroup.createTextField (
          Evado.Digital.Model.EdUserProfile.FieldNames.Title,
          EdLabels.UserProfile_Title_Field_Label,
          this.Session.UserProfile.Title, 50 );
        groupField.Layout = EuAdapter.DefaultFieldLayout;
      }

      //
      // create the name field.
      //
      this.LogDebug ( "Delimited Name: " + this.Session.UserProfile.DelimitedName );

      groupField = pageGroup.createNameField (
        Evado.Digital.Model.EdUserProfile.FieldNames.Delimted_Name,
        EdLabels.UserProfile_Name_Field_Label,
        this.Session.UserProfile.DelimitedName,
        true,
        false );
      groupField.Layout = EuAdapter.DefaultFieldLayout;

      #region address block
      //
      // define the user address field.
      //
      if ( this.AdapterObjects.Settings.EnableUserAddressUpdate == true
        && this.AdapterObjects.Settings.EnableUserOrganisationUpdate == false )
      {
        this.LogDebug ( "Address_1:" + this.Session.UserProfile.Address_1 );
        this.LogDebug ( "Address_2:" + this.Session.UserProfile.Address_2 );
        this.LogDebug ( "AddressCity:" + this.Session.UserProfile.AddressCity );
        this.LogDebug ( "AddressState:" + this.Session.UserProfile.AddressState );
        this.LogDebug ( "AddressPostCode:" + this.Session.UserProfile.AddressPostCode );
        this.LogDebug ( "AddressCountry:" + this.Session.UserProfile.AddressCountry );
        // 
        // Create the customer name object
        //
        groupField = pageGroup.createAddressField (
          EuUserProfiles.CONST_ADDRESS_FIELD_ID,
          EdLabels.UserProfile_Address_Field_Label,
          this.Session.UserProfile.Address_1,
          this.Session.UserProfile.Address_2,
          this.Session.UserProfile.AddressCity,
          this.Session.UserProfile.AddressState,
          this.Session.UserProfile.AddressPostCode,
          this.Session.UserProfile.AddressCountry );
        groupField.Layout = EuAdapter.DefaultFieldLayout;

        this.LogDebug ( "AddresS:" + groupField.Value );
      }
      #endregion
      #region contact details
      // 
      // Create the customer telephone number object
      // 
      groupField = pageGroup.createTelephoneNumberField (
         Evado.Digital.Model.EdUserProfile.FieldNames.Telephone.ToString ( ),
        EdLabels.UserProfile_Telephone_Field_Label,
        this.Session.UserProfile.Telephone );
      groupField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the customer telephone number object
      // 
      groupField = pageGroup.createTelephoneNumberField (
         Evado.Digital.Model.EdUserProfile.FieldNames.Mobile_Phone.ToString ( ),
        EdLabels.UserProfile_Mobilephone_Field_Label,
        this.Session.UserProfile.MobilePhone );
      groupField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the customer fax number object
      // 
      groupField = pageGroup.createEmailAddressField (
         Evado.Digital.Model.EdUserProfile.FieldNames.Email_Address.ToString ( ),
        EdLabels.UserProfile_Email_Field_Label,
        this.Session.UserProfile.EmailAddress );
      groupField.Layout = EuAdapter.DefaultFieldLayout;
      #endregion

      this.LogMethodEnd ( "getDataObject_MUP_DetailsGroup" );

    }//END getDataObject_MUP_DetailsGroup Method