public virtual void Initial_WindowTreeGridHuge(APMDataGridExtended userDataGrid,
                                                APMToolBar userToolBar, GroupBox currentRowGroupBox, string xOperation,
                                                WindowSearch <GridRT> userSearchForm, APMTree userTreeView,
                                                string RootCaption, int LevelCount, int Code_DigitCount)
 {
     base.Initial_WindowTreeGrid(userDataGrid, userToolBar, currentRowGroupBox, xOperation, userSearchForm, userTreeView, RootCaption, LevelCount, Code_DigitCount);
 }
Esempio n. 2
0
 public virtual void Initial_WindowEntity(APMDataGridExtended userDataGrid, APMToolBar userToolBar, GroupBox currentRowGroupBox
                                          , string xOperation, Boolean GetAllRecordsAtFirst, WindowSearch <RT> userSearchForm
                                          , long userEntity, APMTwoPartCode userTwoPartCode)
 {
     this.entity_type     = userEntity;
     this.userTwoPartCode = userTwoPartCode;
     Initial_WindowBase(userDataGrid, userToolBar, currentRowGroupBox, xOperation, GetAllRecordsAtFirst, userSearchForm);
 }
 public virtual void Initial_WindowEntityGroup(APMDataGridExtended userDataGrid, APMToolBar userToolBar, GroupBox currentRowGroupBox
                                               , string xOperation, Boolean GetAllRecordsAtFirst, WindowSearch <EntityRT> userSearchForm
                                               , long userEntity, APMTwoPartCode userTwoPartCode, APMComboBox userComboBox)
 {
     this.comboBox = userComboBox;
     //new BLL<GroupRT>().FillComboBoxForShow(comboBox, record_GroupRT, "نمایش همه", 0);
     this.comboBox.SelectionChanged += new SelectionChangedEventHandler(comboBox_SelectionChanged);
     Initial_WindowEntity(userDataGrid, userToolBar, currentRowGroupBox, xOperation,
                          GetAllRecordsAtFirst, userSearchForm, userEntity, userTwoPartCode);
 }
Esempio n. 4
0
 public virtual void Initial_WindowTreeGrid(APMDataGridExtended userDataGrid,
                                            APMToolBar userToolBar, GroupBox currentRowGroupBox, string xOperation,
                                            WindowSearch <RT> userSearchForm, APMTree userTreeView,
                                            string RootCaption, int LevelCount, int Code_DigitCount)
 {
     base.Initial_WindowBase(userDataGrid, userToolBar, currentRowGroupBox, xOperation, false, userSearchForm);
     tree                 = userTreeView;
     tree.XCaption        = RootCaption;
     this.Code_DigitCount = Code_DigitCount;
     this.LevelCount      = LevelCount;
 }
