public void RequestApprovalOf(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalRequest ApprovalRequest) { RequestApprovalOf inValue = new RequestApprovalOf(); inValue.ApprovalRequest = ApprovalRequest; ((IApprovalProcess)(this)).RequestApprovalOf(inValue); }
public ApprovalResponse(ApprovalRequest request, bool ap) { id = request.Id; documentTitle = request.DocumentTitle; approved = ap; concurrentIndex = request.ConcurrentIndex; }
public void StartGetApproval(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalRequest Request, System.Uri ServiceAddress) { StartApprovalParams inValue = new StartApprovalParams(); inValue.Request = Request; inValue.ServiceAddress = ServiceAddress; ((IApprovalResults)(this)).StartGetApproval(inValue); }
public ApprovalRequest(ApprovalRequest old, int index) { documentTitle = old.documentTitle; document = old.document; approvalType = old.approvalType; requester = old.requester; concurrentIndex = index; id = old.id; }
public RequestApprovalOf(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalRequest ApprovalRequest) { this.ApprovalRequest = ApprovalRequest; }
public void CancelApprovalRequest(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalRequest request) { base.Channel.CancelApprovalRequest(request); }
public void RequestClientResponse(ApprovalRequest docApprovalRequest) { ExternalToMainComm.NewApprovalRequest(docApprovalRequest); }
public void CancelRequestClientResponse(ApprovalRequest docApprovalRequest) { ExternalToMainComm.CancelApprovalRequest(docApprovalRequest); }
// This allows the client side WCF services to inform the UI that there is a new item waiting for approval public void AddApprovalItem(ApprovalRequest request) { lock (approvalList) { // This function may have been called from another thread so we must // schedule the work with the WPF dispatcher approvalList.Items.Dispatcher.Invoke((Action<ApprovalRequest>)delegate(ApprovalRequest r) { approvalList.Items.Add(r); } , request); } }
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(); }
// Function called if ApprovalRequest is canceled public void RemoveApprovalItem(ApprovalRequest request) { lock (approvalList) { // This function may have been called from another thread so we must // schedule the work with the WPF dispatcher approvalList.Items.Dispatcher.Invoke((Action<ApprovalRequest>)delegate(ApprovalRequest r) { foreach (ApprovalRequest waitingRequest in approvalList.Items) { if (waitingRequest.Id == r.Id) approvalList.Items.Remove(waitingRequest); } if (approvalList.SelectedItem == null) approve.IsEnabled = false; }, request); } }
public StartApprovalParams(ApprovalRequest newRequest, Uri newServiceAddress) { request = newRequest; serviceAddress = newServiceAddress; }
// Called if ApprovalRequestsService got new approval request public static void NewApprovalRequest(ApprovalRequest request) { if (Context != null) Context.AddApprovalItem(request); }
// Called if ApprovalRequestsService was told to cancel an existing request public static void CancelApprovalRequest(ApprovalRequest request) { if (Context != null) Context.RemoveApprovalItem(request); }