コード例 #1
0
        private void LoanBook(Guid copyId)
        {
            LibraryService service = ServiceFactory.CreateLibraryService();
            LoanBookRequest request = new LoanBookRequest();
            LoanBookResponse response;
            request.CopyId = copyId.ToString();
            request.MemberId = Request.QueryString["Id"];

            response = service.LoanBook(request);
        }
コード例 #2
0
        public LoanBookResponse LoanBook(LoanBookRequest request)
        {
            LoanBookResponse response = new LoanBookResponse();

            Loan loan = _loanService.Loan(new Guid(request.MemberId), new Guid(request.CopyId));

            if (loan != null)
            {
                response.loan = loan.ConvertToLoanView();
                response.Success = true;
            }
            else
            {
                response.Success = false;
            }

            return response;
        }