Esempio n. 5
0
 public void CreateControls()
 {
     aPMComboBox       = new APMComboBox();
     APMGroupBoxFilter = new APMGroupBox()
     {
         Header = "فیلتر کردن"
     };
     APMGroupBoxDisplay   = new APMGroupBox();
     APMGroupBoxGridGroup = new APMGroupBox();
     dataGridExtended     = new APMDataGridExtended();
     APMStatusBar         = new APMStatusBar()
     {
         XType = APMStatusBar.XStatusBarType.SelectWindow
     };
 }
 public void Initial_WindowReport(APMDocumentHeader userDocumentHeader, APMDataGridExtended userDataGrid, APMToolBar userToolbar, string Xoperation, ReportClass reportFile)
 {
     userToolbar.XType              = XWindowType.ReportWindow;
     this.documentHeader            = userDocumentHeader;
     this.reportFile                = reportFile;
     userDataGrid.datagrid.Sorting += dataGrid_Sorting;
     Initial_WindowBase(userDataGrid, userToolbar, null, Xoperation, false, null);
     lastParameter = Activator.CreateInstance <RT>();
     if (documentHeader != null)
     {
         documentHeader.XTextBoxKeyDown_MainStore += new KeyEventHandler(documentHeader_XTextBoxKeyDown_MainStore);
         documentHeader.XTextBoxKeyDown_GoodsRequesterCostCenter += new KeyEventHandler(documentHeader_XTextBoxKeyDown_GoodsRequesterCostCenter);
         documentHeader.XTextBoxKeyDown_GoodsRequesterPersonel   += new KeyEventHandler(documentHeader_XTextBoxKeyDown_GoodsRequesterPersonel);
         documentHeader.XTextBoxKeyDown_RequestConfirmerPersonel += new KeyEventHandler(documentHeader_XTextBoxKeyDown_RequestConfirmerPersonel);
         documentHeader.XTextBoxKeyDown_DestinationDetail        += new KeyEventHandler(documentHeader_XTextBoxKeyDown_DestinationDetail);
         //new BLL<stp_glb_fiscal_year_selResult>().FillComboBoxForShow(documentHeader.cmbFiscalYear);
     }
 }
 public virtual void Initial_WindowTreeGridTwoTable(APMDataGridExtended userDataGrid, APMToolBar userToolBar,
                                                    WindowSearch <RT> userSearchForm, GroupBox groupBoxCurrentRow, APMTree userTreeView, string Header,
                                                    int LevelCount, int Code_DigitCount, UIElement grpGroup, UIElement grpEntity,
                                                    string XOperationGroup, string XOperationEntity, string groupTitle, string entityTitle)
 {
     base.Initial_WindowTreeGrid(userDataGrid, userToolBar, groupBoxCurrentRow, null, userSearchForm, userTreeView, Header, LevelCount, Code_DigitCount);
     this.grpGroup         = grpGroup;
     this.grpEntity        = grpEntity;
     this.XOperationGroup  = XOperationGroup;
     this.XOperationEntity = XOperationEntity;
     status = Status.Entity;
     ChangeStatus(Status.Group);
     tree.XIsTwoTable               = true;
     tree.XEntityTitle              = entityTitle;
     tree.XGroupTitle               = groupTitle;
     tree.XHaveContextMenu          = true;
     tree.XInsertChildClick_Entity += InsertChildClick_Entity;
     glbEntityTypeOption_For_Goods  = BLL <stp_glb_entity_type_option_selResult> .GetDetailsOption((long)EntityType.inv_goods);
 }
        public void Initial_WindowTwoTab
        (
            APMDocumentHeader documentHeader, TextBox txtCount, Label lblCount, TextBox txtPrice, Label lblPrice, APMComboBox cmbMeasure, APMDataGridExtended masterDataGrid, APMDataGridExtended articleDataGrid,
            APMToolBar masterToolbar, GroupBox masterCurrentRowGroupBox, APMGroupBoxExtended articleCurrentRowGroupBox,
            string masterXOperation, string articleXOperation, TabControl tabControl,
            TextBox txtDescription, int?pricePosition, int?all_pricePosition, ReportClass printReportFile, params int[] collapsingColumnsWhenDontHaveBaseDocument
        )
        {
            this.WindowState     = WindowState.Maximized;
            BLLArticle           = Activator.CreateInstance <BLL <ArticleRT> >();
            grpCurrentRowArticle = articleCurrentRowGroupBox;
            if (grpCurrentRowArticle != null)
            {
                grpCurrentRowArticle.XCanCollapse = true;
            }
            beforeEditingArticle   = Activator.CreateInstance <ArticleRT>();
            this.txtDescription    = txtDescription;
            this.txtCount          = txtCount;
            this.lblCount          = lblCount;
            this.txtPrice          = txtPrice;
            this.lblPrice          = lblPrice;
            this.pricePosition     = pricePosition;
            this.all_pricePosition = all_pricePosition;
            this.cmbMeasure        = cmbMeasure;
            this.documentHeader    = documentHeader;
            this.articleGrid       = articleDataGrid.datagrid;
            this.articleDataGrid   = articleDataGrid;
            this.xOperationArticle = articleXOperation;
            this.tabControl        = tabControl;
            this.KeyUp            += Window_KeyUp;
            this.printReportFile   = printReportFile;
            toolbarButtons.Clear();
            FindToolBarButtons(grpCurrentRowArticle);
            foreach (APMToolbarButton button in toolbarButtons)
            {
                button.Click += toolbarArticle_Click;
            }
            Initial_WindowBase(masterDataGrid, masterToolbar, masterCurrentRowGroupBox, masterXOperation, false, new WindowSearch <MasterRT>());

            if (bindingListArticle != null)
            {
                collectionViewArticle = (CollectionView)CollectionViewSource.GetDefaultView(bindingListArticle);
                collectionViewArticle.CurrentChanged += collectionViewArticle_CurrentChanged;
            }

            if (articleDataGrid != null)
            {
                articleDataGrid.datagrid.SelectionChanged += articleGrid_SelectionChanged;
            }

            documentHeader.XBaseDocument_Changed += new RoutedEventHandler(DocumentHeader_XBaseDocument_Changed);

            collapsingColumns.Clear();
            if (collapsingColumnsWhenDontHaveBaseDocument != null)
            {
                foreach (int c in collapsingColumnsWhenDontHaveBaseDocument)
                {
                    collapsingColumns.Add(c);
                }
            }
            if (cmbMeasure != null)
            {
                cmbMeasure.LostFocus += new RoutedEventHandler(cmbMeasure_LostFocus);
            }

            if (txtDescription != null)
            {
                txtDescription.KeyDown += new KeyEventHandler(lastTextBox_KeyDown);
            }

            documentHeader.XTextBoxKeyDown_MainStore                += new KeyEventHandler(documentHeader_XTextBoxKeyDown_MainStore);
            documentHeader.XTextBoxKeyDown_BaseBuyRequest           += new KeyEventHandler(documentHeader_XTextBoxKeyDown_BaseBuyRequest);
            documentHeader.XTextBoxKeyDown_BaseGoodsRequest         += new KeyEventHandler(documentHeader_XTextBoxKeyDown_BaseGoodsRequest);
            documentHeader.XTextBoxKeyDown_GoodsRequesterCostCenter += new KeyEventHandler(documentHeader_XTextBoxKeyDown_GoodsRequesterCostCenter);
            documentHeader.XTextBoxKeyDown_GoodsRequesterPersonel   += new KeyEventHandler(documentHeader_XTextBoxKeyDown_GoodsRequesterPersonel);
            documentHeader.XTextBoxKeyDown_RequestConfirmerPersonel += new KeyEventHandler(documentHeader_XTextBoxKeyDown_RequestConfirmerPersonel);
            documentHeader.XTextBoxKeyDown_DestinationDetail        += new KeyEventHandler(documentHeader_XTextBoxKeyDown_DestinationDetail);

            if (tabControl != null)
            {
                tabControl.SelectedIndex = 1;
            }
            SetUpDownkeyFuntionForTextBoxes(articleCurrentRowGroupBox);
            if (isFinancial != null && isFinancial == true)
            {
                articleDataGrid.XShowTotalRials = true;
            }
            if (isFinancial != null && txtPrice != null && pricePosition != null && all_pricePosition != null)
            {
                articleDataGrid.datagrid.Columns[(int)pricePosition].Visibility     = GlobalFunctions.BooleanToVisibility((bool)isFinancial);
                articleDataGrid.datagrid.Columns[(int)all_pricePosition].Visibility = GlobalFunctions.BooleanToVisibility((bool)isFinancial);
                if (isFinancial == false)
                {
                    var columnDefinitionsIndex = ((int)txtPrice.GetValue(Grid.ColumnProperty)) - 1;
                    (txtPrice.Parent as Grid).ColumnDefinitions[columnDefinitionsIndex].Width = new GridLength(0);
                }
                GlobalFunctions.SetVisibilityForControl(txtPrice, (bool)isFinancial);
                GlobalFunctions.SetVisibilityForControl(lblPrice, (bool)isFinancial);
            }
        }