Esempio n. 1
0
        private static PatQuestion CreateQuestion(BaseViewModel vm)
        {
            var quest = new PatQuestion
            {
                CreatedOn = DateTime.Now,
                ProjectId = vm.ProjectId
            };

            return(quest);
        }
Esempio n. 2
0
        private static void AddQuestionToList(ICollection <PatQuestion> list, IDataRecord rdr)
        {
            var entity = new PatQuestion
            {
                ProjectQuestionId = (int)rdr["ProjectQuestionId"],
                ProjectId         = (int)rdr["ProjectId"],
                Type         = rdr["QuestionType"] as string,
                Text         = rdr["QuestionText"] as string,
                AnswerColumn = rdr["AnswerColumn"] as string,
                CreatedBy    = rdr["CreatedBy"] as string,
                CreatedOn    = rdr["CreatedOn"] as DateTime? ?? default(DateTime),
                UpdatedBy    = rdr["UpdatedBy"] as string,
                UpdatedOn    = rdr["UpdatedOn"] as DateTime? ?? default(DateTime)
            };

            list.Add(entity);
        }