private void x_ButtonBatchSearch_Click(object sender, RoutedEventArgs e) { if (m_DataContext == null) { this.DialogResult = false; return; } m_DataContext.GetListCompleted += m_DataContext_GetListCompleted; m_DataContext.GetListAsync <CustomsWarehouse>(CommonDefinition.CustomsWarehouseTitle, CommonDefinition.GetCAMLSelectedID(x_TextBoxBatchSearch.Text, CommonDefinition.FieldBatch, CommonDefinition.CAMLTypeText) ); }
private void m_Context_CreateContextAsyncCompletedEvent(object sender, AsyncCompletedEventArgs e) { m_Context.CreateContextAsyncCompletedEvent -= m_Context_CreateContextAsyncCompletedEvent; Log = String.Format("GetData DoWork: new DataContext for url={0}.", m_URL); if (e.Cancelled) { Log = "CreateContextAsync canceled"; return; } if (e.Error != null) { ExceptionHandling(e.Error); return; } Log = String.Format(": new DataContext for url={0}.", m_URL); Debug.Assert(m_DisposalRequestLibId.HasValue, "m_SelectedID must have value"); m_Context.GetListCompleted += m_Context_GetDisposals4RequestCompleted; //Get all disposals for the request with id of m_DisposalRequestLibId m_Context.GetListAsync <CustomsWarehouseDisposal> (CommonDefinition.CustomsWarehouseDisposalTitle, CommonDefinition.GetCAMLSelectedID(m_DisposalRequestLibId.Value, CommonDefinition.FieldCWDisposal2DisposalRequestLibraryID, CommonDefinition.CAMLTypeNumber)); }