Example #1
0
        /* private void UpdateModel(UserExamQuestionnaire model,
         *   UserExamQuestionnaire newModel)
         * {
         *   model.Update(newModel,
         *       x => x.Country,
         *       x => x.City,
         *       x => x.FirstName,
         *       x => x.Flat,
         *       x => x.House,
         *       x => x.LastName,
         *       x => x.MiddleInitial,
         *       x => x.PhoneNumber,
         *       x => x.PostalCode,
         *       x => x.Street,
         *       x => x.SylvanID,
         *       x => x.City);
         * }*/

        public void Update(UserExamQuestionnaire newModel)
        {
            var user  = AuthService.CurrentUser;
            var model = user.ExamQuestionnaire;

            newModel.UserID = user.UserID;
            if (model != null)
            {
                newModel.UserExamQuestionnaireID =
                    model.UserExamQuestionnaireID;
            }
            UserExamQuestionnaireService.UpdateOrInsert(newModel);
            AuthService.CurrentUser = null;
        }
Example #2
0
 public EditExamQuestionnaireVM(UserExamQuestionnaire examQuestionnaire)
 {
     ExamQuestionnaire = examQuestionnaire;
 }