Exemplo n.º 1
0
        public AnsweredSurvey Create(AnsweredSurvey answeredsurvey)
        {
            EAnsweredSurvey eAnsweredSurvey = EAnsweredSurvey(answeredsurvey);

            eAnsweredSurvey = _iDAnsweredSurvey.Create(eAnsweredSurvey);
            return(AnsweredSurvey(eAnsweredSurvey));
        }
        private EAnsweredSurvey EAnsweredSurvey(AnsweredSurvey answeredSurvey)
        {
            EAnsweredSurvey returnEAnsweredSurvey = new EAnsweredSurvey
            {
                AnsweredSurveyId = answeredSurvey.AnsweredSurveyId,
                Name             = answeredSurvey.Name,
                ticketnumber     = answeredSurvey.ticketnumber,
                description      = answeredSurvey.description,

                AnsweredQuestions = answeredSurvey.AnsweredQuestions.Select(a => new EAnsweredQuestion
                {
                    Answer     = a.Answer,
                    QuestionId = a.QuestionId
                }).ToList(),
                //Questions = answeredSurvey.Questions.Select(a => new EQuestion
                //{
                //    QuestionId = a.QuestionId,
                //    Rate = a.Rate


                //}).ToList()



                //comments = answeredSurvey.comments.Select(a => new EComment
                //{
                //    Comments = a.Comments
                //}).ToList()
            };

            return(returnEAnsweredSurvey);
        }
Exemplo n.º 3
0
        public AnsweredSurvey Create(AnsweredSurvey answeredSurvey)
        {
            EAnsweredSurvey eAnsweredSurvey = EAnsweredSurvey(answeredSurvey);

            eAnsweredSurvey.CreatedDate = DateTime.Now;
            eAnsweredSurvey             = _iDAnsweredSurvey.Create(eAnsweredSurvey);
            return(AnsweredSurvey(eAnsweredSurvey));
        }
Exemplo n.º 4
0
        private AnsweredSurvey AnsweredSurvey(EAnsweredSurvey eAnsweredSurvey)
        {
            AnsweredSurvey returnAnsweredSurvey = new AnsweredSurvey
            {
                AnsweredSurveyId = eAnsweredSurvey.AnsweredSurveyid,
                Name             = eAnsweredSurvey.Name,
                ticketnumber     = eAnsweredSurvey.ticketnumber,
                description      = eAnsweredSurvey.description
            };

            return(returnAnsweredSurvey);
        }
Exemplo n.º 5
0
        private AnsweredSurvey AnsweredSurvey(EAnsweredSurvey eAnsweredSurvey)
        {
            return(new AnsweredSurvey
            {
                AnsweredSurveyId = eAnsweredSurvey.AnsweredSurveyId,
                SurveyId = eAnsweredSurvey.SurveyId,

                Description = eAnsweredSurvey.Description,
                FirstName = eAnsweredSurvey.FirstName,
                LastName = eAnsweredSurvey.LastName,
                MiddleName = eAnsweredSurvey.MiddleName,
                TicketNumber = eAnsweredSurvey.TicketNumber
            });
        }
Exemplo n.º 6
0
        private EAnsweredSurvey EAnsweredSurvey(AnsweredSurvey answeredSurvey)
        {
            EAnsweredSurvey returnEAnsweredSurvey = new EAnsweredSurvey
            {
                AnsweredSurveyid  = answeredSurvey.AnsweredSurveyId,
                Name              = answeredSurvey.Name,
                ticketnumber      = answeredSurvey.ticketnumber,
                description       = answeredSurvey.description,
                AnsweredQuestions = answeredSurvey.AnsweredQuestions.Select(a => new EAnsweredQuestion
                {
                    Answer     = a.Answer,
                    QuestionId = a.QuestionId
                }).ToList(),

                Questions = answeredSurvey.Questions.Select(a => new EQuestion
                {
                    QuestionId = a.QuestionId
                }).ToList()
            };

            return(returnEAnsweredSurvey);
        }
Exemplo n.º 7
0
        public AnsweredSurvey Read(int answeredsurveyId)
        {
            EAnsweredSurvey eAnsweredSurvey = _iDAnsweredSurvey.Read <EAnsweredSurvey>(a => a.AnsweredSurveyid == answeredsurveyId);

            return(AnsweredSurvey(eAnsweredSurvey));
        }