}//END Method

    //================================================================================
    /// <summary>
    /// This method add the group commands to the grop.
    /// </summary>
    /// <param name="PageObject">Evado.UniForm.Model.Group object.</param>
    //  ------------------------------------------------------------------------------
    private void getDataObject_PageCommands (
      Evado.UniForm.Model.Page PageObject )
    {
      this.LogMethod ( "getDataObject_PageCommands" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( );

      // 
      // Add the save groupCommand
      // 
      if ( PageObject.EditAccess == Evado.UniForm.Model.EditAccess.Enabled )
      {
        //
        // save command.
        //
        pageCommand = PageObject.addCommand (
          EdLabels.Organisation_Save_Command_Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Organisations.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Save_Object );

        // 
        // Define the save and delete groupCommand parameters
        // 
        pageCommand.SetGuid ( this.Session.AdminOrganisation.Guid );
        pageCommand.AddParameter (
           Evado.Digital.Model.EvcStatics.CONST_SAVE_ACTION,
          EdOrganisation.ActionCodes.Save.ToString ( ) );

        this.LogDebug ( "Org GUid {0}.", this.Session.AdminOrganisation.Guid );
        this.LogDebug ( "OrgType {0}.", this.Session.AdminOrganisation.OrgType );
        //
        // Delete command
        //
        if ( this.Session.AdminOrganisation.Guid != EvStatics.CONST_NEW_OBJECT_ID
          && this.Session.AdminOrganisation.OrgType != "Evado" )
        {
          pageCommand = PageObject.addCommand (
            EdLabels.Organisation_Delete_Command_Title,
            EuAdapter.ADAPTER_ID,
            EuAdapterClasses.Organisations.ToString ( ),
            Evado.UniForm.Model.ApplicationMethods.Save_Object );

          // 
          // Define the save and delete groupCommand parameters
          // 
          pageCommand.SetGuid ( this.Session.AdminOrganisation.Guid );
          pageCommand.AddParameter (
             Evado.Digital.Model.EvcStatics.CONST_SAVE_ACTION,
            EdOrganisation.ActionCodes.Delete_Object.ToString ( ) );
        }
      }

      this.LogMethodEnd ( "getDataObject_PageCommands" );

    }//END getDataObject_GroupCommands Method
    }//END create_PasswordChangeEmail_Group Method


    // ==============================================================================
    /// <summary>
    /// This method add the group commands to the passed group.
    /// </summary>
    /// <param name="PageObject">Evado.UniForm.Model.Page object.</param>
    //  ------------------------------------------------------------------------------
    private void addGroupCommands ( Evado.UniForm.Model.Group PageGroup )
    {
      //
      // Initialise the methods variables and objects.
      //
      Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( );

      if ( this._displayPage == true )
      {
        // 
        // Add the display groupCommand
        //
        pageCommand = PageGroup.addCommand (
          EdLabels.UserAdmin_Edit_Page_Command_Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Email_Templates.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Custom_Method );

        pageCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.Get_Object );

        pageCommand.AddParameter ( EuStaticContentTemplates.CONST_DISPLAY_PAGE, "false" );

        pageCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Email_Templates_Page );

        return;
      }
      else
      {
        // 
        // Add the display groupCommand
        //
        pageCommand = PageGroup.addCommand (
          EdLabels.UserAdmin_Display_Page_Command_Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Email_Templates.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Custom_Method );

        pageCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.Get_Object );

        pageCommand.AddParameter ( EuStaticContentTemplates.CONST_DISPLAY_PAGE, "true" );

        pageCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Email_Templates_Page );
      }

      // 
      // Add the save groupCommand
      //
      if ( this._displayPage == false )
      {
        pageCommand = PageGroup.addCommand (
          EdLabels.UserAdmin_Save_Command_Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Email_Templates.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Save_Object );
      }
    }
    }//END getProperties_GeneralPageGroup Method

    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="Page">Evado.UniForm.Model.AppData object.</param>
    //  ------------------------------------------------------------------------------
    private void getPropertiesPage_SectionsGroup (
      Evado.UniForm.Model.Page Page )
    {
      this.LogMethod ( "getProperties_SectionsPageGroup" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( );
      Evado.UniForm.Model.Command groupCommand = 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 ( );
      String stFieldList = String.Empty;

      //
      // Define the section properties pageMenuGroup..
      //
      pageGroup = Page.AddGroup (
        EdLabels.Form_Properties_Sections_Group_Title );
      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width;
      pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Vertical_Orientation;

      //
      // Add the new form section object.

      groupCommand = pageGroup.addCommand ( EdLabels.Form_Section_New_Section_Command_Title,
        EuAdapter.ADAPTER_ID,
        EuAdapterClasses.Entity_Layouts.ToString ( ),
        Evado.UniForm.Model.ApplicationMethods.Get_Object );

      groupCommand.AddParameter ( EdRecordSection.FormSectionClassFieldNames.Sectn_No.ToString ( ), "-1" );
      groupCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Form_Properties_Section_Page );
      groupCommand.SetBackgroundDefaultColour ( Evado.UniForm.Model.Background_Colours.Purple );

      this.LogValue ( "No of form sections: " + this.Session.EntityLayout.Design.FormSections.Count );

      //
      // Iterate through the sections.
      //
      foreach ( EdRecordSection formSection in this.Session.EntityLayout.Design.FormSections )
      {
        groupCommand = pageGroup.addCommand ( formSection.LinkText,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entity_Layouts.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Get_Object );

        groupCommand.AddParameter ( EdRecordSection.FormSectionClassFieldNames.Sectn_No.ToString ( ), formSection.No );
        groupCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Form_Properties_Section_Page );
      }

      this.LogValue ( "After No of form sections: " + this.Session.EntityLayout.Design.FormSections.Count );

      this.LogMethodEnd ( "getProperties_SectionsPageGroup" );

    }//END getProperties_SectionsPageGroup Method
