コード例 #1
0
        protected override void ChangeTheObject(ClientInformationModel theModelTobeUpdated)
        {
            ListenAddressModel theAddressModel = theModelTobeUpdated.GetTheAddressModelById(_TheListenAddressId);

            if (theAddressModel == null)
            {
                throw new ApplicationException("无法找到该Id标记的地址信息");
            }
            theAddressModel.IsPermitted = SetTheListenAddressStatus();
        }
コード例 #2
0
        private void AfterChangeTheObject(ClientInformationModel theModelTobeUpdated)
        {
            ListenAddressModel listenAddressModel = theModelTobeUpdated.GetTheAddressModelById(_TheListenAddressId);

            if (!listenAddressModel.IsActivited)
            {
                return;
            }

            try
            {
                _TheClientProxy.TheServiceStatusChanged(true, listenAddressModel.ListenAddress);
            }
            catch (FaultException)
            {
                throw new ApplicationException("业务已经完成,但是通知客户端服务已经改变未能成功,可能是客户端已经关闭");
            }
        }