Exemplo n.º 1
0
 private void SaveReport(YesNoReport report)
 {
     if (report.Id == Guid.Empty)
     {
         report.Id = Guid.NewGuid();
         reports.Add(report);
     }
     else
     {
         reports.Update(report);
     }
 }
Exemplo n.º 2
0
        private YesNoReport GetReport(YesNoAnswerReceived e)
        {
            var report = reports.FirstOrDefault(r => r.SurveyName == e.SurveyName && r.Question == e.Question);

            if (report == null)
            {
                report            = new YesNoReport();
                report.Question   = e.Question;
                report.SurveyName = e.SurveyName;
            }

            return(report);
        }