private void SetDataset() { foreach (var key in currentData) { ImportResultRow dr = this.dataSetImportReport.ImportResult.NewImportResultRow(); var currentValue = key; dr.pid = currentValue.id.ToString(); if (currentValue.patientData != null) { dr.DOB = currentValue.patientData.DOB; dr.FirstName = currentValue.patientData.FirstName; dr.LastName = currentValue.patientData.LastName; } dr.Failed = currentValue.failed; dr.FailedMessage = currentValue.failedMessage; dr.Skipped = currentValue.skipped; dr.OperationType = currentValue.importOperation.ToString(); if ((currentValue.skipped) || (currentValue.failed)) { this.dataSetImportReport.ImportResult.Rows.Add(dr); } setCounts(dr); } }
private void setCounts(ImportResultRow dr) { total++; switch (dr.OperationType) { case "INSERT": { if (dr.Failed) { insertFailed++; } else { insertPassed++; } break; } case "UPDATE": { if (dr.Failed) { updateFailed++; } else { updatePassed++; } break; } case "SKIPPED": { if (dr.Skipped) { skippedRow++; } break; } case "LOOKUP_USER_CONTACT": { if (dr.Skipped) { skippedRow++; } break; } case "LOOKUP_PATIENT": { if (dr.Skipped) { skippedRow++; } break; } default: break; } }
public ImportResultRowChangeEvent(ImportResultRow row, global::System.Data.DataRowAction action) { this.eventRow = row; this.eventAction = action; }