Пример #1
0
        private void ReSetCustomerID()
        {
            this.txtCustomerSysNo.ClearValidationError();
            var facade = new CustomerFacade(CPApplication.Current.CurrentPage);

            facade.LoadCustomerByID(this.txtCustomerID.Text.Trim(), OnLoadCustomerByID);
        }
Пример #2
0
        /// <summary>
        /// 请求服务,并将查询结果绑定到DataGrid
        /// </summary>
        void DataGrid_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            //1.初始化查询条件,分页信息
            //2.请求服务查询
            PagingInfo p = new PagingInfo
            {
                PageIndex = e.PageIndex,
                PageSize  = e.PageSize,
                SortBy    = e.SortField
            };
            CustomerFacade facade = new CustomerFacade(CPApplication.Current.CurrentPage);

            facade.QueryCustomer(_viewModel, p, (s, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }
                BindDataGrid(args.Result.TotalCount, args.Result.Rows);
            });
        }