}//END Method

    // ==================================================================================
    /// <summary>
    /// This method check whether the user has edit access to the alert object..
    /// </summary>
    /// <returns>Bool:  True:  user has edit access.</returns>
    //  ----------------------------------------------------------------------------------
    private Evado.Model.UniForm.Command getRecordCommand ( )
    {
      this.LogMethod ( "UserHasEditAccess" );
      this.LogValue ( "Alert.TypeId:  " + this.Session.Alert.TypeId );
      //
      // Initialise the methods variables and objects.
      //
      Evado.Model.UniForm.Command recordCommand = new Model.UniForm.Command (
        "Title",
        EuAdapter.APPLICATION_ID,
        "Object",
         Model.UniForm.ApplicationMethods.Get_Object ) ;

      switch ( this.Session.Alert.TypeId )
      {
        case EvAlert.AlertTypes.Trial_Record:
          {
            recordCommand.Title = String.Format ( EvLabels.Alert_Page_Open_Record_Command_Title,
              this.Session.Alert.RecordId );
            recordCommand.Object = EuAdapterClasses.Records.ToString ( );

            recordCommand.AddParameter ( EvIdentifiers.RECORD_ID, this.Session.Alert.RecordId );

            break;
          }

      }

      return recordCommand;

    }//END getRecordCommandMethod
    }//END getTrialAlertObject method

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

    #region Class private methods

    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="ClientDataObject">Evado.Model.UniForm.AppData object.</param>
    /// <remarks>
    /// This method consists of following steps:
    /// 
    /// 1. Based on the selection of ALert Type, redirect the user to the specific object
    /// </remarks>
    //  ------------------------------------------------------------------------------
    private void generateRedirection ( 
      Evado.Model.UniForm.AppData ClientDataObject )
    {
      this.LogMethod ( "generateRedirectionCommand" );
      //
      // If the save action is not acknowledgement exit.
      //
      if ( this.Session.Alert.Action != EvAlert.AlertSaveActionCodes.Acknowledge_Alert )
      {
        this.LogMethodEnd ( "generateRedirectionCommand" );
        return;
      }

      this.LogValue ( "Alert.TypeId: " + this.Session.Alert.TypeId );
      this.LogValue ( "Alert.RecordId: " + this.Session.Alert.RecordId );

      //
      // Initialise the methods variables and objects.
      //
      Evado.Model.UniForm.Command groupCommand =  ClientDataObject.Page.Exit;

      //
      // based on the alert type redirect the user to the relevant object.
      switch ( this.Session.Alert.TypeId )
      {
        case EvAlert.AlertTypes.Trial_Record:
          {
            groupCommand = new Model.UniForm.Command (
              EvLabels.Label_Record,
              EuAdapter.APPLICATION_ID,
              EuAdapterClasses.Records.ToString ( ),
              Model.UniForm.ApplicationMethods.Get_Object );

            groupCommand.AddParameter ( EvIdentifiers.RECORD_ID, this.Session.Alert.RecordId );

            break;
          }

      }//END alert type switch

      ClientDataObject.Page.Exit = groupCommand;

      this.LogMethodEnd ( "generateRedirectionCommand" );

    }//ENd generateRedirectionCommand method
    }//END getClientDataObject method

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

    #region Class private methods

    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="PageCommand">Evado.Model.UniForm.Command object.</param>
    /// <returns>Evado.Model.UniForm.AppData object</returns>
    //  ------------------------------------------------------------------------------
    private Evado.Model.UniForm.AppData getListObject (
      Evado.Model.UniForm.Command PageCommand )
    {
      try
      {
        this.LogMethod ( "getListObject" );
        this.LogValue ( "UserProfile.CommonName: " + this.Session.UserProfile.CommonName );

        //
        // Determine if the user has access to this page and log and error if they do not.
        //
        if ( this.Session.UserProfile.hasRecordAccess == false )
        {
          this.LogIllegalAccess (
            "Evado.UniForm.Clinical.AncilliaryRecords.getObject",
            this.Session.UserProfile );

          this.ErrorMessage = EvLabels.Illegal_Page_Access_Attempt;

          return null;
        }

        // 
        // Log access to page.
        // 
        this.LogPageAccess (
          "Evado.UniForm.Clinical.AncilliaryRecords.getListObject",
          this.Session.UserProfile );

        // 
        // Initialise the methods variables and objects.
        //      
        Evado.Model.UniForm.AppData clientDataObject = new Evado.Model.UniForm.AppData ( );
        Evado.Model.UniForm.Command groupCommand = new Model.UniForm.Command ( );
        Evado.Model.UniForm.Group pageGroup = new Model.UniForm.Group ( );

        clientDataObject.Title = EvLabels.Ancillary_Record_List_Page_Title;
        clientDataObject.Page.Title = clientDataObject.Title;
        clientDataObject.Id = Guid.NewGuid ( );
        this.LogValue ( "data.Page.Title: " + clientDataObject.Page.Title );

        // 
        // Create the new pageMenuGroup.
        // 
        pageGroup = clientDataObject.Page.AddGroup (
        EvLabels.Ancillary_Record_List_Page_Group_Title,
        Evado.Model.UniForm.EditAccess.Enabled );
        pageGroup.CmdLayout = Evado.Model.UniForm.GroupCommandListLayouts.Vertical_Orientation;
        pageGroup.Layout = Evado.Model.UniForm.GroupLayouts.Full_Width;

        if ( this.Session.UserProfile.hasRecordEditAccess == true )
        {
          groupCommand = pageGroup.addCommand ( 
            EvLabels.Ancillary_Record_Add_Record_Command_Title, 
            EuAdapter.APPLICATION_ID, 
            EuAdapterClasses.Ancillary_Record.ToString ( ),
            Model.UniForm.ApplicationMethods.Create_Object );

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

        // 
        // get the list of customers.
        // 
        List<EvAncillaryRecord> siteList = this._Bll_AncillaryRecords.getView (
          this.Session.Trial.TrialId,
          this.Session.Subject.SubjectId,
          String.Empty,
         String.Empty );

        this.LogValue ( this._Bll_AncillaryRecords.DebugLog );
        this.LogValue ( "list count: " + siteList.Count );

        // 
        // generate the page links.
        // 
        foreach ( EvAncillaryRecord ancillaryRecord in siteList )
        {

          groupCommand = pageGroup.addCommand(
            ancillaryRecord.RecordId, 
            EuAdapter.APPLICATION_ID,
            EuAdapterClasses.Ancillary_Record.ToString ( ),
            Evado.Model.UniForm.ApplicationMethods.Get_Object );

          groupCommand.SetGuid(  ancillaryRecord.Guid );

          groupCommand.Title = ancillaryRecord.Subject
            + EvLabels.Space_Open_Bracket
            + EvLabels.Label_Date
            + ancillaryRecord.stRecordDate
            + EvLabels.Space_Close_Bracket;
        }//END ancillary command iteration loop.

        if ( pageGroup.CommandList.Count == 0 )
        {
          pageGroup.Description = EvLabels.Ancillary_Record_List_Page_No_Records_Label ;
        }


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

        return clientDataObject;

      }
      catch ( Exception Ex )
      {
        // 
        // Create the error message to be displayed to the user.
        // 
        this.ErrorMessage = EvLabels.Ancillary_Record_Page_Error_Message;

        // 
        // Generate the log the error event.
        // 
        this.LogException ( Ex );
      }

      return null;

    }//END getListObject method.
    }//END getListObject method.
    // ==============================================================================
    /// <summary>
    /// This method returns a client application ResultData object
    /// </summary>
    /// <param name="Page">Evado.Model.UniForm.Page.</param>
    //  ------------------------------------------------------------------------------
    private void getListObject_Selection_Group ( 
      Evado.Model.UniForm.Page Page )
    {
      this.LogMethod ( "getListObject_Selection_Group" );
      //
      // Initialise the methods variables and objects.
      //
      Evado.Model.UniForm.Field groupField = new Model.UniForm.Field ( );
      Evado.Model.UniForm.Command command = new Model.UniForm.Command ( );
      List<EvOption> optionList = new List<EvOption>();

      // 
      // Create the new pageMenuGroup.
      // 
      Evado.Model.UniForm.Group pageGroup = Page.AddGroup (
        EvLabels.Alert_List_Selection_Group_Title,
        Evado.Model.UniForm.EditAccess.Enabled );
      pageGroup.Layout = Evado.Model.UniForm.GroupLayouts.Full_Width;

      //
      // generate the alert state option list.
      //
      optionList = EvAlert.getTypeList ( );

      //
      // create the alert type selection
      //
      groupField = pageGroup.createSelectionListField (
        EuAlerts.CONST_ALERT_TYPE,
        EvLabels.Alert_List_Alert_Type_Field_Label,
        this.Session.AlertType.ToString(),
        optionList );
      groupField.Layout = EuRecordGenerator.ApplicationFieldLayout;
      groupField.AddParameter ( Evado.Model.UniForm.FieldParameterList.Snd_Cmd_On_Change, 1 );

      //
      // generate the alert types option list.
      //
      optionList = EvAlert.getStateList ( );

      //
      // create the alert type selection field.
      //
      groupField = pageGroup.createSelectionListField (
        EuAlerts.CONST_ALERT_STATE,
        EvLabels.Alert_List_Alert_State_Field_Label,
        this.Session.AlertState.ToString ( ),
        optionList );
      groupField.Layout = EuRecordGenerator.ApplicationFieldLayout;
      groupField.AddParameter ( Evado.Model.UniForm.FieldParameterList.Snd_Cmd_On_Change, 1 );


      // 
      // Add the selection groupCommand
      // 
      command = pageGroup.addCommand (
        EvLabels.Alert_List_Selection_Command_Title,
        EuAdapter.APPLICATION_ID,
        EuAdapterClasses.Alert.ToString ( ),
         Evado.Model.UniForm.ApplicationMethods.Custom_Method );
      command.setCustomMethod ( Evado.Model.UniForm.ApplicationMethods.List_of_Objects );


    }//END getListObject_Selection_Group method
