Ejemplo n.º 1
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.None;
            frmImport frm = new frmImport();
            try
            {
                this.Close();
                SqlAzManMergeOptions mergeOptions = SqlAzManMergeOptions.NoMerge;
                if (this.chkCreatesNewItems.Checked) mergeOptions |= SqlAzManMergeOptions.CreatesNewItems;
                if (this.chkOverwritesExistingItems.Checked) mergeOptions |= SqlAzManMergeOptions.OverwritesExistingItems;
                if (this.chkDeleteMissingItems.Checked) mergeOptions |= SqlAzManMergeOptions.DeleteMissingItems;
                if (this.chkCreatesNewItemAuthorizations.Checked) mergeOptions |= SqlAzManMergeOptions.CreatesNewItemAuthorizations;
                if (this.chkOverwritesItemAuthorizations.Checked) mergeOptions |= SqlAzManMergeOptions.OverwritesExistingItemAuthorization;
                if (this.chkDeleteMissingItemAuthorizations.Checked) mergeOptions |= SqlAzManMergeOptions.DeleteMissingItemAuthorizations;

                frm.ShowDialog(this, fileName, importIntoObject, this.chkUsersAndGroups.Checked, this.chkDBUsers.Checked, this.chkAuthorizations.Checked, mergeOptions);
                /*Application.DoEvents();*/
            }
            catch (Exception ex)
            {
                this.ShowError(ex.Message, Globalization.MultilanguageResource.GetString("frmImportOptions_Msg10"));
            }
            finally
            {
                this.DialogResult = DialogResult.OK;
            }
        }
Ejemplo n.º 2
0
        private void btnNext_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.None;
            frmImport frm = new frmImport();

            try
            {
                this.Close();
                SqlAzManMergeOptions mergeOptions = SqlAzManMergeOptions.NoMerge;
                if (this.chkCreatesNewItems.Checked)
                {
                    mergeOptions |= SqlAzManMergeOptions.CreatesNewItems;
                }
                if (this.chkOverwritesExistingItems.Checked)
                {
                    mergeOptions |= SqlAzManMergeOptions.OverwritesExistingItems;
                }
                if (this.chkDeleteMissingItems.Checked)
                {
                    mergeOptions |= SqlAzManMergeOptions.DeleteMissingItems;
                }
                if (this.chkCreatesNewItemAuthorizations.Checked)
                {
                    mergeOptions |= SqlAzManMergeOptions.CreatesNewItemAuthorizations;
                }
                if (this.chkOverwritesItemAuthorizations.Checked)
                {
                    mergeOptions |= SqlAzManMergeOptions.OverwritesExistingItemAuthorization;
                }
                if (this.chkDeleteMissingItemAuthorizations.Checked)
                {
                    mergeOptions |= SqlAzManMergeOptions.DeleteMissingItemAuthorizations;
                }

                frm.ShowDialog(this, fileName, importIntoObject, this.chkUsersAndGroups.Checked, this.chkDBUsers.Checked, this.chkAuthorizations.Checked, mergeOptions);
                /*Application.DoEvents();*/
            }
            catch (Exception ex)
            {
                this.ShowError(ex.Message, Globalization.MultilanguageResource.GetString("frmImportOptions_Msg10"));
            }
            finally
            {
                this.DialogResult = DialogResult.OK;
            }
        }