Exemplo n.º 1
0
    }//END AddParameter method


    // ==================================================================================
    /// <summary>
    /// This method test whether the parameter exists in the field.
    /// </summary>
    /// <param name="Name">String: The name of the parameter.</param>
    //  ---------------------------------------------------------------------------------
    public bool hasParameter ( 
      FieldParameterList Name )
    {
      //
      // get the string value of the parameter list.
      //
      String name = Name.ToString ( );
      name = name.Trim ( );

      //
      // Iterate through the parameters to get the selectev value.
      //
      foreach ( Parameter parameter in this._ParameterList )
      {
        if ( parameter.Name == name )
        {
          return true;
        }
      }

      //
      // Return result
      //
      return false;

    }//END AddParameter method
Exemplo n.º 2
0
    }//END AddParameter method

    // ==================================================================================
    /// <summary>
    /// This method adsd a parameter to the command's parameter list..
    /// </summary>
    /// <param name="Name">String: The name of the parameter.</param>
    /// <returns> String value of the header element</returns>
    //  ---------------------------------------------------------------------------------
    public DateTime GetParameterDate (
      FieldParameterList Name )
    {
      //
      // get the string value of the parameter list.
      //
      string value = this.GetParameter ( Name );

      return Evado.Model.EvStatics.getDateTime ( value );

    }//END AddParameter method
Exemplo n.º 3
0
    }//END AddParameter method

    // ==================================================================================
    /// <summary>
    /// This method adsd a parameter to the command's parameter list..
    /// </summary>
    /// <param name="Name">String: The name of the parameter.</param>
    /// <returns> String value of the header element</returns>
    //  ---------------------------------------------------------------------------------
    public float GetParameterflt (
      FieldParameterList Name )
    {
      //
      // get the string value of the parameter list.
      //
      string value = this.GetParameter ( Name );

      return Evado.Model.EvStatics.getFloat ( value );

    }//END AddParameter method
Exemplo n.º 4
0
    }//END AddParameter method

    // ==================================================================================
    /// <summary>
    /// This method add a parameter to for the background colour
    /// </summary>
    /// <param name="Name">FieldParameterList: The name of the parameter.</param>
    //  ---------------------------------------------------------------------------------
    public Background_Colours GetBackgroundColor ( 
      FieldParameterList Name )
    {
      //
      // Exit if the parameter is not a background colour enumeration.
      //
      if ( Name != FieldParameterList.BG_Default
        && Name != FieldParameterList.BG_Mandatory
        && Name != FieldParameterList.BG_Validation
        && Name != FieldParameterList.BG_Alert
        && Name != FieldParameterList.BG_Normal )
      {
        return Background_Colours.Default;
      }

      //
      // get the string value of the parameter list.
      //
      String value = this.GetParameter( Name );
      Background_Colours colour = Background_Colours.Default;

      //
      //Iterate through the list paramater to determine of the parameter already exists and update it.
      //
      foreach ( Parameter parameter in this._ParameterList )
      {
        //
        //If parameter Name is equal to GroupParameterList Name, return
        //
        if (value != String.Empty )
        {
          colour = Evado.Model.EvStatics.parseEnumValue<Background_Colours> ( parameter.Value );

          return colour;
        }
      }//END parameter iteration

      //
      // return the found colour
      //
      return colour;

    }//END AddParameter method
Exemplo n.º 5
0
    }//END hasParameter method

    // ==================================================================================
    /// <summary>
    /// This method adds a parameter to the command's parameter list..
    /// </summary>
    /// <param name="Name">String: The name of the parameter.</param>
    //  ---------------------------------------------------------------------------------
    public void DeleteParameter ( FieldParameterList Name )
    {
      //
      // get the string value of the parameter list.
      //
      String name = Name.ToString ( );
      name = name.Trim ( );

      for ( int count = 0; count < this._ParameterList.Count; count++ )
      {
        Parameter parameter = this._ParameterList [ count ];

        if ( parameter.Name == name )
        {
          this._ParameterList.RemoveAt ( count );
          count--;
        }
      }
    }
Exemplo n.º 6
0
    // ==================================================================================
    /// <summary>
    /// This method sets the background colour value
    /// </summary>
    /// <param name="Name">FieldParameterList: The name of the parameter.</param>
    /// <param name="Value">Background_Colours: the selected colour's enumerated value.</param>
    //  ---------------------------------------------------------------------------------
    public void setBackgroundColor ( 
      FieldParameterList Name, 
      Background_Colours Value )
    {
      //
      // Exit if the parameter is not a background colour enumeration.
      //
      if ( Name != FieldParameterList.BG_Default
        && Name != FieldParameterList.BG_Mandatory
        && Name != FieldParameterList.BG_Validation
        && Name != FieldParameterList.BG_Alert
        && Name != FieldParameterList.BG_Normal )
      {
        return;
      }
      //
      // get the string value of the parameter list.
      //
      String value = Value.ToString ( );

      this.AddParameter ( Name, value );


    }//END AddParameter method
Exemplo n.º 7
0
    // ==================================================================================
    /// <summary>
    /// This method adsd a parameter to the command's parameter list..
    /// </summary>
    /// <param name="Name">String: The name of the parameter.</param>
    /// <returns> String value of the header element</returns>
    //  ---------------------------------------------------------------------------------
    public String GetParameter ( 
      FieldParameterList Name )
    {
      //
      // get the string value of the parameter list.
      //
      String name = Name.ToString ( );
      name = name.Trim ( );


      //
      // Iterate through the parameters to get the selectev value.
      //
      foreach ( Parameter parameter in this._ParameterList )
      {
        if ( parameter.Name == name )
        {
          return parameter.Value;
        }
      }

      return string.Empty;

    }//END AddParameter method
Exemplo n.º 8
0
    }//END AddParameter method

    // ==================================================================================
    /// <summary>
    /// This method adds a parameter to the command's parameter list..
    /// </summary>
    /// <param name="Name">String: The name of the parameter.</param>
    /// <param name="Value">String: The value of the parameter.</param>
    //  ---------------------------------------------------------------------------------
    public void AddParameter ( 
      FieldParameterList Name, 
      object Value )
    {
      //
      // get the string value of the parameter list.
      //
      String name = Name.ToString ( );
      name = name.Trim ( );
      String value = Value.ToString ( );

      foreach ( Parameter parameter in this._ParameterList )
      {
        if ( parameter.Name == name )
        {
          parameter.Value = value;

          return;
        }
      }

      this._ParameterList.Add ( new Parameter ( name, value ) );

    }//END AddParameter method