protected void btnSave_Click(object sender, EventArgs e) { BasicInfoBO objBasicInfo = new BasicInfoBO(); objBasicInfo.UserId = Userid; objBasicInfo.CityTown = txtTownCity.Text; objBasicInfo.Address = txtAddress.Text; objBasicInfo.ZipCode = txtZipCode.Text; objBasicInfo.Neighbourhood = txtNeighbourhood.Text; BasicInfoBLL.updateContactInfoPage(objBasicInfo); UpdateEmail(); LoadContactInfo(); PostProperties postProp = new PostProperties(); postProp.PostText = Global.POST_CHANGED_CONTACT_INFO; postProp.WallOwnerUserId = Userid; postProp.PostedByUserId = Userid; postProp.PostType = Global.PROFILE_CHANGE; postProp.EmbedPost = null; PostOnWall.post(postProp); imgSave.Visible = true; lblSave.Visible = true; }
protected void WallPost() { PostProperties postProp = new PostProperties(); postProp.PostText = Global.POST_PROFILE_PICTIRE_CHANGE; postProp.WallOwnerUserId = Userid; postProp.PostedByUserId = Userid; postProp.PostType = Global.PROFILE_CHANGE; postProp.EmbedPost = null; PostOnWall.post(postProp); }
protected void btnSave_Click(object sender, EventArgs e) { saveRelationshipStatus(); imgSave.Visible = true; lblSave.Visible = true; PostProperties postProp = new PostProperties(); postProp.PostText = Global.POST_CHANGED_ENTERTAINMENT; postProp.WallOwnerUserId = Userid; postProp.PostedByUserId = Userid; postProp.PostType = Global.PROFILE_CHANGE; postProp.EmbedPost = null; PostOnWall.post(postProp); }
protected void btnSave_Click(object sender, EventArgs e) { SaveSports(); SaveTeam(); SaveAthelete(); imgSave.Visible = true; lblSave.Visible = true; PostProperties postProp = new PostProperties(); postProp.PostText = Global.POST_USER_CHNAGED_SPORTS; postProp.WallOwnerUserId = Userid; postProp.PostedByUserId = Userid; postProp.PostType = Global.PROFILE_CHANGE; postProp.EmbedPost = null; PostOnWall.post(postProp); }
protected void btnSave_Click(object sender, EventArgs e) { int year = Convert.ToInt32(lstYear.SelectedValue); int month = Convert.ToInt32(lstMonth.SelectedValue); int day = Convert.ToInt32(lstDay.SelectedValue); DateTime birthDate = new DateTime(year, month, day); DateTime now = DateTime.Today; int age = now.Year - Convert.ToInt32(lstYear.SelectedValue); if (now < birthDate.AddYears(age)) { age--; } if (age < 13) { CustomValidator1.IsValid = false; } if (Page.IsValid) { BasicInfoBO objBasicInfo = new BasicInfoBO(); objBasicInfo.UserId = Userid; objBasicInfo.CurrentCity = txtCurrentCity.Text; objBasicInfo.HomeTown = txtHometown.Text; BasicInfoBLL.updateBasicInfoPage(objBasicInfo); // BasicInfoBLL.updateTownCity(txtCurrentCity.Text, txtHometown.Text, 1); UpdateUserInfo(); LoadUserInfo(); LoadBasicInfo(); imgSave.Visible = true; lblSave.Visible = true; PostProperties postProp = new PostProperties(); postProp.PostText = Global.POST_CHANGED_BASIC_INFO; postProp.WallOwnerUserId = Userid; postProp.PostedByUserId = Userid; postProp.PostType = Global.PROFILE_CHANGE; postProp.EmbedPost = null; PostOnWall.post(postProp); } }
protected void btnSave_Click(object sender, EventArgs e) { SaveActivities(); SaveInterests(); PostProperties postProp = new PostProperties(); postProp.PostText = Global.POST_ACTIVITY_TEXT; postProp.WallOwnerUserId = Userid; postProp.PostedByUserId = Userid; postProp.PostType = Global.PROFILE_CHANGE; postProp.EmbedPost = null; PostOnWall.post(postProp); LoadDataListActivities(); LoadDataListInterests(); imgSave.Visible = true; lblSave.Visible = true; }
protected void btnSave_Click(object sender, EventArgs e) { SaveBooks(); SaveMusic(); SaveMovie(); SaveTelevision(); SaveGame(); imgSave.Visible = true; lblSave.Visible = true; PostProperties postProp = new PostProperties(); postProp.PostText = Global.POST_CHANGED_RELATIONSHIP_STATUS; postProp.WallOwnerUserId = Userid; postProp.PostedByUserId = Userid; postProp.PostType = Global.PROFILE_CHANGE; postProp.EmbedPost = null; PostOnWall.post(postProp); }
protected void btnSave_Click(object sender, EventArgs e) { SaveEmployer(); SaveProject(); SaveUniversity(); SaveSchool(); LoadDataListEmployer(); LoadDataListProject(); LoadDataListUniversity(); LoadDataListSchool(); imgSave.Visible = true; lblSave.Visible = true; PostProperties postProp = new PostProperties(); postProp.PostText = Global.POST_CHANGED_EDUCATION_WORK; postProp.WallOwnerUserId = Userid; postProp.PostedByUserId = Userid; postProp.PostType = Global.PROFILE_CHANGE; postProp.EmbedPost = null; PostOnWall.post(postProp); }
protected void ShareStatus(string post) { string status = post; if (lblFriendsWith.Text != "") { status += " with " + lblFriendsWith.Text.Remove(lblFriendsWith.Text.LastIndexOf(",")); } if (lblLocation.Text != "") { status += lblLocation.Text; } UserBO objUser = new UserBO(); objUser = UserBLL.getUserByUserId(SessionClass.getUserId()); WallBO objWall = new WallBO(); string PostedByUserId = SessionClass.getUserId(); string WallOwnerUserId = string.Empty; if (SessionClass.getShareWithID() != null) { PostedByUserId = Session["UserId"].ToString(); if (SessionClass.getShareWithID() != "") { WallOwnerUserId = SessionClass.getShareWithID(); UserBO objFriendObj = new UserBO(); objFriendObj = UserBLL.getUserByUserId(SessionClass.getShareWithID()); if (!CheckBox1.Checked) { ThreadPool.QueueUserWorkItem(new WaitCallback(sendEmail), (object)objFriendObj.Email); notif(SessionClass.getShareWithID(), SessionClass.getPostID()); } List <string> temp = (List <string>)SessionClass.getTaggedFriends(); if (temp != null) { foreach (string str in temp) { UserBO objFriendObj1 = new UserBO(); objFriendObj1 = UserBLL.getUserByUserId(str); //sendEmail(objFriendObj1.Email); if (!CheckBox1.Checked) { ThreadPool.QueueUserWorkItem(new WaitCallback(sendEmail), (object)objFriendObj1.Email); notif(str, SessionClass.getPostID()); } //Inserting follow post record for each tagged user FollowPostBO fp = new FollowPostBO(); fp.AtId = SessionClass.getPostID(); fp.UserId = objFriendObj1.Id; fp.FirstName = objFriendObj1.FirstName; fp.LastName = objFriendObj1.LastName; fp.Type = Global.WALL; FollowPostBLL.insertFollowPost(fp); } } } else { WallOwnerUserId = SessionClass.getUserId(); UserBO objUserEmail = new UserBO(); objUserEmail = UserBLL.getUserByUserId(SessionClass.getUserId()); // Sending notification with which the post is beind shared if (!CheckBox1.Checked) { ThreadPool.QueueUserWorkItem(new WaitCallback(sendEmail), (object)objUserEmail.Email); notif(SessionClass.getShareWithID(), SessionClass.getPostID()); } //Sending notification to all tagged friends List <string> temp = (List <string>)SessionClass.getTaggedFriends(); if (temp != null) { foreach (string str in temp) { UserBO objFriendObj1 = new UserBO(); objFriendObj1 = UserBLL.getUserByUserId(str); if (!CheckBox1.Checked) { ThreadPool.QueueUserWorkItem(new WaitCallback(sendEmail), (object)objFriendObj1.Email); } notif(str, SessionClass.getPostID()); //Inserting follow post record for each tagged user FollowPostBO fp = new FollowPostBO(); fp.AtId = SessionClass.getPostID(); fp.UserId = objFriendObj1.Id; fp.FirstName = objFriendObj1.FirstName; fp.LastName = objFriendObj1.LastName; fp.Type = Global.WALL; FollowPostBLL.insertFollowPost(fp); } } } } else { WallOwnerUserId = SessionClass.getUserId(); UserBO objUserEmail = new UserBO(); objUserEmail = UserBLL.getUserByUserId(SessionClass.getUserId()); if (!CheckBox1.Checked) { ThreadPool.QueueUserWorkItem(new WaitCallback(sendEmail), (object)objUserEmail.Email); } //Sending notification to all tagged friends List <string> temp = (List <string>)SessionClass.getTaggedFriends(); if (temp != null) { foreach (string str in temp) { UserBO objFriendObj1 = new UserBO(); objFriendObj1 = UserBLL.getUserByUserId(str); // sendEmail(objFriendObj1.Email); if (!CheckBox1.Checked) { ThreadPool.QueueUserWorkItem(new WaitCallback(sendEmail), (object)objFriendObj1.Email); notif(str, SessionClass.getPostID()); } //Inserting follow post record for each tagged user FollowPostBO fp = new FollowPostBO(); fp.AtId = SessionClass.getPostID(); fp.UserId = objFriendObj1.Id; fp.FirstName = objFriendObj1.FirstName; fp.LastName = objFriendObj1.LastName; fp.Type = Global.WALL; FollowPostBLL.insertFollowPost(fp); } } } PostProperties postProp = new PostProperties(); postProp.PostText = "Share a post " + status; postProp.WallOwnerUserId = WallOwnerUserId; postProp.PostedByUserId = PostedByUserId; postProp.PostType = SessionClass.getPostType(); postProp.EmbedPost = SessionClass.getEmbedPost(); PostOnWall.post(postProp); ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "myScript", "document.getElementById('" + txtUpdatePost.ClientID + "').value = '';", true); lblLocation.Text = ""; lblFriendsWith.Text = ""; LoadWall(100); Session["ShareWithID"] = ""; Session["TaggedFriends"] = null; }