/// <summary> /// Transforma un JournalReportType en un JournalReportSent /// </summary> /// <param name="journalReport">JournalReportType</param> /// <returns>JournalReportSent</returns> public static JournalReportSent Map2DB(DataCenterLogic.DataCenterTypesIDE.JournalReportType journalReport) { JournalReportSent retJournalReport = new JournalReportSent(); retJournalReport.DDPVersionNum = journalReport.DDPVersionNum; retJournalReport.JournalFile = journalReport.JournalFile; retJournalReport.Message = journalReport.Message; retJournalReport.MessageId = journalReport.MessageId; retJournalReport.MessageType = ToInt(journalReport.MessageType); retJournalReport.Originator = journalReport.Originator; retJournalReport.schemaVersion = journalReport.schemaVersion; retJournalReport.Test = ToInt(journalReport.test); retJournalReport.TimeStamp = journalReport.TimeStamp; return(retJournalReport); }
/// <summary> /// Envia un mensaje de tipo JournalReport al IDE /// </summary> /// <param name="msg">Mensaje JournalReport</param> private string SendJournalReport(Message msg) { DataCenterLogic.DataCenterTypesIDE.JournalReportType journalReport = (DataCenterLogic.DataCenterTypesIDE.JournalReportType)(msg.Body); //Send to IDE if (System.Configuration.ConfigurationManager.AppSettings["send2servers"] != "False") { journalReport.test = DataCenterLogic.DataCenterTypesIDE.testType.Item0; ideClient.JournalReport(journalReport); log.Info("SendJournalReport: journalReport sent to IDE"); } //Guarda el mensaje en la base de datos using (var dao = new JournalReportSentDataAccess()) { dao.Create(TypeHelper.Map2DB(journalReport), 1); } log.Info("JournalReport stored"); return(journalReport.MessageId); }