Exemplo n.º 1
0
        public ItemRenting Return(RentalReturned rent, Guid userIdentifier)
        {
            if (null == rent)
            {
                throw new ArgumentNullException("rent");
            }

            if (Guid.Empty == userIdentifier)
            {
                throw new ArgumentException("user identifier");
            }

            var sproc = new GoodsRentReturn()
            {
                CallerIdentifier = userIdentifier,
                Identifier       = rent.Identifier,
                ReturnedOn       = rent.ReturnedOn,
                Comment          = rent.Comment,
            };

            var data = sproc.CallObject <ItemRenting>();

            if (null != data)
            {
                this.emailCore.RentReturned(data);
                this.activityCore.ReturnRent(data);
            }

            return(data);
        }
Exemplo n.º 2
0
        public ItemRenting Return(RentalReturned returned)
        {
            if (null == returned)
            {
                throw new ArgumentNullException("returned");
            }

            if (Guid.Empty == returned.Identifier)
            {
                throw new ArgumentException("Identifier");
            }

            var userId = User.Identifier();

            return(this.rentCore.Return(returned, userId));
        }