예제 #1
0
 /// <summary> Prepares all bound controls implementing <see cref="IValidatableControl"/> for validation. </summary>
 public void PrepareValidation()
 {
     foreach (var control in InnerDataSource.GetBoundControlsWithValidBinding().OfType <IValidatableControl>())
     {
         control.PrepareValidation();
     }
 }
예제 #2
0
        protected override void OnUnload(EventArgs e)
        {
            foreach (var control in InnerDataSource.GetAllBoundControls().ToArray())
            {
                InnerDataSource.Unregister(control);
            }

            base.OnUnload(e);
        }
예제 #3
0
        /// <summary> Validates all bound controls implementing <see cref="IValidatableControl"/>. </summary>
        /// <returns> <see langword="true"/> if no validation errors where found. </returns>
        public bool Validate()
        {
            bool isValid = true;

            foreach (var control in InnerDataSource.GetBoundControlsWithValidBinding().OfType <IValidatableControl>())
            {
                isValid &= control.Validate();
            }
            return(isValid);
        }
예제 #4
0
 public IEnumerable <IBusinessObjectBoundControl> GetBoundControlsWithValidBinding()
 {
     return(InnerDataSource.GetBoundControlsWithValidBinding());
 }
예제 #5
0
 public ReadOnlyCollection <IBusinessObjectBoundControl> GetAllBoundControls()
 {
     return(InnerDataSource.GetAllBoundControls());
 }