private void dataComboList_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            var comboFilter = new ComboQueryReqVM {
                SysNoList = this.sysNoList
            };

            this.dataComboList.QueryCriteria = comboFilter;
            new ComboFacade(this).Query(comboFilter, e.PageSize, e.PageIndex, e.SortField, (obj, args) =>
            {
                this.dataComboList.ItemsSource = args.Result.Rows.ToList();
                this.dataComboList.TotalCount  = args.Result.TotalCount;
            });
        }
Exemplo n.º 2
0
        public void Query(ComboQueryReqVM vm, int PageSize, int PageIndex, string SortField, EventHandler <RestClientEventArgs <dynamic> > callback)
        {
            ComboQueryFilter filter = vm.ConvertVM <ComboQueryReqVM, ComboQueryFilter>();

            filter.CompanyCode = CPApplication.Current.CompanyCode;
            filter.PM          = null;
            filter.PagingInfo  = new QueryFilter.Common.PagingInfo
            {
                PageSize  = PageSize,
                PageIndex = PageIndex,
                SortBy    = SortField
            };
            string relativeUrl = "/MKTService/Combo/Query";

            restClient.QueryDynamicData(relativeUrl, filter, (obj, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                callback(obj, args);
            });
        }
Exemplo n.º 3
0
        public override void OnPageLoad(object sender, EventArgs e)
        {
            base.OnPageLoad(sender, e);

            this.FilterVM = new ComboQueryReqVM();
        }