Esempio n. 1
0
 public void ResponsedToApprovalRequest(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalResponse response)
 {
     base.Channel.ResponsedToApprovalRequest(response);
 }
Esempio n. 2
0
 protected override void Execute(CodeActivityContext context)
 {
     ApprovalResponse result = new ApprovalResponse(Request.Get(context), Approved.Get(context));
     Response.Set(context, result);
 }
Esempio n. 3
0
 public void ProcessResponse(ApprovalResponse response)
 {
     object requestToDel = null;
     foreach (object o in PendingList.Items)
     {
         if(((ApprovalRequest)o).Id.Equals(response.Id))
         {
             requestToDel = o;
             break;
         }
     }
     if (requestToDel != null)
     {
         lock (PendingList)
         {
             // This function may have been called from another thread so we must
             //  schedule the work with the WPF dispatcher
             PendingList.Items.Dispatcher.Invoke((Action<ApprovalRequest>)delegate(ApprovalRequest r)
                                                     { PendingList.Items.Remove(r); PendingList_SelectionChanged(this, null); },
                                                 requestToDel);
         }
         lock (ApprovedList)
         {
             ApprovedList.Items.Dispatcher.Invoke((Action<ApprovalResponse>)delegate(ApprovalResponse r) { ApprovedList.Items.Add(r); },
                                                  response);
         }
     }
 }
 // Called if the ApprovalRequestsService gets a response to a approval request generated locally
 public static void ApprovalRequestResponse(ApprovalResponse response)
 {
     if (Context != null)
         Context.ProcessResponse(response);
 }