Пример #1
0
        public static void Insert(Campaign campaign)
        {
            DbCommand cmd = SqlHelpers.CreateCommand(
                DataHelpers.ConnectionString, "dbo.ctx_INSERT_CAMPAIGN");

            cmd.AddInputParam("pPublisherID", DbType.Guid ,campaign.PublisherID );
            cmd.AddInputParam("pOfferID", DbType.Guid , campaign.OfferID );
            cmd.AddInputParam("pPixel", DbType.String ,campaign.Pixel );

            cmd.AddOutputParam("oCampaignID", DbType.Int32);
            //campaign.ID = new int(SqlHelpers.ExecuteScalar(cmd));

            SqlHelpers.ExecuteNonQuery(cmd);
        }
Пример #2
0
        public static void Update(Campaign campaign)
        {
            DbCommand cmd = SqlHelpers.CreateCommand
                (DataHelpers.ConnectionString, "dbo.ctx_UPDATE_CAMPAIGN");

            cmd.AddInputParam("pCampaignID", DbType.Int32, campaign.ID );
            cmd.AddInputParam("pPixel", DbType.String, campaign.Pixel );
            
            SqlHelpers.ExecuteNonQuery(cmd);
        }