Пример #1
0
 public string AdStatusModify(ACM.Model.AdDeploymentPeriod request)
 {
     try
     {
         using (ACM_Redesign2014Context ctx = new ACM_Redesign2014Context())
         {
             ctx.Entry(request).State = EntityState.Modified;
             ctx.SaveChanges();
         }
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "AdMod");
         throw;
     }
     return("Successfully updated");
 }
Пример #2
0
 public ACM.Model.AdDeploymentPeriod AdStatusInquiry(ACM.Model.AdDeploymentPeriod request, int deploymentPeriodId)
 {
     ACM.Model.AdDeploymentPeriod response = new ACM.Model.AdDeploymentPeriod();
     try
     {
         using (ctx = new ACM_Redesign2014Context())
         {
             ctx.Configuration.LazyLoadingEnabled   = true;
             ctx.Configuration.ProxyCreationEnabled = false;
             response = (from ad in ctx.AdDeploymentPeriods
                         where ad.CampaignId == request.CampaignId && ad.Adid == request.Adid && ad.DeploymentPeriodId == deploymentPeriodId
                         select ad).FirstOrDefault();
             ctx.Configuration.ProxyCreationEnabled = true;
         }
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "AdInq");
         throw;
     }
     return(response);
 }
Пример #3
0
 public string AdStatusModify(AdDeploymentPeriod request)
 {
     return adBO.AdStatusModify(request);
 }
Пример #4
0
 public AdDeploymentPeriod AdStatusInquiry(AdDeploymentPeriod request, int deploymentPeriodId)
 {
     return adBO.AdStatusInquiry(request, deploymentPeriodId);
 }
Пример #5
0
 public string AdStatusModify(ACM.Model.AdDeploymentPeriod request)
 {
     return(adDAO.AdStatusModify(request));
 }
Пример #6
0
 public ACM.Model.AdDeploymentPeriod AdStatusInquiry(ACM.Model.AdDeploymentPeriod request, int deploymentPeriodId)
 {
     return(adDAO.AdStatusInquiry(request, deploymentPeriodId));
 }
Пример #7
0
 public ACM.Model.AdDeploymentPeriod AdStatusInquiry(ACM.Model.AdDeploymentPeriod request, int deploymentPeriodId)
 {
     ACM.Model.AdDeploymentPeriod response = new ACM.Model.AdDeploymentPeriod();
     try
     {
         using (ctx = new ACM_Redesign2014Context())
         {
             ctx.Configuration.LazyLoadingEnabled = true;
             ctx.Configuration.ProxyCreationEnabled = false;
             response = (from ad in ctx.AdDeploymentPeriods
                         where ad.CampaignId == request.CampaignId && ad.Adid == request.Adid && ad.DeploymentPeriodId== deploymentPeriodId
                         select ad).FirstOrDefault();
             ctx.Configuration.ProxyCreationEnabled = true;
         }
     }
     catch (Exception ex)
     {
         Error.WriteException(TraceEventType.Error, ex.Message.ToString(), "AdInq");
         throw;
     }
     return response;
 }