Пример #1
0
        void UCPMGroupPicker_Loaded(object sender, RoutedEventArgs e)
        {
            Loaded -= new RoutedEventHandler(UCPMGroupPicker_Loaded);
            var exp = this.GetBindingExpression(UCPMGroupPicker.SelectedPMGroupSysNoProperty);

            if (exp != null &&
                exp.ParentBinding != null)
            {
                string  path    = exp.ParentBinding.Path.Path;
                Binding binding = new Binding();
                binding.Path = new PropertyPath(path);
                binding.Mode = BindingMode.TwoWay;
                binding.NotifyOnValidationError = true;
                cmbPMGroupList.SetBinding(Newegg.Oversea.Silverlight.Controls.Combox.SelectedValueProperty, binding);
                queryFilter = new ProductManagerGroupQueryFilter()
                {
                    Status     = PMGroupStatus.Active,
                    PagingInfo = new QueryFilter.Common.PagingInfo()
                    {
                        SortBy    = string.Empty,
                        PageSize  = 0,
                        PageIndex = 0
                    }
                };
                facade = new PMGroupQueryFacade(CPApplication.Current.CurrentPage);
                BindComboxData();
            }
        }
Пример #2
0
        /// <summary>
        /// 查询PM组
        /// </summary>
        /// <returns></returns>
        public DataTable QueryProductManagerGroupInfo(ProductManagerGroupQueryFilter queryCriteria, out int totalCount)
        {
            DataCommand dc = DataCommandManager.GetDataCommand("QueryProductManagerGroupInfo");

            if (string.IsNullOrEmpty(queryCriteria.PMGroupName))
            {
                dc.SetParameterValue("@PMGroupName", "");
            }
            else
            {
                dc.SetParameterValue("@PMGroupName", "%" + queryCriteria.PMGroupName.Trim() + "%");
            }

            dc.SetParameterValue("@Status", queryCriteria.Status == null ? -999 : (int)queryCriteria.Status);
            dc.SetParameterValue("@CompanyCode", "8601");

            dc.SetParameterValue("@SortField", queryCriteria.PagingInfo.SortBy);
            dc.SetParameterValue("@PageSize", queryCriteria.PagingInfo.PageSize);
            dc.SetParameterValue("@PageCurrent", queryCriteria.PagingInfo.PageIndex);

            var source = dc.ExecuteDataTable();

            totalCount = (int)dc.GetParameterValue("@TotalCount");

            return(source);
        }
        public QueryResult QueryProductManagerGroupInfo(ProductManagerGroupQueryFilter request)
        {
            if (request == null)
            {
                throw new BizException(ResouceManager.GetMessageString("IM.ProductManagerGroup", "ProductManagerGroupCondtionIsNull"));
            }
            int totalCount;
            var data = ObjectFactory <IProductManagerGroupQueryDA> .Instance.QueryProductManagerGroupInfo(request, out totalCount);

            var source = new QueryResult {
                Data = data, TotalCount = totalCount
            };

            return(source);
        }
Пример #4
0
        /// <summary>
        /// 查询PMGroup
        /// </summary>
        /// <param name="queryFilter"></param>
        /// <param name="callback"></param>
        public void QueryPMGroupList(ProductManagerGroupQueryFilter queryFilter, EventHandler <RestClientEventArgs <List <ProductManagerGroupInfo> > > callback)
        {
            string relativeUrl = "/ProductManagerGroup/QueryProductManagerGroupInfo";

            restClient.Query <List <ProductManagerGroupInfo> >(relativeUrl, queryFilter, callback);
        }