コード例 #1
0
 public bool DeleteSelectedPMVendorCustomerLocations(PMCustomerLOcations SelectedCustomerLocations)
 {
     using (FacilitiesEntities db = new FacilitiesEntities())
     {
         try
         {
             foreach (var data in SelectedCustomerLocations.SelectedCustomerLocations)
             {
                 var PMVendorCustomerLocations = db.PMVendorCustomerLocations.Where(a => a.PMVendorCustomerLocationId == data).ToList();
                 db.PMVendorCustomerLocations.RemoveRange(PMVendorCustomerLocations);
             }
             db.SaveChanges();
         }
         catch (Exception ex)
         {
             throw (ex);
         }
         return(true);
     }
 }
コード例 #2
0
 public bool DeleteSelectedPMVendorCustomerLocations(PMCustomerLOcations SelectedCustomerLocations)
 {
     return(repository.DeleteSelectedPMVendorCustomerLocations(SelectedCustomerLocations));
 }