Exemplo n.º 1
0
        /// <summary>
        /// Binds the data.
        /// </summary>
        private void BindData()
        {
            if (MetaField != null && !MetaField.AllowNulls)
            {
                RequiredFieldValidator1.Enabled = true;
            }
            else
            {
                RequiredFieldValidator1.Enabled = false;
            }

            MetaLabelCtrl.Text = String.Format("{0} ({1})", MetaField.FriendlyName, LanguageCode);

            MetaValueCtrl.Text = MetaObject == null ? "" : MetaObject.GetDecimal(MetaField).ToString();

            MetaDescriptionCtrl.Text             = MetaField.Description;
            RequiredFieldValidator1.ErrorMessage = String.Format("the {0} field is required", MetaField.FriendlyName);
        }