コード例 #1
0
        public XOMenuItem(XWPMenuItem MenuItem, XSPApplication XSPApplication)
        {
            _xwpMenuItem = MenuItem;

            _xspTable = XSPApplication != null ? XSPApplication.Tables.FirstOrDefault(p=>p.TableName == MenuItem.TableName) : null;

            _menuItems = MenuItem.Children.Select(p => new XOMenuItem(p, XSPApplication)).ToArray();
        }
コード例 #2
0
        public XOApplication(XElement ModelElement, XElement ViewElement, XElement SecurityElement, XOApplicationConfigParams ConfigParams)
        {
            if (ModelElement == null)
            {
                throw new ArgumentException("ModelElement can't be null"); 
            }

            _xopDataSet = new XOPDataSet(ModelElement);

            if (ViewElement != null)
                _xwpApplication = new XWPApplication(ViewElement);

            if (SecurityElement != null)
                _xspApplication = new XSPApplication(SecurityElement);

            _tables = _xopDataSet.Tables.Select(p => new XOTable(this, p, GetXWPTable(XwpApplication, p.Name), GetXSPTable(XspApplication, p.Name))).ToArray();

            _configParams = ConfigParams;

            this.EndInit();
        }
コード例 #3
0
 private static XSPTable GetXSPTable(XSPApplication XSPApplication, string TableName)
 {
     return XSPApplication != null && XSPApplication.Tables != null ? XSPApplication.Tables.FirstOrDefault(s => s.TableName == TableName) : null;
 }