コード例 #1
0
        public string GetFeedback()
        {
            var db     = new DB_Handler();
            var result = db.GetFeedbackFromNoteID(Note_ID);

            if (!result.Equals(null))
            {
                Feed_ID      = result.Id;
                FeedbackText = result.FeedbackText;
            }
            if (string.IsNullOrEmpty(FeedbackText))
            {
                return("No feedback yet");
            }
            return(FeedbackText);
        }
コード例 #2
0
        private void SetValues(Exercise e)
        {
            var db     = new DB_Handler();
            var result = db.GetNoteFromExcerise(e);

            if (result.Id != 0)
            {
                Notes   = result.Notes;
                Note_ID = result.Id;
            }
            var feed = db.GetFeedbackFromNoteID(Note_ID);

            if (Feed_ID != 0)
            {
                Feed_ID      = feed.Id;
                FeedbackText = feed.FeedbackText;
            }
        }