public static void UpdatePersonRegion(PersonRegion personRegion) { if (personRegion == null) { throw new ArgumentNullException("personRegion"); } Provider.UpdatePersonRegion(personRegion); }
public override void UpdatePersonRegion(PersonRegion personRegion) { using (var transaction = new TransactionScope(_configuration)) { var prDS = new PersonRegionDataStore(transaction); prDS.Update(personRegion); transaction.Commit(); } }
public override void CreatePersonRegion(string personId, string regionId, bool?isAdministrator, bool?isManager) { using (var transaction = new TransactionScope(_configuration)) { var psDS = new PersonRegionDataStore(transaction); var pr = new PersonRegion(); var pDS = new PersonDataStore(transaction); pr.Person = pDS.FindByKey(personId); var rDS = new RegionDataStore(transaction); pr.Region = rDS.FindByKey(regionId); if (isAdministrator != null) { pr.IsAdministrator = (bool)isAdministrator; } if (isManager != null) { pr.IsManager = (bool)isManager; } psDS.Insert(pr); transaction.Commit(); } }
public abstract void UpdatePersonRegion(PersonRegion personRegion);