Exemple #1
0
        public void RequestApprovalOf(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalRequest ApprovalRequest)
        {
            RequestApprovalOf inValue = new RequestApprovalOf();

            inValue.ApprovalRequest = ApprovalRequest;
            ((IApprovalProcess)(this)).RequestApprovalOf(inValue);
        }
Exemple #2
0
 public ApprovalResponse(ApprovalRequest request, bool ap)
 {
     id              = request.Id;
     documentTitle   = request.DocumentTitle;
     approved        = ap;
     concurrentIndex = request.ConcurrentIndex;
 }
Exemple #3
0
        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);
        }
Exemple #4
0
 public ApprovalRequest(ApprovalRequest old, int index)
 {
     documentTitle   = old.documentTitle;
     document        = old.document;
     approvalType    = old.approvalType;
     requester       = old.requester;
     concurrentIndex = index;
     id = old.id;
 }
 public ApprovalRequest(ApprovalRequest old, int index)
 {
     documentTitle = old.documentTitle;
     document = old.document;
     approvalType = old.approvalType;
     requester = old.requester;
     concurrentIndex = index;
     id = old.id;
 }
Exemple #6
0
 public RequestApprovalOf(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalRequest ApprovalRequest)
 {
     this.ApprovalRequest = ApprovalRequest;
 }
Exemple #7
0
 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);
 }
Exemple #10
0
 // 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);
     }
 }
 public ApprovalResponse(ApprovalRequest request, bool ap)
 {
     id = request.Id;
     documentTitle = request.DocumentTitle;
     approved = ap;
     concurrentIndex = request.ConcurrentIndex;
 }
Exemple #12
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();
        }
Exemple #13
0
 // 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);
 }