// группа чеков методов
        public void gcnMethods_CustomButtonChecked(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
        {
            GroupBoxButton btn = e.Button;

            switch (btn.Caption)
            {
            case "btnSearch_Method":
                this.gvMethod.OptionsFind.AlwaysVisible = btn.Checked;
                // при отключении очищаем фильтрацию
                if (btn.Checked == false)
                {
                    this.gvMethod.FindFilterText = null;
                }
                break;

            case "btnAutoFilter_Method":
                this.gvMethod.OptionsView.ShowAutoFilterRow = btn.Checked;
                // при отключении очищаем фильтрацию
                if (btn.Checked == false)
                {
                    this.gvMethod.ClearColumnsFilter();
                }
                break;
            }
        }
        // группа кнопок направлений
        public void gcnDirection_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
        {
            GroupBoxButton btn = e.Button;

            switch (btn.Caption)
            {
            case "btnAddDirection":
                btnAddDirections(2);
                break;

            case "btnEditDirection":
                if (this.gvDirection.RowCount != 0)
                {
                    btnAddDirections(3);
                }
                break;

            case "btnDeleteDirection":
                if (this.gvDirection.RowCount != 0)
                {
                    btnDeleteDirections();
                }
                break;

            case "btnClearSort_Direction":
                this.gvDirection.ClearSorting();
                break;
            }
        }
Beispiel #3
0
        // группа кнопок классификаций
        public void gcnClassification_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
        {
            GroupBoxButton btn = e.Button;

            // Console.WriteLine(e.Button.Properties.Caption)
            switch (btn.Caption)
            {
            case "btnAddClassification":
                btnAddClassification(2);
                break;

            case "btnEditClassfication":
                if (this.gvClassification.RowCount != 0)
                {
                    btnAddClassification(3);
                }
                break;

            case "btnDeleteClassfication":
                if (this.gvClassification.RowCount != 0)
                {
                    btnDeleteClassfication();
                }
                break;

            case "btnClearSort_Classfication":
                this.gvClassification.ClearSorting();
                break;
            }
        }
Beispiel #4
0
        private void gpcPackageSOs_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
        {
            GroupBoxButton button = e.Button as GroupBoxButton;

            switch (button.Caption)
            {
            case "刷新":
                RefreshPackageLabels();

                break;

            default:
                break;
            }
        }
Beispiel #5
0
        private void gpcPackageSOs_CustomButtonClick(object sender, BaseButtonEventArgs e)
        {
            GroupBoxButton button = e.Button as GroupBoxButton;

            switch (button.Caption)
            {
            case "刷新订单":
                RefreshPackageSOs();

                break;

            default:
                break;
            }
        }
        // группа кнопок методов
        public void gcnProducts_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
        {
            bool           btnAddEdit = false;
            GroupBoxButton btn        = e.Button;

            switch (btn.Caption)
            {
            case "btnAddMethod":
                frAddEditResearchMethod.Default.AddEdit = 2;
                btnAddEdit = true;
                break;

            case "btnEditMethod":
                if (this.gvMethod.RowCount != 0)
                {
                    frAddEditResearchMethod.Default.AddEdit = 3;
                    btnAddEdit = true;
                }
                break;

            case "btnDeleteMethod":
                if (this.gvMethod.RowCount != 0)
                {
                    btnDeleteMethods();
                }
                break;

            case "btnClearSort_Method":
                this.gvMethod.ClearSorting();
                break;
            }
            // если добавление или редактирование
            if (btnAddEdit)
            {
                NewId_Method = this.gvMethod.GetFocusedRowCellDisplayText("Id");
                if (frAddEditResearchMethod.Default.ShowDialog() == DialogResult.OK)
                {
                    Designer_Method(this.gvDirection.GetFocusedRowCellDisplayText("Id"));
                }
            }
        }
        // группа кнопок объектов
        public void gcnObjects_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
        {
            bool           btnAddEdit = false;
            GroupBoxButton btn        = e.Button;

            switch (btn.Caption)
            {
            case "btnAddObject":
                frAddEditObjects.Default.AddEdit = 2;
                btnAddEdit = true;
                break;

            case "btnEditObject":
                if (this.gvObjects.RowCount != 0)
                {
                    frAddEditObjects.Default.AddEdit = 3;
                    btnAddEdit = true;
                }
                break;

            case "btnDeleteObject":
                if (this.gvObjects.RowCount != 0)
                {
                    btnDeleteObject();
                }
                break;

            case "btnClearSort_Object":
                this.gvObjects.ClearSorting();
                break;
            }
            // если добавление или редактирование
            if (btnAddEdit)
            {
                if (frAddEditObjects.Default.ShowDialog() == DialogResult.OK)
                {
                    Designer_Objects();
                    Designer_ObjectsTypes();
                }
            }
        }
Beispiel #8
0
        // группа кнопок соглашений
        public void gcnAgreements_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
        {
            bool           btnAddEdit = false;
            GroupBoxButton btn        = e.Button;

            switch (btn.VisibleIndex)
            {
            case 0:
                frAddEditCountryAgreement.Default.AddEdit = 2;
                btnAddEdit = true;
                break;

            case 1:
                if (this.gvAgreement.RowCount != 0)
                {
                    frAddEditCountryAgreement.Default.AddEdit = 3;
                    btnAddEdit = true;
                }
                break;

            case 2:
                if (this.gvAgreement.RowCount != 0)
                {
                    DeleteAgreement();
                }
                break;

            case 6:
                this.gvAgreement.ClearSorting();
                break;
            }
            // если добавление или редактирование
            if (btnAddEdit)
            {
                if (frAddEditCountryAgreement.Default.ShowDialog() == DialogResult.OK)
                {
                    Designer_Agreements();
                }
            }
        }
Beispiel #9
0
        private void GroupControl_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e)
        {
            GroupControl   groupControl = sender as GroupControl;
            GroupBoxButton baseButton   = groupControl.CustomHeaderButtons[0] as GroupBoxButton;
            int            res          = baseButton.ImageOptions.ImageIndex = baseButton.ImageOptions.ImageIndex == 1 ? 0 : 1;

            switch (baseButton.Caption)
            {
            case "按条码查询":
                QueryPars.enablePcbNumber = Convert.ToBoolean(res);
                break;

            case "按程序查询":
                groupControl_Result.Enabled = Convert.ToBoolean(res);
                QueryPars.enableSoftware    = Convert.ToBoolean(res);
                break;

            case "按检查结果查询":
                QueryPars.enableResult = Convert.ToBoolean(res);
                break;
            }
        }
