public ResultStatus NewCopy( LossReasonGroupMaint lossReasonGroupMaint, LossReasonGroupMaint_Parameters parameters, LossReasonGroupMaint_Request request, out LossReasonGroupMaint_Result result) { result = (LossReasonGroupMaint_Result)null; this.OnBeforeCall(nameof(NewCopy), (DCObject)lossReasonGroupMaint, (Parameters)parameters, (Request)request); ResultStatus res; try { res = !this._IsTransactionOpened ? ((ILossReasonGroupMaintService)this._Channel).NewCopy(this._UserProfile, lossReasonGroupMaint, parameters, request, out result) : this.AddMethod((Method) new LossReasonGroupMaintMethod(lossReasonGroupMaint, LossReasonGroupMaintMethods.NewCopy, parameters)); } catch (Exception ex) { res = this.OnThrowException(ex); } if (res.IsSuccess) { this.OnAfterCall(nameof(NewCopy), res, (DCObject)lossReasonGroupMaint, (Parameters)parameters, (Request)request, (Result)result); } return(res); }