Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        conStr = WebConfigurationManager.ConnectionStrings["fooDBcon"].ConnectionString;
        con    = new SqlConnection(conStr);
        userID = null;


        try
        {
            userID = Request.QueryString["AccountID"].ToString();
        }
        catch
        {
            //query string is empty//
        }

        myUserID = Session["UserName"].ToString();

        if ((userID != null) && (userID != myUserID))
        {
            //Change the profile view as a stranger is trying to access this profile//
            //call a global function to see what is the relationship with this guy//
            //set the visibilty accordingly to the privacy table//

            //Finding the relationship of the user//
            relationStatus = gObj.relationMap(userID, myUserID);

            loadProfilePic(userID);
            fillName(userID);
            fillStatus(userID);
            hideMenuItems();
            changeLinkToCurrentUserID(userID);
            loadProfileInfo(userID);
        }
        if ((userID == myUserID) || (userID == null))
        {
            loadProfilePic(myUserID);
            fillName(myUserID);
            fillStatus(myUserID);
            loadProfileInfo(myUserID);
        }
    }