Пример #1
0
 //Package Benefits
 public void AddPackageBenefit(List <BenefitView> model, int packID)
 {
     using (var prepo = new PackageBenefitRepository())
     {
         List <BenefitView> m = new List <BenefitView>();
         m = model;
         var ben = new PackageBenefit();
         {
             foreach (var x in m)
             {
                 //if (prepo.GetAll().Where(q => q.benefitID == x.benefitID && q.packageID == packID) == null)
                 //{
                 if (x.isBenefitSelected == true)
                 {
                     ben.benefitID = x.benefitID;
                     ben.packageID = packID;
                     prepo.Insert(ben);
                 }
                 //}
             }
         };
     }
 }
Пример #2
0
 public void Update(PackageBenefit model)
 {
     _loRepository.Update(model);
 }
Пример #3
0
 public void Delete(PackageBenefit model)
 {
     _loRepository.Delete(model);
 }
Пример #4
0
 public void Insert(PackageBenefit model)
 {
     _loRepository.Insert(model);
 }