public MainWindow()
        {
            InitializeComponent();
            var source = new DevExpress.Data.Linq.LinqInstantFeedbackSource {
                KeyExpression = nameof(Item.Id)
            };

            source.GetQueryable += (sender, e) => {
                var context = new DataClasses1DataContext();
                e.QueryableSource = context.Items;
            };
            grid.ItemsSource = source;
        }
Exemplo n.º 2
0
        public override void RefreshRecord()
        {
            base.RefreshRecord();
            if (chkAllSites.CheckState == CheckState.Unchecked)
            {
                colTransactionSiteName.Visible = false;
            }
            else
            {
                colTransactionSiteName.Visible = true;
            }

            DataContext.EntityInventoryContext.ReloadEntry(itmInventory);
            DataContext.EntitySystemContext.ReloadEntry(sysInventoryEntity);
            itmHistory = BL.ITM.ITM_History.GetItemCurrentHistory(itmInventory, DataContext);
            DataContext.EntityInventoryContext.ReloadEntry(itmHistory);
            InstantFeedbackSourceTransaction = new DevExpress.Data.Linq.LinqInstantFeedbackSource(InstantFeedbackSourceTransaction_GetQueryable);
            grdTransactions.DataSource       = InstantFeedbackSourceTransaction;
            grvTransactions.RefreshData();
            InstantFeedbackSourceTransaction.Refresh();
            InstantFeedbackSourceOutstandingOrders.Refresh();
            InstantFeedbackSourceOutstandingTransfers.Refresh();
            InstantFeedbackSourceSalesHistory.Refresh();
        }