public CommentsResponse FilterComment(int instanceId, FilterCommentViewModel filter = null) { var response = new CommentsResponse { CommentList = new List <CommentViewModel>() }; filter = filter ?? new FilterCommentViewModel(); var request = new CommentsRequest { InstanceId = instanceId, CommentTypeCode = filter.CommentTypeCode, DateFrom = filter.DateFrom, DateTo = filter.DateTo, OrderDesc = filter.OrderBy, OrganizationalUnitId = filter.OrganizationalUnitId, TopicCommentId = filter.TopicCommentId, UserName = filter.UserName, MyComments = filter.MyComments, IsCheckPublic = filter.IsCheckPublic, IsOpcAgreement = filter.IsOpcAgreement }; var filterResponse = _commentService.FilterComments(request); if (filterResponse.IsValid) { response = filterResponse; } return(response); }
public CommentsResponse GetFiltersComment(int instanceId, bool isOpcAgreement, FilterCommentViewModel filter) { CommentsRequest request = new CommentsRequest { InstanceId = instanceId, IsOpcAgreement = isOpcAgreement, TopicCommentId = filter.TopicCommentId, CommentTypeId = filter.CommentTypeId, MyComments = filter.MyComments, OrganizationalUnitId = filter.OrganizationalUnitId, DateFrom = filter.DateFrom, DateTo = filter.DateTo, UserName = filter.UserName }; return(_commentService.GetFiltersComment(request)); }