Ejemplo n.º 1
0
        private void LoadPolicy()
        {
            int UserID = UserContext.UserID;


            int FileID = int.Parse(Request.QueryString["FileID"].ToString());

            BusinessServices.Event objPolicy = new BusinessServices.Event();

            // if the policy as not accepted, enable to checkbox
            if (!objPolicy.CheckFileAccepted(FileID, UserID))
            {
                //string ConfirmationMessage = "I have read and understood the event";
                //this.chkAgree.Text = ConfirmationMessage;
                btnFinish.Visible = true;
            }
            else
            {
                this.chkAgree.Enabled = false;
                this.chkAgree.Checked = true;
                string lastAccepted = objPolicy.GetLastAccepted(UserID, UserContext.UserData.OrgID, FileID);
                this.chkAgree.Text = ResourceManager.GetString("lblLastAccepted") + " " + lastAccepted;
                btnFinish.Visible  = false;
            }


            DataTable dtPolicy = objPolicy.GetFileName(FileID);


            // string PolicyName = objPolicy.GetFileName(FileID);

            string FileName = dtPolicy.Rows[0]["FileName"].ToString();



            string PolicyDir = @"\General\CPDEvent\" + UserContext.UserData.OrgID.ToString();

            this.pdfFrame.Attributes["src"] = PolicyDir + @"\" + dtPolicy.Rows[0]["FileName"].ToString();
            this.pdfFrame.Visible           = true;
        }