Пример #1
0
        private void DataGrid_LoadingDataSource(object sender, Newegg.Oversea.Silverlight.Controls.Data.LoadingDataEventArgs e)
        {
            facade.QueryGiftCardInfo(DataGrid.QueryCriteria as ECCentral.QueryFilter.IM.GiftCardFilter, e.PageSize, e.PageIndex, e.SortField, (s, args) =>
            {
                if (args.FaultsHandle())
                {
                    return;
                }

                gridVM = DynamicConverter <GiftCardVM> .ConvertToVMList <List <GiftCardVM> >(args.Result.Rows);
                DataGrid.ItemsSource = gridVM;
                DataGrid.TotalCount  = args.Result.TotalCount;
                if (gridVM != null)
                {
                    //btnBatchLock.Visibility = System.Windows.Visibility.Visible;
                    //btnBatchUnLock.Visibility = System.Windows.Visibility.Visible;
                    //btnInvalid.Visibility = System.Windows.Visibility.Visible;
                    //hlEdit.IsEnabled = AuthMgr.HasFunctionPoint(AuthKeyConst.MKT_Invalid_InvalidGiftCard);
                }
                else
                {
                    //btnBatchLock.Visibility = System.Windows.Visibility.Collapsed;
                    //btnBatchUnLock.Visibility = System.Windows.Visibility.Collapsed;
                    //btnInvalid.Visibility = System.Windows.Visibility.Collapsed;
                }
            });
        }