protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         User_Prof.FetchSearchResult(Search_Friends_rep);
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         User_Prof.FillCombo(DropDownList5, "Home_Category");
         User_Prof.FillCombo(DropDownList1, "Profession");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         User_Prof.FillCombo(DropDownList5, "Gender");
         User_Prof.FillCombo(DropDownList4, "Country");
     }
 }
        protected void Search_Friends_rep_ItemCommand(object source, RepeaterCommandEventArgs e)
        {
            field = (HiddenField)Search_Friends_rep.Items[e.Item.ItemIndex].FindControl("HiddenField1");
            Label lbl = (Label)Search_Friends_rep.Items[e.Item.ItemIndex].FindControl("Label1");
            int   id  = (int)Session["loginuser"];

            User_Prof.AddNewFriend(id, Convert.ToInt32(field.Value), lbl.Text);
            ClientScript.RegisterStartupScript(this.GetType(), "Message", "alert('File has been successfully uploaded');", true);
        }//end of adding friend
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         User_Prof.FillCombo(DropDownList1, "Video_Category");
         int uid = (int)Session["loginuser"];
         Video.FetchVideos(uid, videos_repeator);
     }
 }
 protected void FinishBtn_Click(object sender, EventArgs e)
 {
     User_Prof._Home_name  = TextBox1.Text;
     User_Prof._HomeCat_ID = Convert.ToInt16(DropDownList5.SelectedValue);
     User_Prof._Prof_ID    = Convert.ToInt16(DropDownList1.SelectedValue);
     User_Prof.Create();
     User_Prof.AddPic();
     User_Prof.AddDate();
     Session["loginuser"] = User_Prof.GetId();
     Response.Redirect("Profile.aspx");
 }
        protected void loginbtn_Click(object sender, EventArgs e)
        {
            User_Prof._Email    = Emailtxt.Text;
            User_Prof._Password = Password.Text;
            int chk = User_Prof.Login();

            if (chk == 0)
            {
                Session["loginuser"] = User_Prof.GetId();
                Response.Redirect("Profile.aspx");
            }
        }
Beispiel #8
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["loginuser"] != null)
     {
         //User_Prof.FillCombo(hcat, "Home_Category");
         int id = Convert.ToInt32(Session["loginuser"].ToString());
         User_Prof.FetchUserInfo(id);
         homebtn.Text       = User_Prof._Home_name;
         UserNamelabel.Text = User_Prof._Uname + " " + User_Prof._UFname;
         Userimage.ImageUrl = "~/Userpics/" + User_Prof._Pic_name;
         Label5.Text        = User_Prof._Prof_Description;
         Label6.Text        = User_Prof._Country_Name;
         Label7.Text        = User_Prof._DOB;
         Label8.Text        = User_Prof._Join;
         User_Prof.RetriveFriends(id, friend_rep);
     }
     else
     {
         Response.Redirect("Default.aspx");
     }
 }
Beispiel #9
0
        protected void sbmt_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(Session["loginuser"].ToString());

            User_Prof.SearchFriend(id, TextBox2.Text, friend_rep);
        }