Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["per"] != null)
        {
            p = Session["per"] as Person;
            m.count(Session["selectid"].ToString(), out twt, out fol, out follr, out img);

            Label4.Text = twt.ToString();
            Label5.Text = fol.ToString();
            Label6.Text = follr.ToString();
            if (img == 1)
            {
                Image1.ImageUrl = "Profilepic/" + Session["selectid"].ToString() + ".jpg";
            }
            else
            {
                Image1.ImageUrl = "Profilepic/noprofile.jpg";
            }
            lblname.Text = Session["name"].ToString();
            lbluser.Text = "@" + Session["selectid"].ToString();
            check        = m.CheckUser(p.user_id, Session["selectid"].ToString());
            if (check == 0)
            {
                followuser.Visible   = true;
                unfollowuser.Visible = false;
            }
            else
            {
                unfollowuser.Visible = true;
                followuser.Visible   = false;
            }
            p = Session["per"] as Person;
            string        users = p.user_id;
            List <Person> pers  = m.users(users);
            gdvusers.DataSource = pers;
            gdvusers.DataBind();
            // p = Session["selectid"].ToString();
            // string user = per.user_id;
            //List<Tweet> tweet = m.getTweet(Session["selectid"].ToString());
            //gdvtweets.DataSource = tweet;
            //gdvtweets.DataBind();
        }
        else
        {
            Response.Redirect("~/LogIn.aspx");
        }
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["per"] != null)
        {
            if (!IsPostBack)
            {
                int twt, fol, follr, img;
                p = Session["per"] as Person;
                string user = p.user_id;
                lblname.Text = p.fullName;

                //  lbluser.Text = Session["uname"].ToString();
                lbluser.Text = "@" + user;

                m.count(user, out twt, out fol, out follr, out img);
                Label4.Text = twt.ToString();
                Label5.Text = fol.ToString();
                Label6.Text = follr.ToString();
                if (img == 1)
                {
                    Image1.ImageUrl = "Profilepic/" + user + ".jpg";
                }
                else
                {
                    Image1.ImageUrl = "Profilepic/noprofile.jpg";
                }

                p = Session["per"] as Person;
                string        users = p.user_id;
                List <Person> pers  = m.users(users);
                gdvusers.DataSource = pers;
                gdvusers.DataBind();
            }
        }
        else
        {
            Response.Redirect("~/LogIn.aspx");
        }
    }