示例#1
0
 private void Apply(ReportDefinitionCreatedEvent reportDefinitionCreatedEvent)
 {
     SystemAccountKey = reportDefinitionCreatedEvent.SystemAccountKey;
     ReportName       = reportDefinitionCreatedEvent.ReportName;
     DisplayName      = reportDefinitionCreatedEvent.DisplayName;
     IsPatientCentric = reportDefinitionCreatedEvent.IsPatientCentric;
 }
示例#2
0
 /// <summary>
 ///     Handles the specified message.
 /// </summary>
 /// <param name="message">The message.</param>
 public void Handle(ReportDefinitionCreatedEvent message)
 {
     using (var connection = _connectionFactory.CreateConnection())
     {
         connection.Execute(
             @"INSERT INTO ReportModule.ReportDefinition(ReportDefinitionKey, ReportName, DisplayName, IsPatientCentric) 
                              VALUES(@ReportDefinitionKey, @ReportName, @DisplayName, @IsPatientCentric)",
             new
         {
             ReportDefinitionKey = message.Key,
             message.ReportName,
             message.DisplayName,
             message.IsPatientCentric
         });
     }
 }