}//ENd getFilteredList_SelectionGroup method

    // ==============================================================================
    /// <summary>
    /// This method creates an entity filter selection field object.
    /// </summary>
    /// <param name="PageGroup">Evado.Model.Uniform.Group object to add the pageGroup .</param>
    /// <param name="FieldName">EdOrganisation.FieldNames enumerated list value</param>
    //  ------------------------------------------------------------------------------
    private void getQueryList_StaticOrgFilter (
      Evado.UniForm.Model.Group PageGroup,
      EdOrganisation.FieldNames FieldName )
    {
      this.LogMethod ( "getQueryList_StaticOrgFilter" );
      this.LogDebug ( "FieldName: {0}. ", FieldName );
      //
      // Initialise the methods variables and objects.
      //
      List<EvOption> optionList = new List<EvOption> ( );
      optionList.Add ( new EvOption ( ) );

      //
      // Select the field to be displayed.
      //
      switch ( FieldName )
      {
        case EdOrganisation.FieldNames.Address_Country:
          {
            optionList = this.AdapterObjects.GetOrganisationFilterList ( EdOrganisation.FieldNames.Address_Country, true );

            var field = PageGroup.createSelectionListField (
              FieldName,
              EdLabels.Organisation_Address_Country_Field_Label,
              this.Session.SelectedCountry,
              optionList );
            field.Layout = EuAdapter.DefaultFieldLayout;
            field.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 );
            break;
          }
        case EdOrganisation.FieldNames.Address_Post_Code:
          {
            optionList = this.AdapterObjects.GetOrganisationFilterList ( EdOrganisation.FieldNames.Address_Post_Code, true );

            var field = PageGroup.createSelectionListField (
              FieldName,
              EdLabels.Organisation_Address_PostCode_Field_Label,
              this.Session.SelectedPostCode,
              optionList );
            field.Layout = EuAdapter.DefaultFieldLayout;
            field.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 );
            break;
          }
        case EdOrganisation.FieldNames.Address_City:
          {
            optionList = this.AdapterObjects.GetOrganisationFilterList ( EdOrganisation.FieldNames.Address_City, true );

            var field = PageGroup.createSelectionListField (
              FieldName,
              EdLabels.Organisation_Address_City_Field_Label,
              this.Session.SelectedCity,
              optionList );
            field.Layout = EuAdapter.DefaultFieldLayout;
            field.AddParameter ( Evado.UniForm.Model.FieldParameterList.Snd_Cmd_On_Change, 1 );
            break;
          }
      }
      this.LogMethodEnd ( "getQueryList_StaticOrgFilter" );
    }
 /// <summary>
 /// The method return true if the hidden field is selected.
 /// </summary>
 /// <param name="Field">EdOrganisation.OrganisationFieldNames value</param>
 /// <returns>Bool</returns>
 public bool hasHiddenOrganisationField(EdOrganisation.FieldNames Field)
 {
     if (this.HiddenOrganisationFields.Contains(Field.ToString( )) == true)
     {
         return(true);
     }
     return(false);
 }
