コード例 #1
0
        public void RequestApprovalOf(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalRequest ApprovalRequest)
        {
            RequestApprovalOf inValue = new RequestApprovalOf();

            inValue.ApprovalRequest = ApprovalRequest;
            ((IApprovalProcess)(this)).RequestApprovalOf(inValue);
        }
コード例 #2
0
 public ApprovalResponse(ApprovalRequest request, bool ap)
 {
     id              = request.Id;
     documentTitle   = request.DocumentTitle;
     approved        = ap;
     concurrentIndex = request.ConcurrentIndex;
 }
コード例 #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);
        }
コード例 #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;
 }
コード例 #5
0
 public ApprovalRequest(ApprovalRequest old, int index)
 {
     documentTitle = old.documentTitle;
     document = old.document;
     approvalType = old.approvalType;
     requester = old.requester;
     concurrentIndex = index;
     id = old.id;
 }
コード例 #6
0
 public RequestApprovalOf(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalRequest ApprovalRequest)
 {
     this.ApprovalRequest = ApprovalRequest;
 }
コード例 #7
0
 public void CancelApprovalRequest(Microsoft.Samples.DocumentApprovalProcess.ApprovalMessageContractLibrary.ApprovalRequest request)
 {
     base.Channel.CancelApprovalRequest(request);
 }
コード例 #8
0
 public void RequestClientResponse(ApprovalRequest docApprovalRequest)
 {
     ExternalToMainComm.NewApprovalRequest(docApprovalRequest);
 }
コード例 #9
0
 public void CancelRequestClientResponse(ApprovalRequest docApprovalRequest)
 {
     ExternalToMainComm.CancelApprovalRequest(docApprovalRequest);
 }
コード例 #10
0
ファイル: Main.xaml.cs プロジェクト: tian1ll1/WPF_Examples
 // 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);
     }
 }
コード例 #11
0
 public ApprovalResponse(ApprovalRequest request, bool ap)
 {
     id = request.Id;
     documentTitle = request.DocumentTitle;
     approved = ap;
     concurrentIndex = request.ConcurrentIndex;
 }
コード例 #12
0
ファイル: Main.xaml.cs プロジェクト: tian1ll1/WPF_Examples
        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();
        }
コード例 #13
0
ファイル: Main.xaml.cs プロジェクト: tian1ll1/WPF_Examples
 // 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);
     }
 }
コード例 #14
0
 public StartApprovalParams(ApprovalRequest newRequest, Uri newServiceAddress)
 {
     request = newRequest;
     serviceAddress = newServiceAddress;
 }
コード例 #15
0
 // Called if ApprovalRequestsService got new approval request
 public static void NewApprovalRequest(ApprovalRequest request)
 {
     if (Context != null)
         Context.AddApprovalItem(request);
 }
コード例 #16
0
 // Called if ApprovalRequestsService was told to cancel an existing request
 public static void CancelApprovalRequest(ApprovalRequest request)
 {
     if (Context != null)
         Context.RemoveApprovalItem(request);
 }