Ejemplo n.º 1
0
 public static void UpdateAdStatusList(List<int> adIds, AdStatus adStatus)
 {
     using (AdsDataAdapter db = new AdsDataAdapter())
     {
         for (int i = 0; i < adIds.Count; i++)
             db.UpdateAdStatus(adIds[i], (int)adStatus);
     }
 }
Ejemplo n.º 2
0
 private static void CheckAdExpirations()
 {
     AdsDataComponent.AdsDataTable ads = null;
     using (AdsDataAdapter db = new AdsDataAdapter())
     {
         DateTime expiration = DateTime.Now;
         ads = db.GetExpiredAds(expiration, (int)AdStatus.Activated);
         foreach (AdsDataComponent.AdsRow ad in ads.Rows)
         {
             db.UpdateAdStatus(ad.Id, (int)AdStatus.Inactive);
         }
     }
 }
Ejemplo n.º 3
0
 public static void UpdateAdStatus(int adId, AdStatus adStatus)
 {
     using (AdsDataAdapter db = new AdsDataAdapter())
     {
         db.UpdateAdStatus(adId, (int)adStatus);
     }
 }