Пример #1
0
        public void adddbo_xliff_Group_FileID(XmlNode src_group, Altova.Db.DbTreeOperations.RecordBuffer tgt_dbo_xliff_file)
        {
            // Create "dbo.xliff_Group|FileID"
            Altova.Db.DbTreeOperations.RecordBuffer new_dbo_xliff_Group_FileID =
                Altova.Db.DbTreeOperations.AddElement(tgt_dbo_xliff_file, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_dbo_altova_xliff_file_altova_dbo_xliff_Group_FileID]);
            Altova.Db.DbTreeOperations.SetValue(new_dbo_xliff_Group_FileID, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_dbo_altova_xliff_Group_altova_FileID], Altova.Db.DbTreeOperations.FindAttribute(tgt_dbo_xliff_file, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_dbo_altova_xliff_file_altova_FileID]));
            bool bRowsAffected    = false;
            bool bProcessChildren = true;
            bool bDeleteRow       = false;

            loopid(src_group, new_dbo_xliff_Group_FileID);
            if (!bRowsAffected)
            {
                ArrayList         cmdList = new ArrayList();
                Altova.Db.Command command;
                command = new Altova.Db.Command("INSERT INTO [dbo].[xliff_Group] ([FileID],[GroupText]) VALUES (?,?);  SELECT @@IDENTITY AS [GroupID]", true);
                command.AddParameter(new_dbo_xliff_Group_FileID.Get("FileID"));
                command.AddParameter(new_dbo_xliff_Group_FileID.Get("GroupText"));
                cmdList.Add(command);

                bRowsAffected = new_dbo_xliff_Group_FileID.Execute(cmdList, mTransactionHelper);
            }
            if (bProcessChildren)
            {
                looptrans_unit(src_group, new_dbo_xliff_Group_FileID);
            }
        }
Пример #2
0
        public void adddbo_xliff_Value_TransID(XmlNode src_trans_unit, Altova.Db.DbTreeOperations.RecordBuffer tgt_dbo_xliff_TransID_GroupID)
        {
            // Create "dbo.xliff_Value|TransID"
            Altova.Db.DbTreeOperations.RecordBuffer new_dbo_xliff_Value_TransID =
                Altova.Db.DbTreeOperations.AddElement(tgt_dbo_xliff_TransID_GroupID, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_dbo_altova_xliff_TransID_altova_dbo_xliff_Value_TransID]);
            Altova.Db.DbTreeOperations.SetValue(new_dbo_xliff_Value_TransID, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_dbo_altova_xliff_Value_altova_TransID], Altova.Db.DbTreeOperations.FindAttribute(tgt_dbo_xliff_TransID_GroupID, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_dbo_altova_xliff_TransID_altova_TransID]));
            bool bRowsAffected    = false;
            bool bProcessChildren = true;
            bool bDeleteRow       = false;

            loopsource(src_trans_unit, new_dbo_xliff_Value_TransID);
            looptarget(src_trans_unit, new_dbo_xliff_Value_TransID);
            if (!bRowsAffected)
            {
                ArrayList         cmdList = new ArrayList();
                Altova.Db.Command command;
                command = new Altova.Db.Command("INSERT INTO [dbo].[xliff_Value] ([TransID],[Source],[Target]) VALUES (?,?,?);  SELECT @@IDENTITY AS [ValueID]", true);
                command.AddParameter(new_dbo_xliff_Value_TransID.Get("TransID"));
                command.AddParameter(new_dbo_xliff_Value_TransID.Get("Source"));
                command.AddParameter(new_dbo_xliff_Value_TransID.Get("Target"));
                cmdList.Add(command);

                bRowsAffected = new_dbo_xliff_Value_TransID.Execute(cmdList, mTransactionHelper);
            }
        }
Пример #3
0
        public void adddbo_xliff_file(XmlNode src_file, System.Data.IDbConnection tgt_EPRTRcms)
        {
            // Create "dbo.xliff_file"
            Altova.Db.DbTreeOperations.RecordBuffer new_dbo_xliff_file =
                Altova.Db.DbTreeOperations.AddElement(tgt_EPRTRcms, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_altova_EPRTRcms_altova_dbo_xliff_file]);
            bool bRowsAffected    = false;
            bool bProcessChildren = true;
            bool bDeleteRow       = false;

            loopdatatype(src_file, new_dbo_xliff_file);
            loopsource_language(src_file, new_dbo_xliff_file);
            looptarget_language(src_file, new_dbo_xliff_file);
            if (!bRowsAffected)
            {
                ArrayList         cmdList = new ArrayList();
                Altova.Db.Command command;
                command = new Altova.Db.Command("INSERT INTO [dbo].[xliff_file] ([DataType],[SourceLanguage],[TargetLanguage]) VALUES (?,?,?);  SELECT @@IDENTITY AS [FileID]", true);
                command.AddParameter(new_dbo_xliff_file.Get("DataType"));
                command.AddParameter(new_dbo_xliff_file.Get("SourceLanguage"));
                command.AddParameter(new_dbo_xliff_file.Get("TargetLanguage"));
                cmdList.Add(command);

                bRowsAffected = new_dbo_xliff_file.Execute(cmdList, mTransactionHelper);
            }
            if (bProcessChildren)
            {
                loopbody(src_file, new_dbo_xliff_file);
                loopheader(src_file, new_dbo_xliff_file);
            }
        }
Пример #4
0
        public void adddbo_xliff_header_FileID(XmlNode src_header, Altova.Db.DbTreeOperations.RecordBuffer tgt_dbo_xliff_file)
        {
            // Create "dbo.xliff_header|FileID"
            Altova.Db.DbTreeOperations.RecordBuffer new_dbo_xliff_header_FileID =
                Altova.Db.DbTreeOperations.AddElement(tgt_dbo_xliff_file, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_dbo_altova_xliff_file_altova_dbo_xliff_header_FileID]);
            Altova.Db.DbTreeOperations.SetValue(new_dbo_xliff_header_FileID, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_dbo_altova_xliff_header_altova_FileID], Altova.Db.DbTreeOperations.FindAttribute(tgt_dbo_xliff_file, EPRTRcms_TypeInfo.binder.Members[EPRTRcms_TypeInfo._altova_mi_dbo_altova_xliff_file_altova_FileID]));
            bool bRowsAffected    = false;
            bool bProcessChildren = true;
            bool bDeleteRow       = false;

            loopnote(src_header, new_dbo_xliff_header_FileID);
            if (!bRowsAffected)
            {
                ArrayList         cmdList = new ArrayList();
                Altova.Db.Command command;
                command = new Altova.Db.Command("INSERT INTO [dbo].[xliff_header] ([FileID],[uid]) VALUES (?,?)", false);
                command.AddParameter(new_dbo_xliff_header_FileID.Get("FileID"));
                command.AddParameter(new_dbo_xliff_header_FileID.Get("uid"));
                cmdList.Add(command);

                bRowsAffected = new_dbo_xliff_header_FileID.Execute(cmdList, mTransactionHelper);
            }
        }