Beispiel #1
0
        public void update()
        {
            try
            {
                _CswNbtSchemaModTrnsctn.refreshDataDictionary();
                _CswNbtSchemaModTrnsctn.beginTransaction();

                _CswUpdateSchemaTo.CswNbtSchemaModTrnsctn = _CswNbtSchemaModTrnsctn;
                _CswUpdateSchemaTo.update();

                _CswUpdateSchemaTo.CswNbtSchemaModTrnsctn = null;

                _CswNbtSchemaModTrnsctn.commitTransaction();
            }

            catch (CswDniExceptionIgnoreDeliberately)
            {
                _UpdateSucceeded = true;
                try
                {
                    _CswNbtSchemaModTrnsctn.rollbackTransaction();
                }

                catch (Exception CommitException)
                {
                    _RollbackSucceeded = false;
                    _Message          += "Rollback failed: " + CommitException.Message + " at " + CommitException.StackTrace.ToString() + ". \r\n";
                } //
            }     //catch

            catch (Exception Exception)
            {
                _Message        += "Script for case " + _CswUpdateSchemaTo.getCaseLink() + " authored by " + _CswUpdateSchemaTo.Author + " failed. \r\n";
                _Message        += Exception.Message + " at: " + Exception.StackTrace.ToString() + ". \r\n";
                _UpdateSucceeded = false;

                try
                {
                    _CswNbtSchemaModTrnsctn.rollbackTransaction();
                }

                catch (Exception CommitException)
                {
                    _RollbackSucceeded = false;
                    _Message          += "Rollback failed: " + CommitException.Message + " at " + CommitException.StackTrace.ToString() + ". \r\n";
                } //
            }     //
        }         //beginUpdate()