Beispiel #1
0
        public static HelpInfo GetHelpInfo(IBusinessObjectBoundWebControl control)
        {
            ArgumentUtility.CheckNotNull("control", control);

            var dataSource = control.DataSource;

            if (dataSource == null)
            {
                return(null);
            }

            var businessObjectClass = dataSource.BusinessObjectClass;

            if (businessObjectClass == null)
            {
                return(null);
            }

            var businessObjectProvider = businessObjectClass.BusinessObjectProvider;

            if (businessObjectProvider == null)
            {
                return(null);
            }

            var webUIService = businessObjectProvider.GetService <IBusinessObjectWebUIService>();

            if (webUIService != null)
            {
                return(webUIService.GetHelpInfo(control, businessObjectClass, control.Property, dataSource.BusinessObject));
            }

            return(null);
        }
 public HelpInfo GetHelpInfo(
     IBusinessObjectBoundWebControl control,
     IBusinessObjectClass businessObjectClass,
     IBusinessObjectProperty businessObjectProperty,
     IBusinessObject businessObject)
 {
     throw new NotImplementedException();
 }
 private void SetDebugLabel(IBusinessObjectBoundWebControl control, Label label)
 {
     if (control.Value != null)
     {
         label.Text = control.Value.ToString();
     }
     else
     {
         label.Text = "not set";
     }
 }
Beispiel #4
0
        /// <summary> Initialize a new instance. </summary>
        public BocListView(
            IBusinessObjectBoundWebControl ownerControl,
            object title,
            BocColumnDefinition[] columnDefinitions)
        {
            _title             = title;
            _columnDefinitions = new BocColumnDefinitionCollection(
                ownerControl);

            if (columnDefinitions != null)
            {
                _columnDefinitions.AddRange(columnDefinitions);
            }
        }
        public HelpInfo GetHelpInfo(
            IBusinessObjectBoundWebControl control,
            IBusinessObjectClass businessObjectClass,
            IBusinessObjectProperty businessObjectProperty,
            IBusinessObject businessObject)
        {
            ArgumentUtility.CheckNotNull("control", control);
            ArgumentUtility.CheckNotNull("businessObjectClass", businessObjectClass);

            return(new ToolTipBasedHelpInfo(string.Format(
                                                "{0}\r\n{1}\r\n{2}\r\n{3}",
                                                control.ID,
                                                businessObjectClass.Identifier,
                                                (businessObjectProperty != null ? businessObjectProperty.Identifier : "prop"),
                                                (businessObject is IBusinessObjectWithIdentity ? ((IBusinessObjectWithIdentity)businessObject).DisplayName : "obj"))));
        }
Beispiel #6
0
        private object[] GetDataSourceControls(object instance, IContainer container)
        {
            ComponentCollection components  = container.Components;
            ArrayList           dataSources = new ArrayList();

            ICollection controls = null;

            if (instance is Array)
            {
                controls = (Array)instance;
            }
            else
            {
                controls = new IBusinessObjectBoundWebControl[] { (IBusinessObjectBoundWebControl)instance }
            };

            for (int idxComponents = 0; idxComponents < components.Count; idxComponents++)
            {
                IComponent component = (IComponent)components[idxComponents];
                IBusinessObjectDataSourceControl dataSource = component as IBusinessObjectDataSourceControl;
                if (dataSource != null && !string.IsNullOrEmpty(dataSource.ID))
                {
                    bool hasSelfReference = false;
                    foreach (IBusinessObjectBoundWebControl control in controls)
                    {
                        if (dataSource == control)
                        {
                            hasSelfReference = true;
                            break;
                        }
                    }
                    if (!hasSelfReference)
                    {
                        dataSources.Add(dataSource.ID);
                    }
                }
            }

            dataSources.Sort(Comparer.Default);
            return(dataSources.ToArray());
        }
 public PropertyPathBindingCollection(IBusinessObjectBoundWebControl ownerControl)
     : base(ownerControl, new Type[] { typeof(PropertyPathBinding) })
 {
 }
Beispiel #8
0
 public BocListViewCollection(IBusinessObjectBoundWebControl ownerControl)
     : base(ownerControl, new Type[] { typeof(BocListView) })
 {
 }
 public BusinessObjectBinding(IBusinessObjectBoundWebControl control)
 {
     _control = control;
 }
Beispiel #10
0
 public BocColumnDefinitionCollection(IBusinessObjectBoundWebControl ownerControl)
     : base(ownerControl, new Type[] { typeof(BocColumnDefinition) })
 {
 }