Esempio n. 1
0
 public static void SetEnableMode(this BaseClientManagmentControl source, EnableMode mode, params EnableItem[] items)
 {
     foreach (var enableItem in items)
     {
         enableItem.EnableMode = mode;
     }
 }
Esempio n. 2
0
        public override void InitClientManagmentControl(ICollection <BaseClientManagmentControl> managmentControls)
        {
            if (!IsNew)
            {
                return;
            }
            var property = ControlInfo.GetType().GetProperty("DateEndControl") ?? ControlInfo.GetType().GetProperty("dateEndControl");

            if (property == null)
            {
                throw new Exception("Logic 'PeriodHistory' can not found property DateEndControl");
            }

            var item       = new BaseClientManagmentControl();
            var control    = (Control)property.GetValue(ControlInfo, null);
            var enableItem = new EnableItem {
                TargetControl = control
            };

            enableItem.EnableItems.Items.Add(new EnableByEmpty {
                Disable = true
            });
            item.EnableItems.Add(enableItem);
            managmentControls.Add(item);
        }