コード例 #1
0
        /// <summary>
        /// Update 'No Solicitations' flag for Partners in selected extract
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void UpdateSolicitationFlag(System.Object sender, EventArgs e)
        {
            bool NoSolicitations;

            if (!WarnIfNotSingleSelection(Catalog.GetString("Update 'No Solicitations' Flag")) &&
                (GetSelectedDetailRow() != null))
            {
                TFrmUpdateExtractSolicitationFlagDialog dialog = new TFrmUpdateExtractSolicitationFlagDialog(this.FindForm());
                dialog.SetExtractName(GetSelectedDetailRow().ExtractName);

                if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    dialog.GetReturnedParameters(out NoSolicitations);

                    // perform update of extract data on server side
                    if (TRemote.MPartner.Partner.WebConnectors.UpdateSolicitationFlag
                            (GetSelectedDetailRow().ExtractId, NoSolicitations))
                    {
                        MessageBox.Show(Catalog.GetString("'No Solicitations' flag successfully updated for all Partners in Extract ") +
                                        GetSelectedDetailRow().ExtractName,
                                        Catalog.GetString("Update 'No Solicitations' Flag"),
                                        MessageBoxButtons.OK,
                                        MessageBoxIcon.Information);
                    }
                    else
                    {
                        MessageBox.Show(Catalog.GetString("Error while updating 'No Solicitations' flag for Partners in Extract ") +
                                        GetSelectedDetailRow().ExtractName,
                                        Catalog.GetString("Update 'No Solicitations' Flag"),
                                        MessageBoxButtons.OK,
                                        MessageBoxIcon.Error);
                    }
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// Update 'No Solicitations' flag for Partners in selected extract
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void UpdateSolicitationFlag(System.Object sender, EventArgs e)
        {
            bool NoSolicitations;

            if (!WarnIfNotSingleSelection(Catalog.GetString("Update 'No Solicitations' Flag"))
                && (GetSelectedDetailRow() != null))
            {
                TFrmUpdateExtractSolicitationFlagDialog dialog = new TFrmUpdateExtractSolicitationFlagDialog(this.FindForm());
                dialog.SetExtractName(GetSelectedDetailRow().ExtractName);

                if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    dialog.GetReturnedParameters(out NoSolicitations);

                    // perform update of extract data on server side
                    if (TRemote.MPartner.Partner.WebConnectors.UpdateSolicitationFlag
                            (GetSelectedDetailRow().ExtractId, NoSolicitations))
                    {
                        MessageBox.Show(Catalog.GetString("'No Solicitations' flag successfully updated for all Partners in Extract ") +
                            GetSelectedDetailRow().ExtractName,
                            Catalog.GetString("Update 'No Solicitations' Flag"),
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Information);
                    }
                    else
                    {
                        MessageBox.Show(Catalog.GetString("Error while updating 'No Solicitations' flag for Partners in Extract ") +
                            GetSelectedDetailRow().ExtractName,
                            Catalog.GetString("Update 'No Solicitations' Flag"),
                            MessageBoxButtons.OK,
                            MessageBoxIcon.Error);
                    }
                }
            }
        }