Beispiel #5
0
    }//END Method

    #endregion

    // =====================================================================================
    /// <summary>
    /// This method generates the commands associated with the selected menu item.
    /// </summary>
    /// <param name="MenuItem">The menu object</param>
    /// <returns>ClientClientDataObjectEvado.Model.UniForm.Command object.</returns>
    //  ------------------------------------------------------------------------------------
    public Evado.Model.UniForm.Command getMenuItemCommandObject ( EvMenuItem MenuItem )
    {
      this.resetAdapterLog ( );
      this.LogMethod ( "getMenuCommandObject" );
      this.LogDebug ( "PageId: {0}, Title: {1}, Group:  ",
        MenuItem.PageId, MenuItem.Title, MenuItem.Group );

      Evado.Model.UniForm.Command pageCommand = new Evado.Model.UniForm.Command (
        "Title",
        Evado.Model.UniForm.CommandTypes.Normal_Command,
        EuAdapter.ADAPTER_ID, String.Empty,
        Evado.Model.UniForm.ApplicationMethods.Get_Object );


      EdStaticPageIds pageId = EdStaticPageIds.Null;

      if ( EvStatics.tryParseEnumValue<EdStaticPageIds> ( MenuItem.PageId, out pageId ) == true )
      {
        #region Admin menu items

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( EdStaticPageIds.Database_Version );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

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

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

        }//END  admin page switch statement

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

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }


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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

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

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

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

              pageCommand.SetPageId ( MenuItem.PageId );

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

              pageCommand.SetPageId ( MenuItem.PageId );

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

              pageCommand.SetPageId ( MenuItem.PageId );

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

              pageCommand.SetPageId ( MenuItem.PageId );

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }
        }

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

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

              pageCommand.SetPageId ( MenuItem.PageId );

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

              pageCommand.SetPageId ( MenuItem.PageId );

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }
        }//END switch statement

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

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

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }


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

              pageCommand.SetPageId ( MenuItem.PageId );

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

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

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

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

              return pageCommand;
            }

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

              pageCommand.SetPageId ( MenuItem.PageId );

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

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

        }//END switch
      }

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


      return null;

    }//END convertMenuItem method