コード例 #1
0
        public static int insertDatos200(mod200 omod)
        {
            int    lnResult = -1;
            string lcSql    = "";


            List <string> filtro = new List <string>();

            lcSql += "INSERT INTO P0000T200Article ";
            lcSql += "        ( ArtNr, ArtNrLimpia ,DLNr , SA, BezNr, Version )";
            lcSql += " VALUES (@ArtNr ,@ArtNrLimpia , @DLNr     , @SA, @BezNr,'2039' ) ";

            try
            {
                AccesoDatosSQLCliente oAccesoDatosSQLCliente = new AccesoDatosSQLCliente("", lcSql);
                oAccesoDatosSQLCliente.AñadirParametro("ArtNr", omod.ArtNr.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("ArtNrLimpia", omod.ArtNrLimipa.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("DLNr", omod.DLNr.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("SA", omod.SA.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("BezNr", omod.BezNr.ToString());

                oAccesoDatosSQLCliente.ConsultaSQL = lcSql;
                lnResult = oAccesoDatosSQLCliente.Ejecucion_Insert_getId();
            }
            catch (Exception ex)
            {
                //dalRutinas.LogApp("ERROR", string.Concat("dalTipos.insertDatos: ", ex.Message.ToString(), "", lcSql));
            }
            finally
            {
            }

            return(lnResult);
        }
コード例 #2
0
        public static int insertDatos209(mod209 omod)
        {
            int    lnResult = -1;
            string lcSql    = "";



            /*
             *
             *
             * CREATE TABLE [dbo].[P0000T209ArticleGTIN](
             * [ID] [bigint] IDENTITY(1,1) NOT NULL,
             * [ArtNr] [nvarchar](22) NULL,
             * [DLNr] [nvarchar](4) NULL,
             * [SA] [nvarchar](3) NULL,
             * [LKZ] [nvarchar](3) NULL,
             * [GTIN] [nvarchar](13) NULL,
             * [Exclude] [nvarchar](1) NULL,
             * [LoschFlag] [nvarchar](1) NULL,
             * [ArtNrLimpia] [nvarchar](22) NULL,
             * [Activo] [bit] NULL,
             * [Created_date] [nvarchar](20) NULL,
             * [Version] [nvarchar](4) NULL,
             *
             *
             */


            List <string> filtro = new List <string>();

            lcSql += "INSERT INTO P0000T209ArticleGTIN ";
            lcSql += "        ( ArtNr, ArtNrLimpia ,DLNr   , SA, LKZ, GTIN, Exclude, LoschFlag,  Version )";
            lcSql += " VALUES (@ArtNr ,@ArtNrLimpia , @DLNr, @SA, @LKZ,@GTIN ,@Exclude, @LoschFlag,   '2039' ) ";

            try
            {
                AccesoDatosSQLCliente oAccesoDatosSQLCliente = new AccesoDatosSQLCliente("", lcSql);
                oAccesoDatosSQLCliente.AñadirParametro("ArtNr", omod.ArtNr.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("ArtNrLimpia", omod.ArtNrLimipa.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("DLNr", omod.DLNr.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("SA", omod.SA.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("LKZ", omod.LKZ.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("GTIN", omod.GTIN.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("Exclude", omod.Exclude.ToString());
                oAccesoDatosSQLCliente.AñadirParametro("LoschFlag", omod.LoschFlag.ToString());

                oAccesoDatosSQLCliente.ConsultaSQL = lcSql;
                lnResult = oAccesoDatosSQLCliente.Ejecucion_Insert_getId();
            }
            catch (Exception ex)
            {
                //dalRutinas.LogApp("ERROR", string.Concat("dalTipos.insertDatos: ", ex.Message.ToString(), "", lcSql));
            }
            finally
            {
            }

            return(lnResult);
        }