예제 #1
0
        protected void btnFinish_Click(object sender, System.EventArgs e)
        {
            int FileID        = int.Parse(Request.QueryString["FileID"].ToString());
            int EventPeriodId = int.Parse(Request.QueryString["EventPeriodId"].ToString());
            int UserID        = UserContext.UserID;


            BusinessServices.Event objEvent = new BusinessServices.Event();
            // Only want to do anything if user has read and understood the policy
            if (this.chkAgree.Checked)
            {
                // Check if policy marked as accepted
                // If not then mark user as accepted the policy
                if (!objEvent.CheckFileAccepted(FileID, UserID))
                {
                    objEvent.AcceptFile(FileID, UserID);
                }
            }
            // Response.Redirect("/MyTraining.aspx");
            Response.Write("<script language='javascript'> {opener.location.reload(); self.close(); }</script>");
            //Page.ClientScript.RegisterOnSubmitStatement(typeof(Page), "closePage", "window.onunload = CloseWindow();");
        }