/// <remarks/> public void GetListAsync(GetListRequest GetListRequest, object userState) { if ((this.GetListOperationCompleted == null)) { this.GetListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetListOperationCompleted); } this.InvokeAsync("GetList", new object[] { GetListRequest}, this.GetListOperationCompleted, userState); }
private void GetActivityID(string ActivityCode) { ActivityID = 0; //Initialize GetList Request GetList.GetListRequest requestGetList = new GetList.GetListRequest(); requestGetList.TokenId = tokenId; //Instantiate a new GetList service and url. GetList.GetListWebService serviceGetList = new GetList.GetListWebService(); string urlGetList = System.Configuration.ConfigurationManager.AppSettings["GetListURL"]; serviceGetList.Url = urlGetList; //syCampusID Code from syCampus //6 CGHS //Create the request int[] campusIds = new int[1] { 6 }; //create the array for campusIds parameter, not used in filtering ActivityTemplate results. requestGetList.ListFilteredInMsgs = new GetList.ListFilteredInMsg[] { CreateInMsgFiltered(GetList.EntityTypeFiltered.ActivityTemplate, true, campusIds, new GetList.CustomAttributeMsg[] { WsCreateCustomAttribute("EventTypeID", EventType.ToString()) //cmEventType EMAILSTU = 9 } ) //EMAIL = 8 }; //Create GetList Response and pass in the request through the GetList service GetList.GetListResponse responseGetList = serviceGetList.GetList(requestGetList); //Check GetList Response - If not "OK" then handle somehow somewhere. if (responseGetList.TrxResult == "OK") { int i = responseGetList.FilteredLists[0].Items.Length; int j = 0; do { if (string.Compare(responseGetList.FilteredLists[0].Items[j].Code.Trim(), ActivityCode.Trim(), true) == 0) { ActivityID = responseGetList.FilteredLists[0].Items[j].Id; break; } j++; } while (j < i); } }
/// <remarks/> public void GetListAsync(GetListRequest GetListRequest) { this.GetListAsync(GetListRequest, null); }