コード例 #1
0
 public AppointmentBookingIncentiveCampaign GetCampaignData(int id)
 {
     try
     {
         AppointmentBookingIncentiveCampaign campaign = _db.AppointmentBookingIncentiveCampaign.Find(id);
         return(campaign);
     }
     catch
     {
         throw;
     }
 }
コード例 #2
0
 public int UpdateCampaign(AppointmentBookingIncentiveCampaign campaign)
 {
     try
     {
         _db.Entry(campaign).State = EntityState.Modified;
         _db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
コード例 #3
0
 public int AddCampaign(AppointmentBookingIncentiveCampaign campaign)
 {
     try
     {
         _db.AppointmentBookingIncentiveCampaign.Add(campaign);
         _db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
コード例 #4
0
 //To Delete the record of a particular employee
 public int DeleteCampaign(int id)
 {
     try
     {
         AppointmentBookingIncentiveCampaign campaign = _db.AppointmentBookingIncentiveCampaign.Find(id);
         _db.AppointmentBookingIncentiveCampaign.Remove(campaign);
         _db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }