Beispiel #1
0
        internal Tek GetResult()
        {
            var tekId = NTekAppPkg.CreateTek(connection, Nc, Obozn);

            NTekAppPkg.SetWorkTek(connection, tekId);

            QM.Update(connection, "N_TEK", tekId, "NAIM_ID", NaimId);

            var marshid = QM.Insert(connection, "insert into tpp.n_marsh(n_tek_id, spr_oper_id, npp) values (:0, :1, :2)  returning n_marsh_id into :id", new object[] { tekId, SprOperId, 1 });

            var marsh = new Marsh(connection, marshid);

            marsh.AddObor(SprOborId, true);


            return(new Tek(connection, tekId));
        }
Beispiel #2
0
        public void Insert()
        {
            var cmd1 = new OracleCommand($"drop table {TABLE_NAME}", A.GRPOConnection);
            var cmd2 = new OracleCommand($"create table {TABLE_NAME} ({INT_1} int) ", A.GRPOConnection);

            try { cmd1.ExecuteNonQuery(); }
            catch (OracleException e) { if (e.Code != 942)
                                        {
                                            throw;
                                        }
            }

            cmd2.ExecuteNonQuery();

            QM.Insert(A.GRPOConnection, $"insert into {TABLE_NAME} ({INT_1}) values (1)", new object[0]);

            Assert.AreEqual(1, new Table(TABLE_NAME).Count(A.GRPOConnection));
        }