public void SaveCustomerMedicareAnswer(CustomerMedicareQuestionAnswerEditModel customerMedicareQuestionAnswer) { if (customerMedicareQuestionAnswer.Question != null && customerMedicareQuestionAnswer.Question.Any()) { var medicareQuestionAnswerList = customerMedicareQuestionAnswer.Question.Select(x => GetDomain(x, customerMedicareQuestionAnswer.CustomerEventId)).ToList(); var createdBy = _sessionContext.UserSession.CurrentOrganizationRole.OrganizationRoleUserId; _medicareQuestionRepository.SaveCustomerAnswer(medicareQuestionAnswerList, customerMedicareQuestionAnswer.CustomerEventId, createdBy); } }
public ActionResult SaveCustomerAnswer(CustomerMedicareQuestionAnswerEditModel model) { var list = model.Question.Select(m => new CustomerMedicareAnswer { Answer = Server.UrlDecode(m.Answer), ControlType = m.ControlType, Id = m.Id }).ToList(); model.Question = list; _customerMedicareQuestionService.SaveCustomerMedicareAnswer(model); return(Json(model, JsonRequestBehavior.AllowGet)); }