示例#1
0
        public ActionResult Example5()
        {
            Util.SetPersistentEncryptionKey("ExampleKey");
            var interviewFragment = GetInterviewFragment();
            var model             = new InterviewModel {
                InterviewFragment = interviewFragment
            };

            return(View(model));
        }
示例#2
0
        private static void AssembleDocuments()
        {
            Util.SetPersistentEncryptionKey("ExampleKey");
            var session = CreateWorkSession();

            while (!session.IsCompleted)
            {
                var currentWorkItem = session.CurrentWorkItem;
                if (currentWorkItem is InterviewWorkItem)
                {
                    var interviewHtmlFragment = session.GetCurrentInterview();
                    //Show interview to user, receive postback containing answers
                    var answers = GetAnswers();
                    session.FinishInterview(answers);
                }

                var docs = session.AssembleDocuments("logref");
                foreach (var doc in docs)
                {
                    //Process each document as needed. For example, save document to disk, as in Example 2.
                }
            }
        }