Esempio n. 1
0
        /// <summary>
        /// This procedure databinds a DataSource, which may be either a DataTable or
        /// a DataView to the Label.
        /// </summary>
        /// <param name="ADataSource">The source to which the label and the textbox is to bind to.</param>
        /// <param name="ADataMember">The name of the data member needed for the control to databind.</param>
        /// <param name="AControlMode">The name of the mode the control is currently in.
        /// </param>
        /// <returns>void</returns>
        public bool PerformDataBinding(System.Data.DataView ADataSource, String ADataMember, TButtonLabelControlMode AControlMode)
        {
            bool ReturnValue;

            if (AControlMode == TButtonLabelControlMode.TwoTableMode)
            {
                ReturnValue = this.PerformDataBindingTwoTableMode(ADataSource, ADataMember);
                this.UpdateLabelText();
            }
            else if (AControlMode == TButtonLabelControlMode.FunctionMode)
            {
                ReturnValue = this.PerformDataBindingFunctionMode(ADataSource, ADataMember);

                // TLogging.Log('  Perform Databinding: TextBox databound. Before updating the label', [TLoggingType.ToLogfile]);
                this.UpdateLabelText();
            }
            else
            {
                ReturnValue = false;
            }

            if (ReturnValue == true)
            {
                this.FDataBound = true;
            }

            return ReturnValue;
        }
Esempio n. 2
0
 /// <summary>
 /// TodoComment
 /// </summary>
 protected override void OnCreateControl()
 {
     base.OnCreateControl();
     this.FControlMode = this.CheckControlMode();
 }