Beispiel #1
0
        /// <summary>
        /// Maps SurveyInfo Model to SurveyInfo DTO.
        /// </summary>
        /// <param name="customer"></param>
        /// <returns></returns>

        public static Epi.Web.Common.DTO.SurveyAnswerDTO ToSurveyAnswerDTO(SurveyAnswerModel SurveyAnswerModel)
        {
            return(new Epi.Web.Common.DTO.SurveyAnswerDTO
            {
                ResponseId = SurveyAnswerModel.ResponseId,
                SurveyId = SurveyAnswerModel.SurveyId,
                DateUpdated = SurveyAnswerModel.DateUpdated,
                DateCompleted = SurveyAnswerModel.DateCompleted,
                Status = SurveyAnswerModel.Status,
                XML = SurveyAnswerModel.XML
            });
        }
Beispiel #2
0
        public static SurveyAnswerModel ToSurveyAnswerModel(this Epi.Web.Enter.Common.DTO.SurveyAnswerDTO SurveyAnswerDTO)
        {
            SurveyAnswerModel Model = new SurveyAnswerModel();

            if (SurveyAnswerDTO != null)
            {
                Model.ResponseId    = SurveyAnswerDTO.ResponseId;
                Model.SurveyId      = SurveyAnswerDTO.SurveyId;
                Model.DateUpdated   = SurveyAnswerDTO.DateUpdated;
                Model.DateCompleted = SurveyAnswerDTO.DateCompleted;
                Model.Status        = SurveyAnswerDTO.Status;
                Model.XML           = SurveyAnswerDTO.XML;
            }
            return(Model);
        }