Esempio n. 1
0
        }//END loadEnityLayoutList method

        //===================================================================================
        /// <summary>
        /// This method executes the form list query
        /// </summary>
        //-----------------------------------------------------------------------------------
        private void loadRecordLayoutList( )
        {
            this.LogInitMethod("loadRecordLayoutList");
            this.LogInit("AllRecordLayouts.Count: " + EuAdapter.AdapterObjects.AllRecordLayouts.Count);

            //
            // Exit the method if the list exists or the loaded entiy layout is false.
            //
            if (EuAdapter.AdapterObjects.AllRecordLayouts.Count > 0)
            {
                this.LogInit("Record layouts loaded.");
                this.LogInit("END loadRecordLayoutList");
                return;
            }

            //
            // Initialise the methods variables and object.
            //
            EdRecordLayouts bll_RecordLayouts = new EdRecordLayouts(this.ClassParameters);

            bll_RecordLayouts.ClassParameters.LoggingLevel = 2;

            //
            // Query the database to retrieve a list of the records matching the query parameter values.
            //
            EuAdapter.AdapterObjects.AllRecordLayouts = bll_RecordLayouts.GetRecordLayoutListWithFields(
                EdRecordTypes.Null,
                EdRecordObjectStates.Null);

            this.LogInitClass(bll_RecordLayouts.Log);

            this.LogInit("AllRecordLayouts.Count: " + EuAdapter.AdapterObjects.AllRecordLayouts.Count);

            this.LogInit("END loadRecordLayoutList");
        }//END loadRecordLayoutList method
Esempio n. 2
0
    }//END getListObject method.

    // ==============================================================================
    /// <summary>
    /// This method creates the record view pageMenuGroup containing a list of commands to 
    /// open the form record.
    /// </summary>
    /// <param name="Page">Evado.Model.Uniform.Page object to add the pageMenuGroup to.</param>
    //  ------------------------------------------------------------------------------
    private void getRecordExport_SelectionGroup (
      Evado.UniForm.Model.Page Page )
    {
      this.LogMethod ( "getRecordExport_SelectionGroup" );
      // 
      // Initialise the methods variables and objects.
      // 
      Evado.UniForm.Model.Group pageGroup = new Evado.UniForm.Model.Group ( );
      Evado.UniForm.Model.Command command = new Evado.UniForm.Model.Command ( );
      Evado.UniForm.Model.Field selectionField = new Evado.UniForm.Model.Field ( );
      List<EvOption> optionList = new List<EvOption> ( );

      //
      // If the issued form list is empty fill it with the currently issued form selection objects.
      //
      if ( this.Session.IssueFormList.Count == 0 )
      {
        this.LogDebug ( "Issued Forms is empty so create list." );

        EdRecordLayouts forms = new EdRecordLayouts ( this.ClassParameters );

        this.Session.IssueFormList = forms.getList (
          EdRecordTypes.Null,
          EdRecordObjectStates.Form_Issued,
          false );
      }
      this.LogDebug ( "Issued Forms list count {0}.", this.Session.IssueFormList.Count );

      // 
      // Create the new pageMenuGroup for query selection.
      // 
      pageGroup = Page.AddGroup (
        EdLabels.Record_Selection_Group_Title,
        Evado.UniForm.Model.EditAccess.Enabled );
      pageGroup.GroupType = Evado.UniForm.Model.GroupTypes.Default;
      pageGroup.Layout = Evado.UniForm.Model.GroupLayouts.Full_Width;
      pageGroup.AddParameter ( Evado.UniForm.Model.GroupParameterList.Offline_Hide_Group, true );

      //
      // Add the selection pageMenuGroup.
      //
      selectionField = pageGroup.createSelectionListField (
        EdRecord.FieldNames.Layout_Id,
        EdLabels.Label_Form_Id,
        this.Session.Selected_EntityLayoutId,
        this.Session.IssueFormList );

      selectionField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Define the include draft record selection option.
      //
      selectionField = pageGroup.createBooleanField (
        EuEntities.CONST_INCLUDE_DRAFT_RECORDS,
        EdLabels.Record_Export_Include_Draft_Record_Field_Title,
        this.Session.FormRecords_IncludeDraftRecords );
      selectionField.Layout = EuAdapter.DefaultFieldLayout;

      //
      // Define the include free text ResultData selection option.
      //
      selectionField = pageGroup.createBooleanField (
        EuEntities.CONST_INCLUDE_FREE_TEXT_DATA,
        EdLabels.Record_Export_Include_FreeText_data_Field_Title,
        this.Session.FormRecords_IncludeFreeTextData );
      selectionField.Layout = EuAdapter.DefaultFieldLayout;

      // 
      // Add the selection groupCommand
      // 
      command = pageGroup.addCommand (
        EdLabels.Record_Export_Selection_Group_Command_Title,
        EuAdapter.ADAPTER_ID,
        EuAdapterClasses.Entities.ToString ( ),
         Evado.UniForm.Model.ApplicationMethods.Custom_Method );
      command.setCustomMethod ( Evado.UniForm.Model.ApplicationMethods.List_of_Objects );

    }//END getRecordExport_ListObject method