Example #1
0
        private void requestApproval_Click(object sender, RoutedEventArgs e)
        {
            ApprovalRequest request = new ApprovalRequest(docName.Text, document.Text, approvalType.Text, user);

            PendingList.Items.Add(request);

            ApprovalResultsClient c = new ApprovalResultsClient(globalBinding, new EndpointAddress(addrListenForApprovalResponses));

            c.Open();
            c.StartGetApproval(request, approvalAddr.Uri);
            c.Close();
        }
Example #2
0
        private void CancelRequest_Click(object sender, RoutedEventArgs e)
        {
            ApprovalResultsClient client  = new ApprovalResultsClient(globalBinding, new EndpointAddress(addrListenForApprovalResponses));
            ApprovalRequest       request = (ApprovalRequest)PendingList.SelectedItem;

            client.Open();
            client.CancelApprovalRequest(request);
            client.Close();

            lock (PendingList)
            {
                PendingList.Items.Remove(request);
            }
            CancelRequest.IsEnabled = false;
        }