using (var svc = new LoyaltyService.LoyaltyClient())
{
var request = new LoyaltyService.ManagementGroupRequestOfVoucherSearchFilter();
request.Token = "Token";
request.ManagementGroup = "Management group";
var search = new LoyaltyService.VoucherSearchFilter();
search.PageNumber = 1;
search.PageSize = 100;
search.DateFrom = DateTime.Now.AddDays(-7);
search.DateTo = DateTime.Now;
search.VoucherCode = "Voucher code";
search.VoucherStatus = "VALID";
request.Value = search;
LoyaltyService.ResultOfPagedCollectionOfVoucherStub result = svc.SelectVoucherList(request);
if (result.FaultCode == 0)
{
}
else
{
throw new Exception(result.FaultDescription);
}
}