Exemple #1
0
        internal Pasport GetResult()
        {
            int pspId = QM.Nextval(connection, "n_pasport_seq");

            QM.DML(connection, "insert into pasport(pasport_id,nc,npart,nplav,bsh_id, vid_proizv_id,date_zap) values (:0,:1,:2,:3,:4, :5, sysdate)", new object[] { pspId, Nc, NPart, NPlav, BshId, VidProizvId });
            QM.DML(connection, "insert into n_pasport(n_pasport_id,pasport_id) values (:0,:0)", new object[] { pspId });

            if (ShifrId != 0)
            {
                QM.DML(connection, "insert into n_pasport_shifr(n_pasport_id,uslov_shifr_id) values (:0,:1)", new object[] { pspId, ShifrId });
            }



            var psp = new Pasport(connection, pspId);

            for (var i = 0; i < ZagotCount; i++)
            {
                psp.AddZagot($"T{i}");
            }

            psp.LinkTek(TekId);
            psp.GenerateOpers();

            psp.Document.TransTo("22P_EL_PASP");
            psp.Document.Denorm();



            return(psp);
        }
Exemple #2
0
        private int NewPdrId()
        {
            var id = QM.Nextval(Connection, "seq1");

            QM.DML(GRPOConnection,
                   "insert into lns_pdr_vinov(lns_pdr_vinov_id, nc, naim) values(:0,:1,:2)",
                   new object[] { id, "22", RandomString(20) });
            return(id);
        }
Exemple #3
0
        public void AddZagot(string number)
        {
            var zagotid = QM.Nextval(connection, "seq1");

            QM.DML(connection,
                   "insert into zagot(ZAGOT_ID, PASPORT_ID, ZAG, START_VV_ZAG_STATUS_ID, VV_ZAG_STATUS_ID) values(:0, :1, :2, :3, :3)",
                   new object[] { zagotid, Id, number, ZagotType.PRODUCT }
                   );

            Ed04Pak.CreateDoc(connection, zagotid);
        }