Exemplo n.º 1
0
 public static Campaign ToCampaign(this DataRow dr)
 {
     Campaign campaign = new Campaign();
     campaign.ID = dr.GetInt("CampaignID");
     campaign.Pixel = dr.GetString("Pixel");
     return campaign;
 }
Exemplo n.º 2
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);
     SqlHelpers.ExecuteNonQuery(cmd);
 }
Exemplo n.º 3
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);
 }