Exemplo n.º 1
0
 public AppointmentBookingIncentiveCampaign GetCampaignData(int id)
 {
     try
     {
         AppointmentBookingIncentiveCampaign campaign = _db.AppointmentBookingIncentiveCampaign.Find(id);
         return(campaign);
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 2
0
 public int UpdateCampaign(AppointmentBookingIncentiveCampaign campaign)
 {
     try
     {
         _db.Entry(campaign).State = EntityState.Modified;
         _db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 3
0
 public int AddCampaign(AppointmentBookingIncentiveCampaign campaign)
 {
     try
     {
         _db.AppointmentBookingIncentiveCampaign.Add(campaign);
         _db.SaveChanges();
         return(1);
     }
     catch
     {
         throw;
     }
 }
Exemplo n.º 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;
     }
 }