Esempio 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;
        }
Esempio n. 2
0
        private void LoadPolicy()
        {
            //int UserID = UserContext.UserID;
            //BusinessServices.User objUser = new BusinessServices.User();
            //DataTable dtUserProfiles = objUser.GetEventPeriodList(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.CheckAccepted(PolicyID, UserID))
            //{
            //    string ConfirmationMessage = objPolicy.GetConfirmationMessage(PolicyID);
            //    this.chkAgree.Text = ConfirmationMessage;
            //}
            //else
            //{
            //    this.chkAgree.Enabled = false;
            //    this.chkAgree.Checked = true;
            //    string lastAccepted = objPolicy.GetLastAccepted(UserID, UserContext.UserData.OrgID, PolicyID);
            //    this.chkAgree.Text = ResourceManager.GetString("lblLastAccepted") + " " + lastAccepted;
            //}


            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;
        }