Beispiel #1
0
        /// <summary>
        /// Initialize the QueryProvider Control with a specified BusinessObjectView
        /// </summary>
        /// <param name="bov">BusinessObjectView object</param>
        public void InitQueryProvider(BusinessObjectView bov)
        {
            if (bov == null)
            {
                throw new NullReferenceException("QueryProvider need a BusinessObjectView to work correctly.");
            }

            this.BusinessObjectView = bov;
            this.queryHolder.Controls.Add(this.GenerateQueryContainer());
            this.RecoverQueryStatus();
        }
Beispiel #2
0
        private void ParseParameters()
        {
            textControlID  = Request.QueryString["textControl"];
            valueControlID = Request.QueryString["valueControl"];
            viewObjectGUID = Request.QueryString["viewObjectGUID"];

            // 优先使用传入的BusinessObjectView,若为NULL则根据ViewName创建
            this.BusinessObjectView = Session[viewObjectGUID] as BusinessObjectView;
            if (this.BusinessObjectView == null)
            {
                BusinessView.Common bv = new BusinessView.Common();
                this.BusinessObjectView = bv.GetBusinessObjectViewFromName(Request.QueryString["viewName"]);
            }
            this.ucQueryProvider.InitQueryProvider(this.BusinessObjectView);
        }