コード例 #1
0
        public static void UpdatePersonRegion(PersonRegion personRegion)
        {
            if (personRegion == null)
            {
                throw new ArgumentNullException("personRegion");
            }

            Provider.UpdatePersonRegion(personRegion);
        }
コード例 #2
0
 public override void UpdatePersonRegion(PersonRegion personRegion)
 {
     using (var transaction = new TransactionScope(_configuration))
     {
         var prDS = new PersonRegionDataStore(transaction);
         prDS.Update(personRegion);
         transaction.Commit();
     }
 }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
 public abstract void UpdatePersonRegion(PersonRegion personRegion);