private void ProcessSalesData(ICashDataReader reader) { _summary = new RequestSummary(SalesQuery); while (reader.GetNextTable()) { FuncGroup funcGroup; if (_tableFunctions.TryGetValue(reader.TableName, out funcGroup)) { while (reader.GetNextRecord()) { var dataObject = funcGroup.Constructor(); while (reader.GetNextField()) { if (!reader.FieldIsEmpty) funcGroup.PropertySetter(dataObject, reader); } funcGroup.Persister(dataObject); } } } }
/// <summary> /// Выполнение диалога /// </summary> /// <param name="summary">Результаты запроса</param> /// <param name="dataResolver">Объект для дополнительной загрузки данных</param> public void ShowDialog(RequestSummary summary, IDataResolver dataResolver) { _summary = summary; _dataResolver = dataResolver; BuildSalesView(); base.ShowDialog(); }