Beispiel #10
0
        private void ConnectPopup(PopupMenu popupMenu, GroupControl groupControl)
        {
            if (popupMenu == null || groupControl == null)
            {
                return;
            }

            foreach (LinkPersistInfo a in popupMenu.LinksPersistInfo)
            {
                ButtonImageOptions buttonImageOptions = new ButtonImageOptions();
                GroupBoxButton     button             = new GroupBoxButton();

                button.Tag                       = a.Item;
                button.Caption                   = a.Item.Caption;
                button.UseCaption                = false;
                button.ToolTip                   = a.Item.Caption;
                button.ImageOptions.SvgImage     = a.Item.ImageOptions.SvgImage;
                button.ImageOptions.SvgImageSize = new Size(16, 16);

                groupControl.CustomHeaderButtons.Add(button);
            }

            groupControl.CustomButtonClick += GroupControl_CustomButtonClick;
        }
Beispiel #11
0
        // группа Кнопок
        public void gcnClassification_CustomButtonClick(object sender, BaseButtonEventArgs e)
        {
            GroupBoxButton btn = e.Button;

            switch (btn.VisibleIndex)
            {
            case 0:                     // btnEditCheckingProducts
                if (frAddEditQuarantineProducts.Default.ShowDialog() == DialogResult.OK)
                {
                    UpdateTreeList();
                }
                break;

            case 2:                     // btnMultiCheck
                this.tlQurantineObjects.OptionsView.ShowCheckBoxes = btn.Checked;
                this.gcnQurantineObjects.CustomHeaderButtons[9].Properties.Enabled  = btn.Checked;
                this.gcnQurantineObjects.CustomHeaderButtons[10].Properties.Enabled = btn.Checked;
                break;

            case 3:                     // btnShowSearchRow
                this.tlQurantineObjects.OptionsFind.AlwaysVisible = btn.Checked;
                if (btn.Checked == false)
                {
                    this.tlQurantineObjects.FindFilterText = null;                             // при отключении очищаем фильтрацию
                }
                break;

            case 4:                     // btnShowFilterRow
                this.tlQurantineObjects.OptionsView.ShowAutoFilterRow = btn.Checked;
                if (btn.Checked == false)
                {
                    this.tlQurantineObjects.ClearColumnsFilter();                             // при отключении очищаем фильтрацию
                }
                break;

            case 6:                     // btnExpandedAll
                this.tlQurantineObjects.ExpandAll();
                break;

            case 7:                     // btnCollapsedAll
                this.tlQurantineObjects.CollapseAll();
                break;

            case 9:                     // btnCheckAll
                if (IsMultiChecked())
                {
                    this.tlQurantineObjects.CheckAll();
                }
                break;

            case 10:                     // btnUncheckAll
                if (IsMultiChecked())
                {
                    this.tlQurantineObjects.UncheckAll();
                }
                break;

            case 12:                     // btnEditBooks
                DialogResult dr;
                dr = XtraMessageBox.Show("Редактирование справочной информации:" + "\n" +
                                         "<b>Да</b> - Справочник Направления исследований" + "\n" +
                                         "<b>Нет</b> - Справочник Объекты исследований",
                                         Application.ProductName,
                                         MessageBoxButtons.YesNoCancel,
                                         MessageBoxIcon.Question,
                                         DefaultBoolean.True);
                if (dr == DialogResult.Yes)
                {
                    frBooks_ResearchDirection.Default.ShowDialog();
                }
                if (dr == DialogResult.No)
                {
                    frBooks_ResearchObjects.Default.ShowDialog();
                }
                UpdateTreeList();
                break;

            case 13:                     // btnUpdate
                UpdateTreeList();
                break;
            }
        }
        // группа Кнопок
        public void gcnMethods_CustomButtonClick(object sender, BaseButtonEventArgs e)
        {
            GroupBoxButton btn = e.Button;

            switch (btn.VisibleIndex)
            {
            case 0:                     // btnMultiCheck
                this.tlMethods.OptionsView.ShowCheckBoxes = btn.Checked;
                break;

            case 1:                     // btnShowSearchRow
                this.tlMethods.OptionsFind.AlwaysVisible = btn.Checked;
                if (btn.Checked == false)
                {
                    this.tlMethods.FindFilterText = null;                             // при отключении очищаем фильтрацию
                }
                break;

            case 2:                     // btnShowFilterRow
                this.tlMethods.OptionsView.ShowAutoFilterRow = btn.Checked;
                if (btn.Checked == false)
                {
                    this.tlMethods.ClearColumnsFilter();                             // при отключении очищаем фильтрацию
                }
                break;

            case 4:                     // btnExpandedAll
                this.tlMethods.ExpandAll();
                break;

            case 5:                     // btnCollapsedAll
                this.tlMethods.CollapseAll();
                break;

            case 7:                     // btnCheckAll
                if (IsMultiChecked())
                {
                    this.tlMethods.CheckAll();
                }
                break;

            case 8:                     // btnUncheckAll
                if (IsMultiChecked())
                {
                    this.tlMethods.UncheckAll();
                }
                break;

            case 10:                     // btnEditBooks
                frBooks_ResearchDirection.Default.ShowDialog();
                mdVariables.tmWaitAnimation.StartWaitingIndicator(this.tlMethods, 0);
                LoadMethodList(_TableName, bool.Parse(_IsExpDirection));
                mdVariables.tmWaitAnimation.StopWaitingIndicator();
                break;

            case 11:                     // btnUpdate
                mdVariables.tmWaitAnimation.StartWaitingIndicator(this.tlMethods, 0);
                LoadMethodList(_TableName, bool.Parse(_IsExpDirection));
                mdVariables.tmWaitAnimation.StopWaitingIndicator();
                break;
            }
        }
Beispiel #13
0
        // группа Кнопок
        public void gcnClassification_CustomButtonClick(object sender, BaseButtonEventArgs e)
        {
            GroupBoxButton btn = e.Button;

            switch (btn.VisibleIndex)
            {
            case 0:                     // btnEditCheckingProducts
                if (frAddEditQuarantineProducts.Default.ShowDialog() == DialogResult.OK)
                {
                    UpdateTreeList();
                }
                break;

            case 2:                     // btnMultiCheck
                this.tlClassification.OptionsView.ShowCheckBoxes = btn.Checked;
                this.gcnClassification.CustomHeaderButtons[9].Properties.Enabled  = btn.Checked;
                this.gcnClassification.CustomHeaderButtons[10].Properties.Enabled = btn.Checked;
                break;

            case 3:                     // btnShowSearchRow
                this.tlClassification.OptionsFind.AlwaysVisible = btn.Checked;
                if (btn.Checked == false)
                {
                    this.tlClassification.FindFilterText = null;                             // при отключении очищаем фильтрацию
                }
                break;

            case 4:                     // btnShowFilterRow
                this.tlClassification.OptionsView.ShowAutoFilterRow = btn.Checked;
                if (btn.Checked == false)
                {
                    this.tlClassification.ClearColumnsFilter();                             // при отключении очищаем фильтрацию
                }
                break;

            case 6:                     // btnExpandedAll
                this.tlClassification.ExpandAll();
                break;

            case 7:                     // btnCollapsedAll
                this.tlClassification.CollapseAll();
                break;

            case 9:                     // btnCheckAll
                if (IsMultiChecked())
                {
                    this.tlClassification.CheckAll();
                }
                break;

            case 10:                     // btnUncheckAll
                if (IsMultiChecked())
                {
                    this.tlClassification.UncheckAll();
                }
                break;

            case 12:                     // btnEditBooks
                frBooks_ClassificationProducts.Default.ShowDialog();
                UpdateTreeList();
                break;

            case 13:                     // btnUpdate
                UpdateTreeList();
                break;
            }
        }