private static void InsertIntoRegistrationTbl_Fb(FBLoginDetails _FBLoginDetails, string accessToken) { ConnectionClass conn = new ConnectionClass(); SqlCommand cmd1 = new SqlCommand("sp_user_update_UserProfileDetails"); cmd1.Parameters.AddWithValue("@reg_uid", SessionState._SignInUser.reg_uid); cmd1.Parameters.AddWithValue("@sm_id", 1); cmd1.Parameters.AddWithValue("@name", _FBLoginDetails.Name); cmd1.Parameters.AddWithValue("@fname", _FBLoginDetails.FName); cmd1.Parameters.AddWithValue("@lname", _FBLoginDetails.LName); cmd1.Parameters.AddWithValue("@email", _FBLoginDetails.Email); cmd1.Parameters.AddWithValue("@gender", (_FBLoginDetails.Gender == "female") ? 'F' : 'M'); cmd1.Parameters.AddWithValue("@profile_img_link", _FBLoginDetails.ProfileImageUrl); cmd1.Parameters.AddWithValue("@no_of_friends", _FBLoginDetails.NoOfFriends); cmd1.Parameters.AddWithValue("@no_of_likes", "0"); cmd1.Parameters.AddWithValue("@profile_url", _FBLoginDetails.ProfileUrl); cmd1.Parameters.AddWithValue("@sm_uid", _FBLoginDetails.ID); cmd1.Parameters.AddWithValue("@token", accessToken); conn.ExecuteNonQuery(cmd1); }
protected void rpSocialProf_ItemCommand(object source, RepeaterCommandEventArgs e) { Int64 sm_id = Convert.ToInt64(e.CommandArgument); ConnectionClass conn = new ConnectionClass(); SqlCommand cmd = new SqlCommand("sp1_brandyy_Set_User_Photo"); cmd.Parameters.AddWithValue("@reg_uid", SessionState._SignInUser.reg_uid); cmd.Parameters.AddWithValue("@sm_id", sm_id); cmd.Parameters.Add("@returnurl", SqlDbType.VarChar, 250).Direction = ParameterDirection.Output; conn.ExecuteNonQuery(cmd); SessionState._SignInUser.profileurl = cmd.Parameters["@returnurl"].Value.ToString(); }