/// <summary>
        /// set dialog mode (combine, intersect or subtract)
        /// </summary>
        /// <param name="AMode"></param>
        public void SetMode(TFrmExtractCombineIntersectSubtractDialog.TMode AMode)
        {
            FMode = AMode;

            // hide field for base extract if not in subtraction mode
            if (FMode != TMode.ecisSubtractMode)
            {
                int ReducedHeight = txtBaseExtract.Height;
                txtBaseExtract.Height = 0;
                lblBaseExtract.Height = 0;
                txtBaseExtract.Hide();
                lblBaseExtract.Hide();

                pnlTop.Height = pnlTop.Height - ReducedHeight;
                lblExplanation.Location = new System.Drawing.Point(lblExplanation.Location.X, lblExplanation.Location.Y - ReducedHeight);
            }

            switch (FMode)
            {
                case TMode.ecisCombineMode:
                    lblExplanation.Text = Catalog.GetString("Please add extracts to the list that you want to combine and then click OK:");
                    FindForm().Text = "Combine Extracts";
                    break;

                case TMode.ecisIntersectMode:
                    lblExplanation.Text = Catalog.GetString("Please add extracts to the list that you want to intersect and then click OK:");
                    FindForm().Text = "Intersect Extracts";
                    break;

                case TMode.ecisSubtractMode:
                    lblExplanation.Text = Catalog.GetString("Please add extracts to the list to be subtracted from the one above:");
                    FindForm().Text = "Subtract Extracts";
                    break;
            }
        }
コード例 #2
0
        /// <summary>
        /// Subtract Extracts (open a screen to select extracts to subtract from each other)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SubtractExtracts(System.Object sender, EventArgs e)
        {
            TFrmExtractCombineIntersectSubtractDialog ExtractSubtractDialog = new TFrmExtractCombineIntersectSubtractDialog(this.ParentForm);
            String BaseExtractName;

            List <Int32> AIntersectExtractIdList;

            // initialize dialog
            ExtractSubtractDialog.SetMode(TFrmExtractCombineIntersectSubtractDialog.TMode.ecisSubtractMode);

            // show dialog so the user can select extracts to be subtracted
            ExtractSubtractDialog.ShowDialog();

            if (ExtractSubtractDialog.DialogResult != System.Windows.Forms.DialogResult.Cancel)
            {
                // Get values from the Dialog
                ExtractSubtractDialog.GetReturnedParameters(out BaseExtractName, out AIntersectExtractIdList);

                // now first the user needs to give the new intersected extract a name
                TFrmExtractNamingDialog ExtractNameDialog = new TFrmExtractNamingDialog(this);
                int    NewExtractId = 0;
                string NewExtractName;
                string NewExtractDescription;

                ExtractNameDialog.ShowDialog();

                if (ExtractNameDialog.DialogResult != System.Windows.Forms.DialogResult.Cancel)
                {
                    /* Get values from the Dialog */
                    ExtractNameDialog.GetReturnedParameters(out NewExtractName, out NewExtractDescription);
                }
                else
                {
                    // dialog was cancelled, do not continue with extract generation
                    return;
                }

                ExtractNameDialog.Dispose();

                if (TRemote.MPartner.Partner.WebConnectors.SubtractExtracts
                        (NewExtractName, NewExtractDescription, BaseExtractName, AIntersectExtractIdList,
                        out NewExtractId))
                {
                    ucoExtractMasterList.RefreshExtractList(sender, e);
                }
            }

            ExtractSubtractDialog.Dispose();
        }
コード例 #3
0
        /// <summary>
        /// Subtract Extracts (open a screen to select extracts to subtract from each other)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SubtractExtracts(System.Object sender, EventArgs e)
        {
            TFrmExtractCombineIntersectSubtractDialog ExtractSubtractDialog = new TFrmExtractCombineIntersectSubtractDialog(this.ParentForm);
            String BaseExtractName;

            List <Int32>AIntersectExtractIdList;

            // initialize dialog
            ExtractSubtractDialog.SetMode(TFrmExtractCombineIntersectSubtractDialog.TMode.ecisSubtractMode);

            // show dialog so the user can select extracts to be subtracted
            ExtractSubtractDialog.ShowDialog();

            if (ExtractSubtractDialog.DialogResult != System.Windows.Forms.DialogResult.Cancel)
            {
                // Get values from the Dialog
                ExtractSubtractDialog.GetReturnedParameters(out BaseExtractName, out AIntersectExtractIdList);

                // now first the user needs to give the new intersected extract a name
                TFrmExtractNamingDialog ExtractNameDialog = new TFrmExtractNamingDialog(this);
                int NewExtractId = 0;
                string NewExtractName;
                string NewExtractDescription;

                ExtractNameDialog.ShowDialog();

                if (ExtractNameDialog.DialogResult != System.Windows.Forms.DialogResult.Cancel)
                {
                    /* Get values from the Dialog */
                    ExtractNameDialog.GetReturnedParameters(out NewExtractName, out NewExtractDescription);
                }
                else
                {
                    // dialog was cancelled, do not continue with extract generation
                    return;
                }

                ExtractNameDialog.Dispose();

                if (TRemote.MPartner.Partner.WebConnectors.SubtractExtracts
                        (NewExtractName, NewExtractDescription, BaseExtractName, AIntersectExtractIdList,
                        out NewExtractId))
                {
                    ucoExtractMasterList.RefreshExtractList(sender, e);
                }
            }

            ExtractSubtractDialog.Dispose();
        }
