コード例 #1
0
        protected override void OnShown(EventArgs e)
        {
            base.OnShown(e);

            clbDocumentType.CheckAll();
            InstantFeedbackSourceTransaction.Refresh();
            InstantFeedbackSourceOutstandingOrders.Refresh();
            InstantFeedbackSourceOutstandingTransfers.Refresh();
            InstantFeedbackSourceSalesHistory.Refresh();

            if (this.ReadOnly)
            {
                foreach (DevExpress.XtraBars.BarButtonItemLink buttonLink in rpgActions.ItemLinks)
                {
                    buttonLink.Item.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                }
                AllowRefresh = true;
            }

            if (ShowTransaction)
            {
                lcgFilters.BeginUpdate();
                LayoutControl.OptionsView.IsReadOnly = DevExpress.Utils.DefaultBoolean.False;
                tcgCategories.SelectedTabPage        = tabTransactions;
                clbDocumentType.Enabled         = true;
                rgMonths.Enabled                = true;
                rgMonths.Properties.ReadOnly    = false;
                chkAllSites.Enabled             = true;
                chkAllSites.Properties.ReadOnly = false;
                lcgFilters.EndUpdate();
            }

            Essential.GridFilterDefaults.ApplyStandards(new List <DevExpress.XtraGrid.Views.Grid.GridView> {
                grvTransactions, grvSalesHistory
            });
            grvTransactions.ActiveFilterString = "Not [DocumentType] In ('Sales Order', 'Quote','Job Quote', 'Purchase Order')";
            grvSalesHistory.BestFitColumns();
            // grvSuppliers.BestFitColumns();
            grvTransactions.BestFitColumns();
        }
コード例 #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();
        }