Пример #1
0
        public void StoreInputVisibilityInChildWebBlocksViewState(Control c)
        {
            // Store view state of the inputs in this block
            this.StoreInputsAndWebBlockVisibility();

            // Look for child blocks
            foreach (Control ctrl in c.Controls)
            {
                OSUserControl webBlock = ctrl as OSUserControl;
                if (webBlock != null)
                {
                    webBlock.StoreInputVisibilityInChildWebBlocksViewState(ctrl);
                }
                else
                {
                    StoreInputVisibilityInChildWebBlocksViewState(ctrl);
                }
            }
        }
 private void StoreViewStateInputsAndWebBlockVisibility(Control c)
 {
     foreach (Control ctrl in c.Controls)
     {
         OSUserControl webBlock = ctrl as OSUserControl;
         if (webBlock != null)
         {
             webBlock.StoreInputVisibilityInChildWebBlocksViewState(ctrl);
         }
         else
         {
             IWidgetRuntimeProperties ctrlWithValidations = ctrl as IWidgetRuntimeProperties;
             if (ctrlWithValidations != null)
             {
                 ctrlWithValidations.Mandatory = false;
             }
             StoreViewStateInputsAndWebBlockVisibility(ctrl);
         }
     }
 }