コード例 #4
0
        /// <summary>
        /// Subtract Extracts (open a screen to select extracts to subtract from each other)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SubtractExtracts(System.Object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                TFrmExtractCombineIntersectSubtractDialog ExtractSubtractDialog = new TFrmExtractCombineIntersectSubtractDialog(this.ParentForm);
                String BaseExtractName;

                List <Int32>AIntersectExtractIdList;

                // initialize dialog
                ExtractSubtractDialog.SetMode(TFrmExtractCombineIntersectSubtractDialog.TMode.ecisSubtractMode);

                if (ucoExtractMasterList.GetSelectedDetailRow() != null)
                {
                    // Show currently selected extract in the grid in the dialog
                    ExtractSubtractDialog.PreSelectExtract(ucoExtractMasterList.GetSelectedDetailRow());
                }

                // show dialog so the user can select extracts to be subtracted
                ExtractSubtractDialog.ShowDialog();

                if (ExtractSubtractDialog.DialogResult != System.Windows.Forms.DialogResult.Cancel)
                {
                    // Get values from the Dialog
                    ExtractSubtractDialog.GetReturnedParameters(out BaseExtractName, out AIntersectExtractIdList);

                    // now first the user needs to give the new intersected extract a name
                    TFrmExtractNamingDialog ExtractNameDialog = new TFrmExtractNamingDialog(this);
                    int NewExtractId = 0;
                    string NewExtractName;
                    string NewExtractDescription;

                    ExtractNameDialog.ShowDialog();

                    if (ExtractNameDialog.DialogResult != System.Windows.Forms.DialogResult.Cancel)
                    {
                        /* Get values from the Dialog */
                        ExtractNameDialog.GetReturnedParameters(out NewExtractName, out NewExtractDescription);
                    }
                    else
                    {
                        // dialog was cancelled, do not continue with extract generation
                        return;
                    }

                    this.Cursor = Cursors.WaitCursor;

                    ExtractNameDialog.Dispose();

                    if (TRemote.MPartner.Partner.WebConnectors.SubtractExtracts
                            (NewExtractName, NewExtractDescription, BaseExtractName, AIntersectExtractIdList,
                            out NewExtractId))
                    {
                        ucoExtractMasterList.RefreshExtractList(sender, e);

                        MessageBox.Show(Catalog.GetString("Subtract Extracts successful."));
                    }
                }

                ExtractSubtractDialog.Dispose();
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
コード例 #5
0
        /// <summary>
        /// Subtract Extracts (open a screen to select extracts to subtract from each other)
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void SubtractExtracts(System.Object sender, EventArgs e)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                TFrmExtractCombineIntersectSubtractDialog ExtractSubtractDialog = new TFrmExtractCombineIntersectSubtractDialog(this.ParentForm);
                String BaseExtractName;

                List <Int32> AIntersectExtractIdList;

                // initialize dialog
                ExtractSubtractDialog.SetMode(TFrmExtractCombineIntersectSubtractDialog.TMode.ecisSubtractMode);

                if (ucoExtractMasterList.GetSelectedDetailRow() != null)
                {
                    // Show currently selected extract in the grid in the dialog
                    ExtractSubtractDialog.PreSelectExtract(ucoExtractMasterList.GetSelectedDetailRow());
                }

                // show dialog so the user can select extracts to be subtracted
                ExtractSubtractDialog.ShowDialog();

                if (ExtractSubtractDialog.DialogResult != System.Windows.Forms.DialogResult.Cancel)
                {
                    // Get values from the Dialog
                    ExtractSubtractDialog.GetReturnedParameters(out BaseExtractName, out AIntersectExtractIdList);

                    // now first the user needs to give the new intersected extract a name
                    TFrmExtractNamingDialog ExtractNameDialog = new TFrmExtractNamingDialog(this);
                    int    NewExtractId = 0;
                    string NewExtractName;
                    string NewExtractDescription;

                    ExtractNameDialog.ShowDialog();

                    if (ExtractNameDialog.DialogResult != System.Windows.Forms.DialogResult.Cancel)
                    {
                        /* Get values from the Dialog */
                        ExtractNameDialog.GetReturnedParameters(out NewExtractName, out NewExtractDescription);
                    }
                    else
                    {
                        // dialog was cancelled, do not continue with extract generation
                        return;
                    }

                    this.Cursor = Cursors.WaitCursor;

                    ExtractNameDialog.Dispose();

                    if (TRemote.MPartner.Partner.WebConnectors.SubtractExtracts
                            (NewExtractName, NewExtractDescription, BaseExtractName, AIntersectExtractIdList,
                            out NewExtractId))
                    {
                        ucoExtractMasterList.RefreshExtractList(sender, e);

                        MessageBox.Show(Catalog.GetString("Subtract Extracts successful."));
                    }
                }

                ExtractSubtractDialog.Dispose();
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }