/// <summary> /// Accept Free Request /// </summary> /// <param name="userIdentifier">User Identifier</param> /// <param name="identifier">Identifier</param> /// <param name="comment">Comment</param> /// <returns>Result</returns> public ItemFree Accept(Guid userIdentifier, Guid identifier, string comment = null) { if (Guid.Empty == userIdentifier) { throw new ArgumentException("userIdentifier"); } if (Guid.Empty == identifier) { throw new ArgumentException("identifier"); } var sproc = new GoodsSaveItemFree() { Identifier = identifier, UserIdentifier = userIdentifier, Status = (byte?)FreeStatus.Accepted, Comment = comment, }; var free = sproc.CallObject <ItemFree>(); if (null != free) { this.emailCore.FreeAccepted(free); this.activityCore.AcceptFree(free); } return(free); }
/// <summary> /// Cancel Free Request /// </summary> /// <param name="userIdentifier">User Identifier</param> /// <param name="identifier">Identifier</param> public void Cancel(Guid userIdentifier, Guid identifier) { if (Guid.Empty == userIdentifier) { throw new ArgumentException("userIdentifier"); } if (Guid.Empty == identifier) { throw new ArgumentException("identifier"); } var sproc = new GoodsSaveItemFree() { UserIdentifier = userIdentifier, Identifier = identifier, Delete = true, }; sproc.ExecuteNonQuery(); }