Exemple #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Submissions = CacheHandler.GetSubmissions(Cache);
     if (CookieAuthentication.IsSet(Context.Request.Cookies))
     {
         StudentID         = CookieAuthentication.GetStudentID(Context.Request.Cookies);
         CurrentSubmission = Submissions.Get(StudentID);
         if (CurrentSubmission.SubmissionIPAddress == null)
         {
             Response.Redirect("./Questionnaire.aspx", false);
             Context.ApplicationInstance.CompleteRequest();
         }
         else
         {
             ccQuestionnaire.AssociatedQuestionnaire = CurrentSubmission.Questionnaire;
             CookieAuthentication.ExpireAllCookies(Request.Cookies, Response.Cookies);
         }
     }
 }
        protected async void Page_Load(object sender, EventArgs e)
        {
            Submissions = CacheHandler.GetSubmissions(Cache);
            if (CookieAuthentication.IsSet(Context.Request.Cookies))
            {
                StudentID         = CookieAuthentication.GetStudentID(Context.Request.Cookies);
                CurrentSubmission = Submissions.Get(StudentID);
                if (CurrentSubmission.SubmissionIPAddress != null)
                {
                    Response.Redirect("./Result.aspx", false);
                    Context.ApplicationInstance.CompleteRequest();
                }
                else
                {
                    cmdConfirm.ServerClick += new EventHandler(cmdConfirm_Click);

                    if (!IsPostBack)
                    {
                        ccQuestionnaire.AssociatedQuestionnaire = CurrentSubmission.Questionnaire;
                    }
                }
            }
        }