protected override IAsyncResult BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, object state) { LoadAuthentication(context); if (EnvelopeIDs.Get(context) != null) { Query["envelope_ids"] = EnvelopeIDs.Get(context).Replace(" ", ""); } if (FromDate.Get(context) != DateTime.MinValue) { Query["from_date"] = FromDate.Get(context).ToString("s", System.Globalization.CultureInfo.InvariantCulture) + "Z"; Console.WriteLine("From Date: " + Query["from_date"]); } if (ToDate.Get(context) != DateTime.MinValue) { Query["to_date"] = ToDate.Get(context).ToString("s", System.Globalization.CultureInfo.InvariantCulture) + "Z"; Console.WriteLine("To Date: " + Query["to_date"]); } if (FromToStatus.ToString() != null && FromToStatus.ToString() != "Any") { Query["from_to_status"] = FromToStatus.ToString(); } if (Status.Get(context) != null) { Query["status"] = Status.Get(context).Replace(" ", ""); } GetEnvelopesDelegate = new Action(_ListEnvelopes); return(GetEnvelopesDelegate.BeginInvoke(callback, state)); }
protected override IAsyncResult BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, object state) { LoadAuthentication(context); if (EnvelopeIDs.Get(context) != null) { Query["envelope_ids"] = EnvelopeIDs.Get(context).Replace(" ", ""); } Query["from_date"] = FromDate.Get(context); Query["to_date"] = ToDate.Get(context); if (FromToStatus.ToString() != null && FromToStatus.ToString() != "Any") { Query["from_to_status"] = FromToStatus.ToString(); } if (Status.Get(context) != null) { Query["status"] = Status.Get(context).Replace(" ", ""); } GetEnvelopesDelegate = new Action(_ListEnvelopes); return(GetEnvelopesDelegate.BeginInvoke(callback, state)); }