예제 #1
0
        notificationsResponse INotificationBinding.notifications(notifications notifications1)
        {
            try
            {
                SforceService.SforceService client = new SforceService.SforceService();
                client.Url = notifications1.EnterpriseUrl;
                client.SessionHeaderValue           = new SforceService.SessionHeader();
                client.SessionHeaderValue.sessionId = notifications1.SessionId;

                List <SforceService.Opportunity> Opps = new List <SforceService.Opportunity>();
                foreach (OpportunityNotification item in notifications1.Notification)
                {
                    SforceService.Opportunity Opp = new SforceService.Opportunity();
                    Opp.Id = item.sObject.Id;
                    Opp.TrackingNumber__c = "Tracking Number (WF .NET) - " + item.Id;
                    Opps.Add(Opp);
                }

                if (Opps.Count > 0)
                {
                    client.update(Opps.ToArray());
                }
            }
            catch (Exception Ex)
            {
                ddebug("Exception: " + Ex.Message);
            }
            notificationsResponse response = new notificationsResponse();

            response.Ack = true;
            return(response);
        }
        notificationsResponse INotificationBinding.notifications(notifications notifications1)
        {
            try
            {

                SforceService.SforceService client = new SforceService.SforceService();
                client.Url = notifications1.EnterpriseUrl;
                client.SessionHeaderValue = new SforceService.SessionHeader();
                client.SessionHeaderValue.sessionId = notifications1.SessionId;

                List<SforceService.Opportunity> Opps = new List<SforceService.Opportunity>();
                foreach (OpportunityNotification item in notifications1.Notification)
                {
                    SforceService.Opportunity Opp = new SforceService.Opportunity();
                    Opp.Id = item.sObject.Id;
                    Opp.TrackingNumber__c = "Tracking Number (WF .NET) - " + item.Id;
                    Opps.Add(Opp);
                }

                if (Opps.Count > 0)
                {
                    client.update(Opps.ToArray());
                }

            }
            catch (Exception Ex)
            {
                ddebug("Exception: " + Ex.Message);
            }
            notificationsResponse response = new notificationsResponse();
            response.Ack = true;
            return response;
        }
예제 #3
0
 public notificationsResponse1(notificationsResponse notificationsResponse)
 {
     this.notificationsResponse = notificationsResponse;
 }