コード例 #1
0
        /// <summary>
        /// Updates the branch office
        /// </summary>
        /// <param name="branchOffice">branchOffice</param>
        public virtual void Update(BranchOffice branchOffice)
        {
            Guard.IsNotNull(branchOffice, "branchOffice");

            // add audit history
            branchOffice.AuditHistory.Add
             (
                userActivityService.InsertActivity(SystemActivityLogTypeNames.Update,
                    branchOffice.ToString(), StateKeyManager.BRANCHOFFICE_ACTIVITY_COMMENT, branchOffice.BranchName)
             );

            this.dataRepository.Update(branchOffice);

            this.cacheManager.RemoveByPattern(BRANCHOFFICE_PATTERN_KEY);

            //event notification
            this.eventPublisher.EntityUpdated(branchOffice);
        }