public ItemShare Return(BorrowReturned borrow, Guid userIdentifier) { if (null == borrow) { throw new ArgumentNullException("borrow"); } if (Guid.Empty == userIdentifier) { throw new ArgumentException("user identifier"); } var sproc = new GoodsBorrowReturn() { UserIdentifier = userIdentifier, Identifier = borrow.Identifier, ReturnedOn = borrow.ReturnedOn, Comment = borrow.Comment, }; var data = sproc.CallObject <ItemShare>(); if (null != data) { this.email.BorrowReturned(data); this.activity.ReturnBorrow(data); } return(data); }
public ItemShare Return(BorrowReturned returned) { if (null == returned) { throw new ArgumentNullException("returned"); } if (Guid.Empty == returned.Identifier) { throw new ArgumentException("Identifier"); } var userId = User.Identifier(); return(this.borrow.Return(returned, userId)); }