示例#4
0
    }//END createViewCommandList method

    // ==============================================================================
    /// <summary>
    /// This method appends the milestone groupCommand to the page milestone list pageMenuGroup
    /// </summary>
    /// <param name="CommandEntity">EvForm object</param>
    /// <param name="PageGroup"> Evado.UniForm.Model.Group</param>
    //  -----------------------------------------------------------------------------
    private Evado.UniForm.Model.Command getGroupListCommand (
      EdRecord CommandEntity,
      Evado.UniForm.Model.Group PageGroup,
      EdRecord.LinkContentSetting ParentLinkSetting )
    {
      this.LogMethod ( "getGroupListCommand" );
      this.LogDebug ( "CommandEntity.EntityId: " + CommandEntity.EntityId );
      this.LogDebug ( "LinkContentSetting: " + CommandEntity.Design.LinkContentSetting );
      this.LogDebug ( "TypeId: " + CommandEntity.TypeId );
      this.LogDebug ( "ParentLinkSetting: " + ParentLinkSetting );

      //
      // Set the link setting.
      //
      if ( CommandEntity.Design.LinkContentSetting == EdRecord.LinkContentSetting.Null
        && ParentLinkSetting != EdRecord.LinkContentSetting.Null )
      {
        CommandEntity.Design.LinkContentSetting = ParentLinkSetting;
      }

      this.LogDebug ( "FINAL: LinkContentSetting: " + CommandEntity.Design.LinkContentSetting );
      this.LogDebug ( "CommandTitle: " + CommandEntity.CommandTitle );
      this.LogDebug ( "getFirstTextField: " + CommandEntity.getFirstTextField ( ) );

      //
      // Define the pageMenuGroup groupCommand.
      //
      Evado.UniForm.Model.Command groupCommand = PageGroup.addCommand (
          CommandEntity.CommandTitle,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities,
          Evado.UniForm.Model.ApplicationMethods.Get_Object );

      groupCommand.Id = CommandEntity.Guid;
      groupCommand.SetGuid ( CommandEntity.Guid );

      groupCommand.AddParameter (
        Evado.UniForm.Model.CommandParameters.Short_Title,
        EdLabels.Label_Record_Id + CommandEntity.RecordId );
      if ( CommandEntity.ImageFileName != String.Empty )
      {
        string relativeURL = EuAdapter.CONST_IMAGE_FILE_DIRECTORY + CommandEntity.ImageFileName;
        groupCommand.AddParameter ( Evado.UniForm.Model.CommandParameters.Image_Url, relativeURL );
      }

      if ( this.Session.UserProfile.hasAdministrationAccess == true )
      {
        groupCommand.Title = CommandEntity.EntityId + " >> " + groupCommand.Title;
      }

      return groupCommand;

    }//END getGroupListCommand method
    }//END getOrganisationSelection method

    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="PageObject">Evado.UniForm.Model.Page object.</param>
    /// <returns>ClientApplicationData object</returns>
    //  ------------------------------------------------------------------------------
    public void getListGroup (
      Evado.UniForm.Model.Page PageObject )
    {
      this.LogMethod ( "getListGroup" );

      // 
      // Create the new pageMenuGroup.
      // 
      Evado.UniForm.Model.Group pageGroup = PageObject.AddGroup (
        EdLabels.Organisation_List_Group_Title );
      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width;
      pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Vertical_Orientation;

      // 
      // Add the save groupCommand
      // 
      Evado.UniForm.Model.Command groupCommand = pageGroup.addCommand (
        EdLabels.Organisation_New_Command_Title,
        EuAdapter.ADAPTER_ID,
        EuAdapterClasses.Organisations.ToString ( ),
        Evado.UniForm.Model.ApplicationMethods.Create_Object );

      // 
      // Define the save and delete groupCommand parameters
      // 
      groupCommand.AddParameter ( EuOrganisations.CONST_NEW_FIELD_ID, "true" );

      groupCommand.SetBackgroundColour (
        Evado.UniForm.Model.CommandParameters.BG_Default,
        Evado.UniForm.Model.Background_Colours.Purple );

      // 
      // generate the page links.
      // 
      foreach ( EdOrganisation organisation in this.Session.AdminOrganisationList )
      {
        // 
        // Add the trial organisation to the list of organisations as a groupCommand.
        // 
        Evado.UniForm.Model.Command command = pageGroup.addCommand (
          organisation.LinkText,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Organisations.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Get_Object );

        command.Id = organisation.Guid;
        command.SetGuid ( organisation.Guid );

      }//END organisation list iteration loop

      this.LogValue ( "pageGroup.CommandList.Count {0}. ", pageGroup.CommandList.Count );

      this.LogMethodEnd ( "getListGroup" );

    }//END getListGroup method.
