/// <summary> /// Dumps all request data (parameters\records) /// </summary> /// <param name="historicalSessions"> /// historical sessions collection /// </param> private void DumpAllData(FakeCQG.CQGSessionsCollection historicalSessions) { try { long sessIndex = 1; long holidayIndex = 1; // Dump all data foreach (FakeCQG.CQGSessions sessions in historicalSessions) { DumpSessions(sessions, sessIndex); DumpHolidays(sessions.Holidays, holidayIndex); // Count current indices for sessions and holidays sessIndex += sessions.Count; holidayIndex += sessions.Holidays.Count; } ChangeControlsStatuses(); } catch (Exception ex) { modErrorHandler.ShowError("frmHistoricalSessions", "DumpAllData", ex); } }
/// <summary> /// This event is fired when the historical sessions are resolved or /// when some error has occurred during the historical sessions request processing. /// </summary> /// <param name="sessColl"> /// Reference to resolved CQGSessionsCollection /// </param> /// <param name="request"> /// Reference to CQGHistoricalSessionsRequest /// </param> /// <param name="cqg_error"> /// CQGError object describing the last error occurred during the historical sessions /// request processing or Nothing/Invalid_Error in case of no error. /// CQGCEL.IsValid(Invalid_Error) returns False. /// </param> private void CEL_HistoricalSessionsResolved(FakeCQG.CQGSessionsCollection sessColl, FakeCQG.CQGHistoricalSessionsRequest request, FakeCQG.CQGError error) { string status = (error != null) ? "Failed" : "Succeeded"; // clear all records ClearRecords(); if (error != null) { lblError.Text = error.Description; } lblStatus.Text = status; // Dump all data DumpAllData(sessColl); }