예제 #3
0
        // ==================================================================================
        /// <summary>
        /// This method provides a list of trial types.
        /// </summary>
        /// <param name="FieldName">EvOrganisation.OrganisationFieldNames: a Field Name object</param>
        /// <returns>string: a string value</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Switch FieldName and get value defining by the organization field name.
        /// </remarks>
        //  ---------------------------------------------------------------------------------
        public string getValue(EdOrganisation.FieldNames FieldName)
        {
            //
            // Switch FieldName and get value defining by the organization field name.
            //
            switch (FieldName)
            {
            case EdOrganisation.FieldNames.OrgId:
                return(this._OrgId);

            case EdOrganisation.FieldNames.Name:
                return(this._Name);

            case EdOrganisation.FieldNames.Image_File_Name:
            {
                return(this.ImageFileName);
            }

            case EdOrganisation.FieldNames.Org_Type:
                return(this._OrgType);

            case EdOrganisation.FieldNames.Address:
                return(this.Address);

            case EdOrganisation.FieldNames.Address_1:
                return(this.AddressStreet_1);

            case EdOrganisation.FieldNames.Address_2:
                return(this.AddressStreet_2);

            case EdOrganisation.FieldNames.Address_City:
                return(this.AddressCity);

            case EdOrganisation.FieldNames.Address_State:
                return(this.AddressState);

            case EdOrganisation.FieldNames.Address_Post_Code:
                return(this.AddressPostCode);

            case EdOrganisation.FieldNames.Address_Country:
                return(this.AddressCountry);

            case EdOrganisation.FieldNames.Telephone:
                return(this._Telephone);

            case EdOrganisation.FieldNames.Email_Address:
                return(this._EmailAddress);

            default:
                return(String.Empty);
            } //END Switch
        }     //END getValue method
    // ==================================================================================
    /// <summary>
    /// THis method saves the ResultData object updating the field values contained in the 
    /// parameter list.
    /// </summary>
    /// <param name="Parameters">List of field values to be updated.</param>
    /// <returns></returns>
    //  ----------------------------------------------------------------------------------
    private void updateObjectValue (
      List<Evado.UniForm.Model.Parameter> Parameters )
    {
      this.LogMethod ( "updateObjectValue" );
      this.LogDebug ( "Parameters.Count: " + Parameters.Count );
      this.LogDebug ( "Customer.Guid: " + this.Session.AdminOrganisation.Guid );

      /// 
      /// Iterate through the parameter values updating the ResultData object
      /// 
      foreach ( Evado.UniForm.Model.Parameter parameter in Parameters )
      {
        if ( parameter.Name.Contains ( Evado.Digital.Model.EvcStatics.CONST_GUID_IDENTIFIER ) == false
          && parameter.Name != Evado.UniForm.Model.CommandParameters.Custom_Method.ToString ( )
          && parameter.Name != Evado.Digital.Model.EvcStatics.CONST_SAVE_ACTION
          && parameter.Name != EuOrganisations.CONST_CURRENT_FIELD_ID )
        {
          this.LogDebug ( parameter.Name + " > " + parameter.Value + " >> UPDATED" );
          try
          {
            EdOrganisation.FieldNames fieldName =
               Evado.Model.EvStatics.parseEnumValue<EdOrganisation.FieldNames> (
              parameter.Name );

            this.Session.AdminOrganisation.setValue ( fieldName, parameter.Value );

          }
          catch ( Exception Ex )
          {
            this.LogException ( Ex );
          }
        }
        else
        {
          this.LogDebug ( parameter.Name + " > " + parameter.Value + " >> SKIPPED" );
        }

      }// End iteration loop

      this.LogMethodEnd ( "updateObjectValue" );
    }//END updateObjectValue method.
    }//END updateAddressValue Method

    // ==================================================================================
    /// <summary>
    /// THis method saves the ResultData object updating the field values contained in the 
    /// parameter list.
    /// </summary>
    /// <param name="PageCommand">Evado.UniForm.Model.Command updated.</param>
    /// <returns></returns>
    //  ----------------------------------------------------------------------------------
    private void updateOrganisationValues (
      Evado.UniForm.Model.Command PageCommand )
    {
      this.LogMethod ( "updateOrganisationValues" );
      this.LogDebug ( "Parameters.Count: " + PageCommand.Parameters.Count );

      /// 
      /// Iterate through the parameter values updating the ResultData object
      /// 
      foreach ( Evado.UniForm.Model.Parameter parameter in PageCommand.Parameters )
      {
        if ( parameter.Name.Contains ( EuUserProfiles.CONST_ORG_PREFIX ) == true )
        {
          string orgFieldName = parameter.Name.Replace ( EuUserProfiles.CONST_ORG_PREFIX, String.Empty );

          this.LogDebug ( orgFieldName + " = " + parameter.Value + " >> UPDATED" );
          try
          {
            EdOrganisation.FieldNames fieldName =
               Evado.Model.EvStatics.parseEnumValue<EdOrganisation.FieldNames> (
              orgFieldName );

            this.Session.Organisation.setValue ( fieldName, parameter.Value );

          }
          catch ( Exception Ex )
          {
            this.LogException ( Ex );
          }
        }
        else
        {
          this.LogDebug ( parameter.Name + " > " + parameter.Value + " >> SKIPPED" );
        }

      }// End iteration loop
      this.LogMethodEnd ( "updateOrganisationValues" );

    }//END updateOrganisationValues Method
예제 #6
0
        }     //END getValue method

        // ==================================================================================
        /// <summary>
        /// This method sets the field value.
        /// </summary>
        /// <param name="FieldName">EvOrganisation.OrganisationFieldNames: a field name object</param>
        /// <param name="Value">string: a Value for updating</param>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Initialize the internal variables
        ///
        /// 2. Switch the FieldName and update the Value on the organization field names.
        /// </remarks>
        //  ---------------------------------------------------------------------------------
        public void setValue(EdOrganisation.FieldNames FieldName, string Value)
        {
            //
            // Initialize the internal variables
            //

            //
            // Switch the FieldName and update the Value on the organization field names.
            //
            switch (FieldName)
            {
            case EdOrganisation.FieldNames.OrgId:
            {
                this._OrgId = Value;
                return;
            }

            case EdOrganisation.FieldNames.Name:
            {
                this._Name = Value;
                return;
            }

            case EdOrganisation.FieldNames.Image_File_Name:
            {
                this.ImageFileName = Value;
                return;
            }

            case EdOrganisation.FieldNames.Address:
            {
                this.Address = Value;
            } return;

            case EdOrganisation.FieldNames.Address_1:
            {
                this._AddressStreet_1 = Value;
                return;
            }

            case EdOrganisation.FieldNames.Address_2:
            {
                this._AddressStreet_2 = Value;
                return;
            }

            case EdOrganisation.FieldNames.Address_City:
            {
                this._AddressCity = Value;
                return;
            }

            case EdOrganisation.FieldNames.Address_State:
            {
                this._AddressState = Value;
                return;
            }

            case EdOrganisation.FieldNames.Address_Post_Code:
            {
                this._AddressPostCode = Value;
                return;
            }

            case EdOrganisation.FieldNames.Address_Country:
                this._Country = Value;
                return;

            case EdOrganisation.FieldNames.Telephone:
            {
                this._Telephone = Value;
                return;
            }

            case EdOrganisation.FieldNames.Email_Address:
            {
                this._EmailAddress = Value;
                return;
            }

            case EdOrganisation.FieldNames.Org_Type:
            {
                this._OrgType = Value;
                return;
            }

            default:

                return;
            } //END Switch
        }     //END setValue method