示例#6
0
    }//END getObject method

    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="ClientDataObject">Evado.UniForm.Model.AppData object.</param>
    /// <returns>ClientApplicationData object</returns>
    //  ------------------------------------------------------------------------------
    private void getDataObject (
      Evado.UniForm.Model.AppData ClientDataObject )
    {
      this.LogMethod ( "getDataObject" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( );
      Evado.UniForm.Model.Field pageField = new Evado.UniForm.Model.Field ( );

      ClientDataObject.Id = this._ApplicationEvent.Guid;
      ClientDataObject.Title = EdLabels.ApplicationEvent_Page_Title;

      ClientDataObject.Page.Id = ClientDataObject.Id;
      ClientDataObject.Page.Title = ClientDataObject.Title;
      ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled;

      //
      // Add the help button if the help url is defined.
      //
      if ( this.AdapterObjects.HelpUrl != String.Empty )
      {
        Evado.UniForm.Model.Command helpCommand = ClientDataObject.Page.addCommand (
         EdLabels.Label_Help_Command_Title,
         EuAdapter.ADAPTER_ID,
         EuAdapterClasses.Events.ToString ( ),
         Evado.UniForm.Model.ApplicationMethods.Get_Object );

        helpCommand.Type = Evado.UniForm.Model.CommandTypes.Http_Link;

        helpCommand.AddParameter ( Evado.UniForm.Model.CommandParameters.Link_Url,
           EvcStatics.createHelpUrl (
            this.AdapterObjects.HelpUrl,
             Evado.Digital.Model.EdStaticPageIds.Application_Event ) );
      }

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

      // 
      // Create the customer id object
      // 
      pageField = pageGroup.createReadOnlyTextField (
        String.Empty,
        EdLabels.ApplicationEvent_Date_Time_Field_Label,
        this._ApplicationEvent.DateTime.ToString ( "dd MMM yyyy HH:mm:ss" ) );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the event id object
      // {
      if ( this._ApplicationEvent.EventId == 0
        || this._ApplicationEvent.EventId == 1 )
      {
        this._ApplicationEvent.EventId = (int) EvEventCodes.Ok;
      }

      EvEventCodes code = (EvEventCodes) this._ApplicationEvent.EventId;

      String content = this._ApplicationEvent.EventId.ToString ( "000000" )
        + " > " +
         Evado.Model.EvStatics.enumValueToString ( code );

      pageField = pageGroup.createReadOnlyTextField (
        String.Empty,
        EdLabels.ApplicationEvent_Event_Id_Field_Label,
        content );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the type id object
      // 
      pageField = pageGroup.createReadOnlyTextField (
        String.Empty,
        EdLabels.ApplicationEvent_Type_Field_Label,
         Evado.Model.EvStatics.enumValueToString ( this._ApplicationEvent.Type ) );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the Category id object
      // 
      pageField = pageGroup.createReadOnlyTextField (
        String.Empty,
        EdLabels.ApplicationEvent_Category_Field_Label,
        this._ApplicationEvent.Category );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the description object
      // 
      pageField = pageGroup.createFreeTextField (
        String.Empty,
        EdLabels.ApplicationEvent_Description_Field_Label,
        this._ApplicationEvent.Description,
        80,
        40 );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the user object
      // 
      pageField = pageGroup.createReadOnlyTextField (
        String.Empty,
        EdLabels.ApplicationEvent_UserName_Field_Label,
        this._ApplicationEvent.UserId );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

    }//END Method
    }//END method

    // =====================================================================================
    /// <summary>
    /// This method generates the commands associated with the selected menu item.
    /// </summary>
    /// <param name="PageId">String: page identifier</param>
    /// <param name="Title">String: command  title</param>
    /// <returns>Evado.UniForm.Model.Command object.</returns>
    //  ------------------------------------------------------------------------------------
    public Evado.UniForm.Model.Command GetNavigationCommand ( 
      String PageId, 
      String Title,
      String Parameters)
    {
      this.resetAdapterLog ( );
      this.LogMethod ( "getMenuCommandObject" );
      this.LogDebug ( "PageId: {0}, Title: {1}.", PageId, Title );
      //
      // Initialise the methods variables and objects.
      //
      Evado.Digital.Model.EdStaticPageIds pageId = Evado.Digital.Model.EdStaticPageIds.Null;
      Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( );

      //
      // process static page identifeirs to create their commands.
      //
      if ( EvStatics.tryParseEnumValue<Evado.Digital.Model.EdStaticPageIds> ( PageId, out pageId ) == true )
      {
        #region Admin menu items

        //
        // Administration page commands
        //
        switch ( pageId )
        {
          case Evado.Digital.Model.EdStaticPageIds.Application_Profile:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Application_Properties.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Database_Version:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Application_Properties.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Database_Version );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Email_Templates_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Email_Templates.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Application_Event_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Events.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Application_Event:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Events.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              // 
              // Add the groupCommand parameters.
              // 
              pageCommand.SetGuid (
                this.Session.MenuItem.Guid );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Organisation_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Organisations.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Organisation_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Organisations.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              // 
              // Add the groupCommand parameters.
              // 
              pageCommand.SetGuid ( this.Session.MenuItem.Guid );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.User_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Users.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.My_User_Profile_Update_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Users.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
          case Evado.Digital.Model.EdStaticPageIds.Email_User_Page:
            {
              string [] arParameters = Parameters.Split ( ';' );

              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Users.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              foreach ( string parm in arParameters )
              {
                if ( parm.Contains ( "=" ) == false )
                {
                  continue;
                }
                String [] arParm = parm.Split ( '=' );

                pageCommand.AddParameter ( arParm [ 0 ], arParm [ 1 ] );
              }

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Menu_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Menu.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

        }//END  admin page switch statement

        //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        #endregion

        #region applilcation configuration
        //
        // Project configuration menu commands.
        //
        switch ( pageId )
        {
          case Evado.Digital.Model.EdStaticPageIds.Alert_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
               Title,
               EuAdapter.ADAPTER_ID,
               EuAdapterClasses.Alert.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Binary_File_List_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Binary_File.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Page_Layout_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Page_Layouts.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Page_Layout_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Page_Layouts.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Selection_List_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Selection_Lists.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Selection_List_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Selection_Lists.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }


          case Evado.Digital.Model.EdStaticPageIds.Record_Layout_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Record_Layouts.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Entity_Layout_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Entity_Layouts.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
        }//END  admin page switch statement

        //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        #endregion

        #region  analysis and reporting menu items.
        //
        // Project analysis and reporting menu commands.
        //
        switch ( pageId )
        {
          case Evado.Digital.Model.EdStaticPageIds.Data_Charting_Page:
            {
              this.LogValue ( PageId + " ADDED" );
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Analysis.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
          case Evado.Digital.Model.EdStaticPageIds.Record_Query_Page:
            {
              this.LogValue ( PageId + " ADDED" );
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Analysis.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
          case Evado.Digital.Model.EdStaticPageIds.Audit_Configuration_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Application_Properties.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
          case Evado.Digital.Model.EdStaticPageIds.Audit_Records_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Application_Properties.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
          case Evado.Digital.Model.EdStaticPageIds.Audit_Record_Items_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Application_Properties.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
        }

        //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        #endregion

        #region reporting menu items.
        //
        // Project analysis and reporting menu commands.
        //
        switch ( pageId )
        {
          case Evado.Digital.Model.EdStaticPageIds.Report_Template_View:
            {
              this.LogValue ( PageId + " ADDED" );
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.ReportTemplates.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
          case Evado.Digital.Model.EdStaticPageIds.Report_Template_Page:
            {
              this.LogValue ( PageId + " ADDED" );
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.ReportTemplates.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
          case Evado.Digital.Model.EdStaticPageIds.Operational_Report_List:
            {
              this.LogValue ( PageId + " ADDED" );
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Reports.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Operational_Report_Page:
            {
              this.LogValue ( PageId + " ADDED" );
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Reports.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }
        }//END switch statement

        //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        #endregion

        #region record menu items.
        //
        // Project records menu commands.
        //
        switch ( pageId )
        {

          //  ------------------------------------------------------------------------------
          // milestone ancillary records pages.
          // 
          case Evado.Digital.Model.EdStaticPageIds.Ancillary_Record_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Ancillary_Record.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Records_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Records.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Record_Export_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Records.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Record_Admin_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Records.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }


          case Evado.Digital.Model.EdStaticPageIds.Record_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Records.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              pageCommand.SetGuid ( this.Session.Record.Guid );

              if ( this.Session.Entity != null )
              {
                pageCommand.AddParameter ( EdRecord.FieldNames.TypeId,
                  this.Session.Entity.TypeId );
              }
              return pageCommand;
            }

          //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        #endregion

        #region Entity commands
          //
          // Entitity menu commands
          //
          case Evado.Digital.Model.EdStaticPageIds.Entity_View:
          case Evado.Digital.Model.EdStaticPageIds.Entity_Filter_View:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Entities.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Entity_Export_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Entities.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Entity_Admin_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Entities.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

              pageCommand.SetPageId ( PageId );

              return pageCommand;
            }

          case Evado.Digital.Model.EdStaticPageIds.Entity_Page:
            {
              pageCommand = new Evado.UniForm.Model.Command (
                Title,
                EuAdapter.ADAPTER_ID,
                EuAdapterClasses.Entities.ToString ( ),
                Evado.UniForm.Model.ApplicationMethods.Get_Object );

              pageCommand.SetPageId ( PageId );

              pageCommand.SetGuid ( this.Session.Entity.Guid );

              if ( this.Session.Entity != null )
              {
                pageCommand.AddParameter ( EdRecord.FieldNames.TypeId,
                  this.Session.Entity.TypeId );
              }
              return pageCommand;
            }

        }//END switch
        //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        #endregion

      }//END Static page ids.

      //
      // Create the command to to display a page layout..
      //
      if ( PageId.Contains ( EuAdapter.CONST_PAGE_ID_PREFIX ) == true )
      {
        string stPageId = PageId.Replace ( EuAdapter.CONST_PAGE_ID_PREFIX, String.Empty );

        this.LogDebug ( "PAGE: PageId: {0}, Title: {1} StPageId: {2}.", PageId, Title, stPageId );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Page.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

        pageCommand.SetPageId ( stPageId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );

        return pageCommand;
      }

      //
      // Create the command to query Entities as a filtered list  
      // i.e. retrieves an organisation's child entity layout.
      //
      if ( PageId.Contains ( EuAdapter.CONST_AUTHOR_PAGE_ID_SUFFIX ) == true )
      {

        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PREFIX, String.Empty );
        layoutId = layoutId.Replace ( EuAdapter.CONST_AUTHOR_PAGE_ID_SUFFIX, String.Empty );

        this.LogDebug ( "AUTHOR: PageId: {0}, Title: {1} Layout: {2}, Author Query.", PageId, Title, layoutId );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

        pageCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Entity_View );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Author, this.Session.UserProfile.UserId );
        pageCommand.AddParameter ( EdRecord.FieldNames.ParentUserId, this.Session.UserProfile.UserId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );
        pageCommand.AddParameter ( EuEntities.CONST_AUTHOR_SELECTION, "Yes" );
        
        return pageCommand;
      }

      //
      // Create the command to query Entities as a filtered list  
      // i.e. retrieves an organisation's child entity layout.
      //
      if ( PageId.Contains ( EuAdapter.CONST_ENTITY_FILTERED_LIST_SUFFIX ) == true )
      {

        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PREFIX, String.Empty );
        layoutId = layoutId.Replace ( EuAdapter.CONST_ENTITY_FILTERED_LIST_SUFFIX, String.Empty );

        this.LogDebug ( "FILTERED: PageId: {0}, Title: {1} Layout: {2}, Filtered Query.", PageId, Title, layoutId );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

        pageCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Entity_Filter_View );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter ( EuEntities.CONST_EMPTY_SELECTION_FIELD, "Yes" ); 

        return pageCommand;
      }

      //
      // Create the command to access a Entity by its organisation parent's identifier.  
      // i.e. retrieves an organisation's child entity layout.
      //
      if ( PageId.Contains ( EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX2 ) == true )
      {
        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PREFIX, String.Empty );

        this.LogDebug ( "1 layoutId: {0}.", layoutId );

        layoutId = layoutId.Replace ( EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX2, String.Empty );

        this.LogDebug ( "2 Template: {0}.", EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX2 );
        this.LogDebug ( "2 layoutId: {0}.", layoutId );

        this.LogDebug ( "ORG: PageId: {0}, Title: {1} Layout: {2}, Org Parent.", PageId, Title, layoutId );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Get_Object );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentOrgId,
          this.Session.Organisation.OrgId );

        this.LogDebug ( "Command Method: {0}.", pageCommand.Method );

        return pageCommand;
      }

      //
      // Create the command to access a Entity by its organisation parent's identifier.  
      // i.e. retrieves an organisation's child entity layout.
      //
      if ( PageId.Contains ( EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX ) == true )
      {
        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PREFIX, String.Empty );

        this.LogDebug ( "1 layoutId: {0}.", layoutId );

        layoutId = layoutId.Replace ( EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX, String.Empty );

        this.LogDebug ( "2 Template: {0}.", EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX );
        this.LogDebug ( "2 layoutId: {0}.", layoutId );

        this.LogDebug ( "ORG: PageId: {0}, Title: {1} Layout: {2}, Org Parent.", PageId, Title, layoutId );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentOrgId,
          this.Session.Organisation.OrgId );

        return pageCommand;
      }

      //
      // Create the command to access a Entity by its user parent's identifier.  
      // i.e. retrieves an user's child entity layout.
      //
      else if ( PageId.Contains ( EuAdapter.CONST_USER_PARENT_PAGE_ID_SUFFIX2 ) == true )
      {
        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PREFIX, String.Empty );

        this.LogDebug ( "1 layoutId: {0}.", layoutId );
        layoutId = layoutId.Replace ( EuAdapter.CONST_USER_PARENT_PAGE_ID_SUFFIX2, String.Empty );

        this.LogDebug ( "2 layoutId: {0}.", layoutId );

        this.LogDebug ( "DEF USR: PageId: {0}, Title: {1} Layout: {2}, User  Parent.", PageId, Title, layoutId );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Get_Object );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentUserId,
          this.Session.UserProfile.UserId );

        return pageCommand;
      }

      //
      // Create the command to access a Entity by its user parent's identifier.  
      // i.e. retrieves an user's child entity layout.
      //
      else if ( PageId.Contains ( EuAdapter.CONST_USER_PARENT_PAGE_ID_SUFFIX ) == true )
      {
        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PREFIX, String.Empty );
        layoutId = layoutId.Replace ( EuAdapter.CONST_USER_PARENT_PAGE_ID_SUFFIX, String.Empty );

        this.LogDebug ( "USER: PageId: {0}, Title: {1} Layout: {2}, User  Parent.", PageId, Title, layoutId );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentUserId,
          this.Session.UserProfile.UserId );

        return pageCommand;
      }

      //
      // Create the command to access a Entity by its Entity parent.  
      // i.e. retrieves an Entity's child records layout.
      //
      else if ( PageId.Contains ( EuAdapter.CONST_ENTITY_PARENT_PAGE_ID_SUFFIX ) == true )
      {
        this.LogDebug ( "A PageId: {0}, Title: {1} Entity Parent.", PageId, Title ); 

        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PARENT_PAGE_ID_SUFFIX, String.Empty );

        this.LogDebug ( "1 layoutId: {0}.", layoutId );

        layoutId = layoutId.Replace ( EuAdapter.CONST_ENTITY_PREFIX, String.Empty );

        this.LogDebug ( "2 layoutId: {0}.", layoutId );

        this.LogDebug ( "PARENT: PageId: {0}, Title: {1} Layout: {2}, User  Parent.", PageId, Title, layoutId );
        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentGuid,
          this.Session.Entity.Guid );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentLayoutId,
          this.Session.Entity.LayoutId ); 

        return pageCommand;
      }

      //
      // Create the command to access a Entity by its Entity parent.  
      // i.e. retrieves an Entity's child records layout.
      //
      else if ( PageId.Contains ( EuAdapter.CONST_ENTITY_PARENT_PAGE_ID_SUFFIX ) == true )
      {
        this.LogDebug ( "A PageId: {0}, Title: {1} Entity Parent.", PageId, Title );

        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PARENT_PAGE_ID_SUFFIX, String.Empty );

        this.LogDebug ( "1 layoutId: {0}.", layoutId );

        layoutId = layoutId.Replace ( EuAdapter.CONST_ENTITY_PREFIX, String.Empty );

        this.LogDebug ( "2 layoutId: {0}.", layoutId );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentGuid,
          this.Session.Entity.Guid );

        return pageCommand;
      }
      //
      // Create the command to access Entities by their layout identifers.
      //
      else if ( PageId.Contains ( EuAdapter.CONST_ENTITY_PREFIX ) == true )
      {
        this.LogDebug ( "PageId: {0}, Title: {1} Layout.", PageId, Title ); 
        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PREFIX, String.Empty );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );

        return pageCommand;

      }

      //
      // Create the command to access records by their layout identifers.
      //
      if ( PageId.Contains ( EuAdapter.CONST_RECORD_PREFIX) == true )
      {
        string layoutId = PageId.Replace ( EuAdapter.CONST_RECORD_PREFIX, String.Empty );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Get_Object );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );

        return pageCommand;

      }
      //
      // Create the command to access a record by its organisation parent's identifier.  
      // i.e. retrieves an organisation's child entity layout.
      //
      else if ( PageId.Contains ( EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX ) == true )
      {
        string layoutId = PageId.Replace ( EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX, String.Empty );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Records.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Get_Object );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentOrgId,
          this.Session.Organisation.OrgId );

        return pageCommand;
      }

      //
      // Create the command to access a record by its user parent's identifier.  
      // i.e. retrieves an user's child entity layout.
      //
      else if ( PageId.Contains ( EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX ) == true )
      {
        string layoutId = PageId.Replace ( EuAdapter.CONST_ORG_PARENT_PAGE_ID_SUFFIX, String.Empty );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Records.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.Get_Object );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentUserId,
          this.Session.UserProfile.UserId );

        return pageCommand;
      }

      //
      // Create the command to access a record by its Entity parent.  
      // i.e. retrieves an Entity's child records layout.
      //
      else if ( PageId.Contains ( EuAdapter.CONST_ENTITY_PARENT_PAGE_ID_SUFFIX ) == true )
      {
        string layoutId = PageId.Replace ( EuAdapter.CONST_ENTITY_PARENT_PAGE_ID_SUFFIX, String.Empty );

        pageCommand = new Evado.UniForm.Model.Command (
          Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Records.ToString ( ),
          Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

        pageCommand.SetPageId ( PageId );
        pageCommand.AddParameter ( EdRecord.FieldNames.Layout_Id, layoutId );
        pageCommand.AddParameter ( EuEntities.CONST_HIDE_SELECTION, "Yes" );
        pageCommand.AddParameter (
          EdRecord.FieldNames.ParentGuid,
          this.Session.Entity.Guid );

        return pageCommand;
      }

      return null;

    }//END convertMenuItem method
