コード例 #1
0
        public WindowSecondary(Session session, PivotGridControlModified control = null, bool isWhRestExistsCheckErrorDoc = false)
        {
            InitializeComponent();
            #region Initialize

            _session = session;
            _closeWithoutCheck = false;
            ThemeManager.SetThemeName(this, "DeepBlue");
            WindowState = WindowState.Maximized;
            _session.GetDocument().DocProjected += DbDocProjected; // ???
            Closing += WindowSecondaryClosing;
            _pivotGridControl2.CellClickAction += PivotGridControl2CellClickModified;
            Title = _session.GetTitle();

            #endregion

            #region Initialize PivotGrid Control

            _pivotGridControl2.DataSource = _session.GetTableData(Table.TableSecSource);
            _pivotGridControl2.HiddenFieldList += PivotGridControl2HiddenFieldList;
            _pivotGridControl2.FieldFilterChanged += _pivotGridControl2FieldFilterChanged;

            List<Column> columns;

            try
            {
                columns = _session.GetTableColumns(Table.TableSecSource);
            }
            catch (AssortmentException ex)
            {
                MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            _pivotGridControl2.InitializeControl(columns, FormTypes.Secondary);

            if (isWhRestExistsCheckErrorDoc)
            {
                
                _pivotGridControl2.Fields["LOC"].Area = FieldArea.ColumnArea;
                _pivotGridControl2.Fields["LOC"].Visible = true;
                _pivotGridControl2.Fields["ITEM"].Area = FieldArea.RowArea;
                _pivotGridControl2.Fields["ITEM"].Visible = true;
                _pivotGridControl2.Fields["MEASURE_STATUS_NEW"].Area = FieldArea.DataArea;
                _pivotGridControl2.Fields["MEASURE_STATUS_NEW"].Visible = true;
                _pivotGridControl2.SetFiltersForWhRestExistsCheckErrorDoc();
            }
            if (control == null)
                _pivotGridControl2.SetLayout(_session.GetDocument().PivotLayout);
            else
                _pivotGridControl2.CopyLayout(control);

            _pivotGridControl2.ShowRowTotals = false;
            _pivotGridControl2.ShowColumnTotals = false;

            #endregion
        }
コード例 #2
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.menuMain = ((System.Windows.Controls.Menu)(target));
     return;
     case 2:
     this.menuItemNum = ((System.Windows.Controls.MenuItem)(target));
     
     #line 51 "..\..\..\..\Windows\WindowSecondary.xaml"
     this.menuItemNum.Click += new System.Windows.RoutedEventHandler(this.MenuItemFieldsListClick);
     
     #line default
     #line hidden
     return;
     case 3:
     
     #line 57 "..\..\..\..\Windows\WindowSecondary.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemDocumentSave);
     
     #line default
     #line hidden
     return;
     case 4:
     
     #line 58 "..\..\..\..\Windows\WindowSecondary.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemDocumentDescription);
     
     #line default
     #line hidden
     return;
     case 5:
     
     #line 59 "..\..\..\..\Windows\WindowSecondary.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemAssortmentAddClick);
     
     #line default
     #line hidden
     return;
     case 6:
     
     #line 60 "..\..\..\..\Windows\WindowSecondary.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItem_AssortmentCopy);
     
     #line default
     #line hidden
     return;
     case 7:
     
     #line 63 "..\..\..\..\Windows\WindowSecondary.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemSummaryClick);
     
     #line default
     #line hidden
     return;
     case 8:
     
     #line 64 "..\..\..\..\Windows\WindowSecondary.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemSummaryTotalClick);
     
     #line default
     #line hidden
     return;
     case 9:
     this.menuItemFieldsList = ((System.Windows.Controls.MenuItem)(target));
     
     #line 66 "..\..\..\..\Windows\WindowSecondary.xaml"
     this.menuItemFieldsList.Click += new System.Windows.RoutedEventHandler(this.MenuItemFieldsListClick);
     
     #line default
     #line hidden
     return;
     case 10:
     this.menuItemsAdd = ((System.Windows.Controls.MenuItem)(target));
     
     #line 72 "..\..\..\..\Windows\WindowSecondary.xaml"
     this.menuItemsAdd.Click += new System.Windows.RoutedEventHandler(this.MenuItemItemsAddClick);
     
     #line default
     #line hidden
     return;
     case 11:
     this.menuItemUndo = ((System.Windows.Controls.MenuItem)(target));
     
     #line 77 "..\..\..\..\Windows\WindowSecondary.xaml"
     this.menuItemUndo.Click += new System.Windows.RoutedEventHandler(this.MenuItemUndoClick);
     
     #line default
     #line hidden
     return;
     case 12:
     this.menuItemRedo = ((System.Windows.Controls.MenuItem)(target));
     
     #line 82 "..\..\..\..\Windows\WindowSecondary.xaml"
     this.menuItemRedo.Click += new System.Windows.RoutedEventHandler(this.MenuItemRedoClick);
     
     #line default
     #line hidden
     return;
     case 13:
     this._pivotGridControl2 = ((AssortmentManagement.Controls.PivotGridControlModified)(target));
     return;
     case 14:
     this.gridInfo = ((System.Windows.Controls.Grid)(target));
     return;
     case 15:
     
     #line 92 "..\..\..\..\Windows\WindowSecondary.xaml"
     ((System.Windows.Shapes.Rectangle)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.GridInfoMouseLeftButtonDown);
     
     #line default
     #line hidden
     return;
     case 16:
     this.labelInfo = ((System.Windows.Controls.Label)(target));
     return;
     }
     this._contentLoaded = true;
 }
