protected void Page_Load(object sender, EventArgs e)
        {
            Configuration config = new Configuration();

            conn    = config.getConnectionString();
            connect = new SqlConnection(conn);
            getSession();
            CheckPatientSession session = new CheckPatientSession();
            bool correctSession         = session.sessionIsCorrect(username, roleId, token);

            if (!correctSession)
            {
                clearSession();
            }
            if (!IsPostBack)
            {
                fillDropLists();
                focusOnStoredQuestions();
                if (Request.UrlReferrer != null)
                {
                    previousPage = Request.UrlReferrer.ToString();
                }
                else
                {
                    previousPage = "Home.aspx";
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Configuration config = new Configuration();

            conn    = config.getConnectionString();
            connect = new SqlConnection(conn);
            getSession();
            //addSession();
            //Get from and to pages:
            string current_page = "", previous_page = "";

            if (HttpContext.Current.Request.Url.AbsoluteUri != null)
            {
                current_page = HttpContext.Current.Request.Url.AbsoluteUri;
            }
            if (Request.UrlReferrer != null)
            {
                previous_page = Request.UrlReferrer.ToString();
            }
            //Get current time:
            DateTime currentTime = DateTime.Now;
            //Get user's IP:
            string userIP = GetIPAddress();
            CheckPatientSession session = new CheckPatientSession();
            bool correctSession         = session.sessionIsCorrect(username, roleId, token, current_page, previous_page, currentTime, userIP);

            if (!correctSession)
            {
                clearSession();
            }
        }
Ejemplo n.º 3
0
        protected void initialPageAccess()
        {
            Configuration config = new Configuration();

            conn    = config.getConnectionString();
            connect = new SqlConnection(conn);
            getSession();
            //Get from and to pages:
            string current_page = "", previous_page = "";

            if (HttpContext.Current.Request.Url.AbsoluteUri != null)
            {
                current_page = HttpContext.Current.Request.Url.AbsoluteUri;
            }
            if (Request.UrlReferrer != null)
            {
                previous_page = Request.UrlReferrer.ToString();
            }
            //Get current time:
            DateTime currentTime = DateTime.Now;
            //Get user's IP:
            string userIP = GetIPAddress();
            CheckPatientSession session = new CheckPatientSession();
            bool correctSession         = session.sessionIsCorrect(username, roleId, token, current_page, previous_page, currentTime, userIP);

            if (!correctSession)
            {
                clearSession();
            }
            //lblAlerts.Text = "(" + session.countTotalAlerts() + ")";
        }
Ejemplo n.º 4
0
        protected void initialPageAccess()
        {
            Configuration config = new Configuration();

            conn    = config.getConnectionString();
            connect = new SqlConnection(conn);
            getSession();
            CheckPatientSession session = new CheckPatientSession();
            bool correctSession         = session.sessionIsCorrect(username, roleId, token);

            if (!correctSession)
            {
                clearSession();
            }

            if (session.countTotalAlerts() == 0)
            {
                lblError.Visible = true;
                lblError.Text    = "There are no new alerts!";
            }
            else
            {
                lblError.Visible = false;
            }
        }
Ejemplo n.º 5
0
        protected void initialPageAccess()
        {
            Configuration config = new Configuration();

            conn    = config.getConnectionString();
            connect = new SqlConnection(conn);
            getSession();
            CheckPatientSession session = new CheckPatientSession();
            bool correctSession         = session.sessionIsCorrect(username, roleId, token);

            if (!correctSession)
            {
                clearSession();
            }
        }
Ejemplo n.º 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Configuration config = new Configuration();

            conn    = config.getConnectionString();
            connect = new SqlConnection(conn);
            getSession();
            //addSession();
            CheckPatientSession session = new CheckPatientSession();
            bool correctSession         = session.sessionIsCorrect(username, roleId, token);

            if (!correctSession)
            {
                clearSession();
            }
        }
Ejemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (!requestedRemoveTopic && !requestedRemoveMessage)
                {
                    if (HttpContext.Current.Request.Url.AbsoluteUri != null)
                    {
                        currentPage = HttpContext.Current.Request.Url.AbsoluteUri;
                    }
                    else
                    {
                        currentPage = "Home.aspx";
                    }
                    if (Request.UrlReferrer != null)
                    {
                        previousPage = Request.UrlReferrer.ToString();
                    }
                    else
                    {
                        previousPage = "Home.aspx";
                    }
                    if (currentPage.Equals(previousPage))
                    {
                        previousPage = "Home.aspx";
                    }
                }
            }
            Configuration config = new Configuration();

            conn    = config.getConnectionString();
            connect = new SqlConnection(conn);
            getSession();
            CheckPatientSession session = new CheckPatientSession();
            bool correctSession         = session.sessionIsCorrect(username, roleId, token);

            if (!correctSession)
            {
                clearSession();
            }
            topicId = Request.QueryString["id"];
            CheckErrors check = new CheckErrors();

            if (!check.isDigit(topicId))
            {
                goBack();
            }
            int  pageNum       = Convert.ToInt32(Request.QueryString["page"]);
            bool topicApproved = isTopicApproved();

            if (!topicApproved)
            {
                topicNotApproved();
            }
            bool authorized = isUserAuthorizedToView();

            if (!authorized)
            {
                unauthorized();
            }
            showInformation(pageNum);
            checkIfTerminated();
            checkIfDeleted();
        }