Example #1
0
        public void UpdateScoreCard(BaseScoreCard scoreCard, TimeSpan scoreCardLifeTime)
        {
            foreach (var questionScore in scoreCard.QuestionScores)
            {
                questionScore.Score = this.QuestionScores.First(q => q.Id == questionScore.Id).Score;
            }

            scoreCard.Score = new BaseScoreCardScore(scoreCard.QuestionScores);
            scoreCard.Remarks = this.Remarks;
            scoreCard.Submitted = this.Submitted;
            scoreCard.Editor = this.Editor;

            if (this.Publish)
            {
                scoreCard.State = ScoreCardState.Published;
                scoreCard.DatePublished = DateTime.Now;
                scoreCard.DateExpiration = DateTime.Now + scoreCardLifeTime;
            }
        }
Example #2
0
 private BaseJournalPrice CreateNewBaseJournalPrice(BaseScoreCard scoreCard)
 {
     return new BaseJournalPrice { BaseScoreCardId = scoreCard.Id, JournalId = scoreCard.JournalId, UserProfileId = this.Authentication.CurrentUserId, DateAdded = DateTime.Now, };
 }