Пример #1
0
    void control_gen()
    {
        scon = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=snetworking;Persist Security Info=True;User ID=aniket;Password=dakgator123;");
            SqlDataReader rd;
            bool online;
            string StatusPic;
            SqlCommand scom = new SqlCommand("select ul.UName,ul.UStatus,gi.UserName from General_Information gi INNER JOIN ULogin ul ON gi.UName = ul.UName where(ul.UName in(select Receiver from FriendInvitation where Status='True' and Sender='" + Session["UserName"].ToString() + "') ) or (ul.UName in(select Sender from FriendInvitation where Status='True' and Receiver='" + Session["UserName"].ToString() + "') )  ", scon);
            scon.Open();
            rd = scom.ExecuteReader();
            while (rd.Read())
            {
                if (rd["UStatus"].ToString() == "0")
                {
                    StatusPic = "~/images/offLine.png";
                    online=false;
                }
                else
                {
                    StatusPic = "~/images/onLine.png";
                    online=true;
                }
                GlobalMeth gm=new GlobalMeth();

                Panel1.Controls.Add(filler(rd["UserName"].ToString(), rd["UName"].ToString(), gm.getImageURL(rd["UName"].ToString()), StatusPic, online));
            }
    }
Пример #2
0
    protected void LoadProfilePic()
    {
        try
        {
            imgMain.ImageUrl = gObj.getImageURL(Session["UserName"].ToString());
        }

        catch
        {
        }
    }
Пример #3
0
 protected void loadProfilePic(String usrKey)
 {
     imgMain.ImageUrl = gObj.getImageURL(usrKey);
 }
Пример #4
0
    void control_gen()
    {
        scon = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=snetworking;Persist Security Info=True;User ID=aniket;Password=dakgator123;");
        SqlDataReader rd;
        bool          online;
        string        StatusPic;
        SqlCommand    scom = new SqlCommand("select ul.UName,ul.UStatus,gi.UserName from General_Information gi INNER JOIN ULogin ul ON gi.UName = ul.UName where(ul.UName in(select Receiver from FriendInvitation where Status='True' and Sender='" + Session["UserName"].ToString() + "') ) or (ul.UName in(select Sender from FriendInvitation where Status='True' and Receiver='" + Session["UserName"].ToString() + "') )  ", scon);

        scon.Open();
        rd = scom.ExecuteReader();
        while (rd.Read())
        {
            if (rd["UStatus"].ToString() == "0")
            {
                StatusPic = "~/images/offLine.png";
                online    = false;
            }
            else
            {
                StatusPic = "~/images/onLine.png";
                online    = true;
            }
            GlobalMeth gm = new GlobalMeth();

            Panel1.Controls.Add(filler(rd["UserName"].ToString(), rd["UName"].ToString(), gm.getImageURL(rd["UName"].ToString()), StatusPic, online));
        }
    }
Пример #5
0
 protected void loadProfileImage()
 {
     imgMain.ImageUrl = gObj.getImageURL(Session["UserName"].ToString());
 }