示例#8
0
    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="ClientDataObject">Evado.UniForm.Model.AppData object.</param>
    /// <returns>ClientApplicationData object</returns>
    //  ------------------------------------------------------------------------------
    private void getClientData (
      Evado.UniForm.Model.AppData ClientDataObject )
    {
      this.LogMethod ( "getDataObject" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Command pageCommand = new Evado.UniForm.Model.Command ( );
      Evado.UniForm.Model.Field pageField = new Evado.UniForm.Model.Field ( );
      List<EvOption> optionList = new List<EvOption> ( );
      EvOption option = new EvOption ( );

      ClientDataObject.Id = this.Session.MenuItem.Guid;
      ClientDataObject.Title = EdLabels.Menu_Item;

      ClientDataObject.Page.Id = ClientDataObject.Id;
      ClientDataObject.Page.Title = ClientDataObject.Title;
      ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled;

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

      //
      // Add the platform selection list
      //

      optionList.Add ( new EvOption (
        EuMenus.CONST_ADMIN_APPLICATION_IDENTIFIER,
        EdLabels.Menu_Admin_Platform_Option_Description ) );

      optionList.Add ( new EvOption (
        EuMenus.CONST_PRODUCTION_APPLICATION_IDENTIFIER,
        EdLabels.Menu_Production_Platform_Option_Description ) );

      pageField = pageGroup.createSelectionListField (
        String.Empty,
        EdLabels.Menu_Platform_Field_Label,
        this.Session.MenuPlatformId,
        optionList );
      pageField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled;

      // 
      // Create the customer id object
      // 
      optionList = this.AdapterObjects.PageIdentifiers;

      Evado.Digital.Model.EvcStatics.sortOptionListValues ( optionList );

      pageField = pageGroup.createSelectionListField (
        EvMenuItem.MenuFieldNames.Page_Id.ToString ( ),
        EdLabels.Menu_Page_Id_Field_Label,
        this.Session.MenuItem.PageId.ToString ( ),
        optionList );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the customer name object
      // 
      pageField = pageGroup.createTextField (
        EvMenuItem.MenuFieldNames.Title.ToString ( ),
        EdLabels.Menu_Title_Field_Label,
        String.Empty,
        this.Session.MenuItem.Title,
        20 );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the customer name object
      // 
      pageField = pageGroup.createNumericField (
        EvMenuItem.MenuFieldNames.Order.ToString ( ),
        EdLabels.Menu_Order_Field_Label,
        this.Session.MenuItem.Order,
        0,
        200 );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Create the customer name object
      // 
      optionList = this.AdapterObjects.Settings.GetRoleOptionList ( false );
      string roles = this.Session.MenuItem.RoleList;

      pageField = pageGroup.createCheckBoxListField (
        EvMenuItem.MenuFieldNames.Role_List.ToString ( ),
        EdLabels.Menu_Role_List_Field_Label,
        roles,
        optionList );

      pageField.Layout = EuAdapter.DefaultFieldLayout;

      pageField.Description = EdLabels.Menu_Role_List_Field_Description;

      // 
      // Create the customer name object
      // 
      pageField = pageGroup.createTextField (
        EvMenuItem.MenuFieldNames.Parameters.ToString ( ),
        EdLabels.Menu_Parameters_Field_Label,
        String.Empty,
        this.Session.MenuItem.Parameters,
        20 );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Add the save groupCommand
      // 
      pageCommand = pageGroup.addCommand (
        EdLabels.Menu_Save_Command_Title,
        EuAdapter.ADAPTER_ID,
        EuAdapterClasses.Menu.ToString ( ),
        Evado.UniForm.Model.ApplicationMethods.Save_Object );

      // 
      // Define the save and delete groupCommand parameters
      // 
      pageCommand.SetGuid ( ClientDataObject.Id );

      //
      // Add the delete groupCommand object.
      //
      pageCommand = pageGroup.addCommand (
         EdLabels.Menu_Delete_Command_Title,
         EuAdapter.ADAPTER_ID,
         EuAdapterClasses.Menu.ToString ( ),
         Evado.UniForm.Model.ApplicationMethods.Save_Object );

      // 
      // Define the save and delete groupCommand parameters
      // 
      pageCommand.SetGuid ( ClientDataObject.Id );

      pageCommand.AddParameter ( Evado.Digital.Model.EvcStatics.CONST_SAVE_ACTION, EuMenus.CONST_DELETE_ACTION );

    }//END Method
示例#9
0
    }//END executeRecordQuery method.

    // ==============================================================================
    /// <summary>
    /// This method creates the record view pageMenuGroup containing a list of commands to 
    /// open the form record.
    /// </summary>
    /// <param name="PageObject">Evado.Model.Uniform.Page object to add the pageMenuGroup to.</param>
    /// <param name="RecordList">List of EvForm: form record objects.</param>
    //  ------------------------------------------------------------------------------
    private void getEntity_ListGroup (
      Evado.UniForm.Model.Page PageObject )
    {
      this.LogMethod ( "getEntity_ListGroup" );
      this.LogDebug ( "PageObject.EditAccess {0}.", PageObject.EditAccess );
      this.LogDebug ( "this.Session.EntityLayout.Title {0}.", this.Session.EntityLayout.Title );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( );
      Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( );

      // 
      // Create the record display pageMenuGroup.
      // 
      pageGroup = PageObject.AddGroup (
        EdLabels.Entity_List_Group_Title );
      pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Vertical_Orientation;

      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width;

      if ( this.Session.EntityLayout.Title != String.Empty )
      {
        pageGroup.Title = String.Format (
          EdLabels.Entity_List_Title_Group_Title,
          this.Session.EntityLayout.Title );
      }

      if ( this.Session.EntityList.Count > 0 )
      {
        pageGroup.Title += EdLabels.List_Count_Label + this.Session.EntityList.Count;
      }

      //
      // Add a create record command.
      //
      if ( this.Session.Selected_EntityLayoutId != String.Empty
        && this.Session.PageId != Evado.Digital.Model.EdStaticPageIds.Entity_Filter_View.ToString ( )
        && pageGroup.EditAccess == Evado.UniForm.Model.EditAccess.Enabled
        && ( this.Session.EntityLayout.Design.ParentEntities.Contains ( this.ParentLayoutId ) == true
          || this.Session.EntityLayout.Design.ParentEntities == String.Empty ) )
      {
        groupCommand = pageGroup.addCommand (
          String.Format ( EdLabels.Entity_Create_New_List_Command_Title, this.Session.EntityLayout.Title ),
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities,
          Evado.UniForm.Model.ApplicationMethods.Create_Object );

        groupCommand.SetBackgroundDefaultColour ( Evado.UniForm.Model.Background_Colours.Purple );

        groupCommand.AddParameter ( Evado.Digital.Model.EdRecord.FieldNames.Layout_Id,
        this.Session.Selected_EntityLayoutId );
        groupCommand.AddParameter ( EdRecord.FieldNames.ParentGuid, this.Session.Entity.Guid );
        groupCommand.SetGuid ( this.Session.Entity.Guid );
      }

      this.LogDebug ( "EntityList.Count: " + this.Session.EntityList.Count );
      // 
      // Iterate through the record list generating a groupCommand to access each record
      // then append the groupCommand to the record pageMenuGroup view's groupCommand list.
      // 
      foreach ( Evado.Digital.Model.EdRecord entity in this.Session.EntityList )
      {
        this.LogDebug ( "LCD {0}, LT {1}, FC {2}", entity.Design.LinkContentSetting, entity.CommandTitle, entity.Fields.Count );

        //
        // Create the group list groupCommand object.
        //
        this.getGroupListCommand (
          entity,
          pageGroup,
         this.Session.EntityLayout.Design.LinkContentSetting );

      }//END iteration loop

      this.LogValue ( "Group command count: " + pageGroup.CommandList.Count );

      this.LogMethodEnd ( "getRecord_ListGroup" );
    }//END createViewCommandList method
    }//END getEntity_Summary_ListGroup method

    // ==============================================================================
    /// <summary>
    /// This method appends the milestone groupCommand to the page milestone list pageMenuGroup
    /// </summary>
    /// <param name="Entity">EvForm object</param>
    /// <param name="PageGroup"> Evado.UniForm.Model.Group</param>
    //  -----------------------------------------------------------------------------
    private void getGroupSummaryListGroup (
      EdRecord Entity,
      Evado.UniForm.Model.Page PageObject )
    {
      this.LogMethod ( "getGroupSummaryListGroup" );
      this.LogDebug ( "Entity.EntityId: " + Entity.EntityId );
      this.LogDebug ( "LinkContentSetting: " + Entity.Design.LinkContentSetting );
      this.LogDebug ( "DefaultPageLayout: " + Entity.Design.DefaultPageLayout );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( );
      Evado.UniForm.Model.Field groupField = new Evado.UniForm.Model.Field ( );
      Evado.UniForm.Model.Command groupCommand = new Evado.UniForm.Model.Command ( );


      // 
      // Create the record display pageMenuGroup.
      // 
      pageGroup = PageObject.AddGroup ( String.Empty );
      pageGroup.CmdLayout = Evado.UniForm.Model.GroupCommandListLayouts.Horizontal_Orientation;
      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Dynamic;
      pageGroup.AddParameter ( Evado.UniForm.Model.GroupParameterList.Percent_Width, 25 );

      foreach ( EdRecordField field in Entity.Fields )
      {
        this.LogDebug ( "fid {0} - {1} V: {2}. ", field.FieldId, field.TypeId, field.ItemValue );

        if ( field.Design.IsSummaryField == false
          && field.TypeId != EvDataTypes.Image
          && field.TypeId != EvDataTypes.Text
          && field.TypeId != EvDataTypes.Numeric
          && field.TypeId != EvDataTypes.Telephone_Number
          && field.TypeId != EvDataTypes.Selection_List
          && field.TypeId != EvDataTypes.Radio_Button_List
          && field.TypeId != EvDataTypes.Check_Box_List
          && field.TypeId != EvDataTypes.External_Selection_List
          && field.TypeId != EvDataTypes.External_RadioButton_List
          && field.TypeId != EvDataTypes.External_CheckBox_List )
        {
          continue;
        }

        //
        // skip all empty items.
        //
        if ( field.ItemValue == String.Empty
          || field.ItemValue.Contains ( "E+37" ) == true
          || field.ItemValue.Contains ( "E-35" ) == true )
        {
          continue;
        }


        this.LogDebug ( "FieldId {0}, value {1} ", field.FieldId, field.ItemValue );

        //
        // Define the layout.
        //
        Evado.UniForm.Model.FieldLayoutCodes layout = Evado.UniForm.Model.FieldLayoutCodes.Left_Justified;

        switch ( field.TypeId )
        {
          case EvDataTypes.Image:
            {
              groupField = pageGroup.createImageField (
                String.Empty,
                field.Title,
                field.ItemValue, 125, 0 );
              groupField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled;
              groupField.Layout = layout;

              continue;
            }
          case EvDataTypes.Selection_List:
          case EvDataTypes.Check_Box_List:
          case EvDataTypes.Radio_Button_List:
          case EvDataTypes.Horizontal_Radio_Buttons:
          case EvDataTypes.External_Selection_List:
          case EvDataTypes.External_RadioButton_List:
          case EvDataTypes.External_CheckBox_List:
            {
              var value = this.getSelectionDescription ( field, field.ItemValue );

              groupField = pageGroup.createReadOnlyTextField (
                String.Empty,
                field.Title,
                value );
              groupField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled;
              groupField.Layout = layout;

              continue;
            }

          default:
            {


              groupField = pageGroup.createReadOnlyTextField (
                String.Empty,
                field.Title,
                field.ItemValue );
              groupField.EditAccess = Evado.UniForm.Model.EditAccess.Disabled;
              groupField.Layout = layout;
              continue;
            }
        }//END type switch statement.
      }//END field iteration loop

      //
      // Define the pageMenuGroup groupCommand.
      //
      groupCommand = pageGroup.addCommand (
          Entity.Title,
          EuAdapter.ADAPTER_ID,
          EuAdapterClasses.Entities,
          Evado.UniForm.Model.ApplicationMethods.Get_Object );

      groupCommand.Id = Entity.Guid;
      groupCommand.SetGuid ( Entity.Guid );

      //
      // Define the link groupCommand.
      //
      EdRecordField commandField = Entity.getFirstHttpLinkField ( );

      if ( commandField != null )
      {
        this.LogDebug ( "FieldId {0}, value {1} ", commandField.FieldId, commandField.ItemValue );

        if ( commandField.ItemValue != String.Empty )
        {
          string title = commandField.Title;
          string url = commandField.ItemValue;

          if ( url.Contains ( "^" ) == true )
          {
            string [ ] arValue = commandField.ItemValue.Split ( '^' );

            url = arValue [ 0 ];
            title = arValue [ 1 ];
          }

          groupCommand = pageGroup.addCommand (
              title,
              EuAdapter.ADAPTER_ID,
              EuAdapterClasses.Entities,
              Evado.UniForm.Model.ApplicationMethods.Get_Object );
          groupCommand.Type = Evado.UniForm.Model.CommandTypes.Http_Link;

          groupCommand.AddParameter ( Evado.UniForm.Model.CommandParameters.Link_Url, url );
        }
      }

      this.LogMethodEnd ( "getGroupSummaryListGroup" );

    }//END getGroupListCommand method
    }//END getFormPropertiesObject method

    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="ClientDataObject">Evado.UniForm.Model.AppData object.</param>
    //  ------------------------------------------------------------------------------
    private void getPropertiesSectionDataObject (
      Evado.UniForm.Model.AppData ClientDataObject )
    {
      this.LogMethod ( "getPropertiesSectionDataObject" );
      this.LogDebug ( "FormSection.No: " + this.Session.FormSection.No );
      this.LogDebug ( "FormSection.Title: " + this.Session.FormSection.Title );
      this.LogDebug ( "FormSection.DisplayRoles: " + this.Session.FormSection.ReadAccessRoles );
      this.LogDebug ( "FormSection.EditRoles: " + this.Session.FormSection.EditAccessRoles );
      this.LogDebug ( "HasConfigrationEditAccess: " + this.Session.UserProfile.hasManagementAccess );
      // 
      // 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 pageField = new Evado.UniForm.Model.Field ( );
      Evado.UniForm.Model.Parameter parameter = new Evado.UniForm.Model.Parameter ( );
      List<EvOption> optionList = new List<EvOption> ( );
      optionList.Add ( new EvOption ( ) );

      foreach ( EdRecordField field in this.Session.EntityLayout.Fields )
      {
        optionList.Add ( new EvOption (
          field.FieldId,
          field.FieldId
          + EdLabels.Space_Hypen
          + field.Title ) );
      }

      // 
      // Initialise the client ResultData object.
      // 
      if ( this.Session.EntityLayout.Guid != Guid.Empty )
      {
        ClientDataObject.Id = Guid.NewGuid ( );
        ClientDataObject.Title =
          String.Format (
          EdLabels.FormProperties_Section_Page_Title,
          this.Session.EntityLayout.LayoutId,
          this.Session.EntityLayout.Title,
          this.Session.FormSection.LinkText );
        ClientDataObject.Page.Id = ClientDataObject.Id;
        ClientDataObject.Page.PageDataGuid = ClientDataObject.Id;
        ClientDataObject.Page.PageId = this.Session.EntityLayout.LayoutId;
      }
      else
      {
        ClientDataObject.Id = Guid.NewGuid ( );
        ClientDataObject.Title = EdLabels.Form_Page_New_Form_Title;
        ClientDataObject.Page.Id = ClientDataObject.Id;
        ClientDataObject.Page.PageDataGuid = ClientDataObject.Id;
      }
      ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled;

      if ( this.Session.UserProfile.hasManagementAccess == true )
      {
        ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled;
      }

      if ( this.Session.EntityLayout.State != EdRecordObjectStates.Form_Issued
        && this.Session.EntityLayout.State != EdRecordObjectStates.Withdrawn )
      {
        ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Disabled;
      }

      //
      // Set the user's edit access if they have configuration edit access.
      //


      if ( this.Session.UserProfile.hasManagementAccess == true )
      {
        ClientDataObject.Page.EditAccess = Evado.UniForm.Model.EditAccess.Enabled;
      }

      pageGroup = ClientDataObject.Page.AddGroup (
        EdLabels.FormProperties_Section_Group_Text,
        Evado.UniForm.Model.EditAccess.Inherited );
      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width;

      //
      // Form No
      //
      pageField = pageGroup.createTextField (
        EdRecordSection.FormSectionClassFieldNames.Sectn_No.ToString ( ),
        EdLabels.Form_Section_No_Field_Label,
        this.Session.FormSection.No.ToString ( ),
        50 );
      pageField.Layout = EuAdapter.DefaultFieldLayout;
      pageField.EditAccess = Evado.UniForm.Model.EditAccess.Enabled;

      //
      // Form title
      //
      pageField = pageGroup.createTextField (
        EdRecordSection.FormSectionClassFieldNames.Sectn_Title.ToString ( ),
        EdLabels.Form_Section_Title_Field_Label,
        this.Session.FormSection.Title,
        50 );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Form Instructions
      //
      pageField = pageGroup.createFreeTextField (
        EdRecordSection.FormSectionClassFieldNames.Sectn_Instructions.ToString ( ),
        EdLabels.Form_Section_Instructions_Field_Label,
        EdLabels.Form_Section_Instructions_Field_Description,
        this.Session.FormSection.Instructions,
        90, 5 );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      optionList = new List<EvOption> ( );

      this.LogDebug ( "FormSection.Order: " + this.Session.FormSection.Order );
      foreach ( EdRecordSection section in this.Session.EntityLayout.Design.FormSections )
      {
        if ( section.Order < this.Session.FormSection.Order )
        {
          this.LogDebug ( "secttion.Order: " + section.Order + " BEFORE SECTION" );

          var value = String.Format ( EdLabels.Form_Section_Order_Before_Text, section.Title );
          optionList.Add ( new EvOption ( ( section.Order - 1 ).ToString ( ), value ) );
        }
        if ( section.Order == this.Session.FormSection.Order )
        {
          this.LogDebug ( "secttion.Order: " + section.Order + " CURRENT" );
          optionList.Add ( new EvOption (
            this.Session.FormSection.Order.ToString ( ),
            this.Session.FormSection.Title ) );
        }
        if ( section.Order > this.Session.FormSection.Order )
        {
          this.LogDebug ( "secttion.Order: " + section.Order + " AFTER SECTION" );
          var value = String.Format ( EdLabels.Form_Section_Order_After_Text, section.Title );
          optionList.Add ( new EvOption ( ( section.Order + 1 ).ToString ( ), value ) );
        }
      }

      //
      // The form section order 
      //
      pageField = pageGroup.createSelectionListField (
        EdRecordSection.FormSectionClassFieldNames.Sectn_Order.ToString ( ),
        EdLabels.Form_Section_Order_Field_Label,
        this.Session.FormSection.Order.ToString ( ),
        optionList );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      /*
      //
      // The form section field id 
      //
      pageField = pageGroup.createSelectionListField (
        EvFormSection.FormSectionClassFieldNames.Sectn_Field_Id.ToString ( ),
        EdLabels.Form_Section_Field_ID_Field_Label,
        this.SessionObjects.FormSection.FieldId,
        optionList );
      pageField.Layout = EuPageGenerator.ApplicationFieldLayout;

      //
      // Form Field value
      //
      pageField = pageGroup.createTextField (
        EvFormSection.FormSectionClassFieldNames.Sectn_Field_Value.ToString ( ),
        EdLabels.Form_Section_Field_Value_Field_Label,
        this.SessionObjects.FormSection.FieldValue,
        50 );
      pageField.Layout = EuPageGenerator.ApplicationFieldLayout;
      pageField.EditAccess = Evado.UniForm.Model.EditAccess.Inherited;

      //
      // form secton on open display section.
      //
      pageField = pageGroup.createBooleanField (
        EvFormSection.FormSectionClassFieldNames.Sectn_On_Open_Visible.ToString ( ),
        EdLabels.Form_Section_Visible_On_Open_Field_Label,
        this.SessionObjects.FormSection.OnOpenVisible );
      pageField.Layout = EuPageGenerator.ApplicationFieldLayout;

      //
      // Form on field value match display field field
      //
      pageField = pageGroup.createBooleanField (
        EvFormSection.FormSectionClassFieldNames.Sectn_On_Match_Visible.ToString ( ),
        EdLabels.Form_Section_Visible_Field_Value_Matches_Field_Label,
        this.SessionObjects.FormSection.OnMatchVisible );
      pageField.Layout = EuPageGenerator.ApplicationFieldLayout;
      */
      //
      // get the list of display roles.
      //
      optionList = new List<EvOption> ( );

      optionList = this.AdapterObjects.Settings.GetRoleOptionList ( false );

      //
      // The form section user display roles 
      //
      pageField = pageGroup.createCheckBoxListField (
        EdRecordSection.FormSectionClassFieldNames.Sectn_Display_Roles.ToString ( ),
        EdLabels.Form_Section_User_Display_Roles_Field_Label,
        EdLabels.Form_Section_User_Display_Roles_Field_Description,
        this.Session.FormSection.ReadAccessRoles,
        optionList );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // get the list of edit roles.
      //
      pageField = pageGroup.createCheckBoxListField (
        EdRecordSection.FormSectionClassFieldNames.Sectn_Edit_Roles.ToString ( ),
        EdLabels.Form_Section_User_Edit_Roles_Field_Label,
        EdLabels.Form_Section_User_Edit_Roles_Field_Description,
        this.Session.FormSection.EditAccessRoles,
        optionList );
      pageField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Add the command to save the page content.
      //
      pageCommand = pageGroup.addCommand (
        EdLabels.Form_Properties_Section_Save_Command_Title,
        EuAdapter.ADAPTER_ID,
        EuAdapterClasses.Entity_Layouts.ToString ( ),
        Evado.UniForm.Model.ApplicationMethods.Custom_Method );

      pageCommand.SetPageId ( Evado.Digital.Model.EdStaticPageIds.Form_Properties_Page );
      pageCommand.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.Get_Object );
      pageCommand.SetGuid ( this.Session.EntityLayout.Guid );
      pageCommand.AddParameter ( EuRecordLayouts.CONST_UPDATE_SECTION_COMMAND_PARAMETER, "1" );


    }//END getPropertiesDataObject Method