Пример #1
0
        }//END loadDefaultChildEntity method.

        //===================================================================================
        /// <summary>
        /// This method executes the form list query
        /// </summary>
        //-----------------------------------------------------------------------------------
        private void loadOrganisationList( )
        {
            this.LogInitMethod("loadOrganisationList");


            if (EuAdapter.AdapterObjects.OrganisationList.Count > 0)
            {
                this.LogInit("Organistion list layout loaded.");
                this.LogInit("END loadOrganisationList");
                return;
            }

            //
            // Initialise the methods variables and object.
            //
            EdOrganisations bll_Organisations = new EdOrganisations(this.ClassParameters);

            bll_Organisations.ClassParameters.LoggingLevel = 2;

            //
            // Query the database to retrieve a list of the records matching the query parameter values.
            //
            EuAdapter.AdapterObjects.OrganisationList = bll_Organisations.getView( );

            this.LogInitClass(bll_Organisations.Log);

            this.LogInit("Organisation list count: " + EuAdapter.AdapterObjects.OrganisationList.Count);

            this.LogInit("END loadOrganisationList");
        }//END loadTrialFormList method
    }//ENd saveUserProfile method

    // ==================================================================================
    /// <summary>
    /// THis method updates the organisation object.
    /// </summary>
    //  ----------------------------------------------------------------------------------
    private EvEventCodes saveOrganisationValue ( )
    {
      this.LogMethod ( "saveOrganisationValue" );
      //
      // Initialise the methods variables and objecs.
      //
      EdOrganisations bll_organisations = new EdOrganisations ( this.ClassParameters );

      // 
      // update the object.
      // 
      EvEventCodes result = bll_organisations.saveItem ( this.Session.Organisation );

      // 
      // get the debug ResultData.
      // 
      this.LogDebugClass ( bll_organisations.Log );

      // 
      // if an error state is returned create log the event.
      // 
      if ( result != EvEventCodes.Ok )
      {
        string StEvent = bll_organisations.Log + " returned error message: " + Evado.Digital.Model.EvcStatics.getEventMessage ( result );
        this.LogError ( EvEventCodes.Database_Record_Update_Error, StEvent );

        switch ( result )
        {
          default:
            {
              this.ErrorMessage = EdLabels.Organisation_Update_Error_Message;
              break;
            }
        }
        return result;
      }//END save error returned.


      this.LogMethodEnd ( "saveOrganisationValue" );
      return EvEventCodes.Ok;
    }//ENd saveOrganisationValue method