コード例 #3
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.menuMain = ((System.Windows.Controls.Menu)(target));
     return;
     case 2:
     this.menuItemNum = ((System.Windows.Controls.MenuItem)(target));
     
     #line 66 "..\..\..\..\Windows\WindowBase.xaml"
     this.menuItemNum.Click += new System.Windows.RoutedEventHandler(this.MenuItemFieldsListClick);
     
     #line default
     #line hidden
     return;
     case 3:
     this.menuItemRegularDocCreate = ((System.Windows.Controls.MenuItem)(target));
     
     #line 73 "..\..\..\..\Windows\WindowBase.xaml"
     this.menuItemRegularDocCreate.Click += new System.Windows.RoutedEventHandler(this.MenuItemRegularDocCreateClick);
     
     #line default
     #line hidden
     return;
     case 4:
     this.menuItemOperativeDocCreate = ((System.Windows.Controls.MenuItem)(target));
     
     #line 74 "..\..\..\..\Windows\WindowBase.xaml"
     this.menuItemOperativeDocCreate.Click += new System.Windows.RoutedEventHandler(this.MenuItemOperativeDocCreateClick);
     
     #line default
     #line hidden
     return;
     case 5:
     this.menuItemRegister = ((System.Windows.Controls.MenuItem)(target));
     
     #line 76 "..\..\..\..\Windows\WindowBase.xaml"
     this.menuItemRegister.Click += new System.Windows.RoutedEventHandler(this.MenuItemRegisterClick);
     
     #line default
     #line hidden
     return;
     case 6:
     
     #line 79 "..\..\..\..\Windows\WindowBase.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemSummaryClick);
     
     #line default
     #line hidden
     return;
     case 7:
     
     #line 80 "..\..\..\..\Windows\WindowBase.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemSummaryTotalClick);
     
     #line default
     #line hidden
     return;
     case 8:
     
     #line 83 "..\..\..\..\Windows\WindowBase.xaml"
     ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.MenuItemFiltersItems);
     
     #line default
     #line hidden
     return;
     case 9:
     this.menuItemFieldsList = ((System.Windows.Controls.MenuItem)(target));
     
     #line 85 "..\..\..\..\Windows\WindowBase.xaml"
     this.menuItemFieldsList.Click += new System.Windows.RoutedEventHandler(this.MenuItemFieldsListClick);
     
     #line default
     #line hidden
     return;
     case 10:
     this._pivotGridControl1 = ((AssortmentManagement.Controls.PivotGridControlModified)(target));
     return;
     case 11:
     this.gridInfo = ((System.Windows.Controls.Grid)(target));
     return;
     case 12:
     
     #line 97 "..\..\..\..\Windows\WindowBase.xaml"
     ((System.Windows.Shapes.Rectangle)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.GridInfoMouseLeftButtonDown);
     
     #line default
     #line hidden
     return;
     case 13:
     this.labelInfo = ((System.Windows.Controls.Label)(target));
     return;
     }
     this._contentLoaded = true;
 }