protected void SavePersonalProfile_Click(Object sender, EventArgs e) { string serviceArea = ""; EstateAgentAzure estate = new EstateAgentAzure(); //estate.SreenName = txtScreenname.Text; estate.ProfilePhotoUrl = imgProfile.ImageUrl; estate.ProfileVideoUrl = txtProfileVideo.Text; UsersTableAzure user = new UsersTableAzure(); user.Cellphone = txtCellphone.Text; user.WorkPhone = txtBusinessPhone.Text; user.PostalCode = txtZip.Text; user.EmailAddress = txtEmail.Text; user.FirstName = txtFirstName.Text; user.Surname = txtLastname.Text; user.UserName = FederationForms; estate.City = txtCity.Text; estate.Username = FederationForms; //estate.ServiceArea = txtServiceArea.Text; estate.State_Prov = ddlProvince.SelectedValue; estate.BusinessName = txtBusinessname.Text; estate.AgentAddress = txtBusinessaddress.Text; estate.TwitterUrl = txtTwitter.Text; estate.WebsiteUrl = txtWebsite.Text; estate.FaceBookUrl = txtfaceBook.Text; estate.FaxNumber = txtFaxNumber.Text; estate.Description = txtServiceDescription.Text; if (!string.IsNullOrWhiteSpace(txtServiceArea.Text)) { serviceArea = txtServiceArea.Text + "|"; } if (!string.IsNullOrWhiteSpace(txtServiceArea1.Text)) { serviceArea = serviceArea + txtServiceArea1.Text + "|"; } if (!string.IsNullOrWhiteSpace(txtServiceArea2.Text)) { serviceArea = serviceArea + txtServiceArea2.Text + "|"; } if (!string.IsNullOrWhiteSpace(txtServiceArea3.Text)) { serviceArea = serviceArea + txtServiceArea3.Text + "|"; } estate.ServiceArea = serviceArea; estate.ProfessionalTitle = txtProfessionaltitle.Text; estate.ProfessionalCategory = ddlProfessionCategory.SelectedValue; estate.UserID = Convert.ToString(hdfUserID.Value); estate.LinkedIn = txtLinkedin.Text; StringBuilder agentType = new StringBuilder(); int j = 0; for (int i = 0; i < cblAgentsSpecialties.Items.Count; i++) { if (cblAgentsSpecialties.Items[i].Selected) { if (j <= 4) { if (cblAgentsSpecialties.Items[i].Text.Contains("Other")) { agentType.Append(txtOtherAgentsSpecialties.Text); agentType.Append(";"); } else { agentType.Append(cblAgentsSpecialties.Items[i].Value.ToString()); agentType.Append(";"); } } j++; } } estate.AgentType = agentType.ToString(); estate.IPAddress = Request.UserHostAddress; Search.UpdateContact(user, hdfUserID.Value); Search.AddEstateAgent(estate, Guid.Parse(hdfEstateID.Value)); lblResult.Text = "Successfully saved"; // Response.Redirect("~/Members/UploadPictures.aspx?FromAgent=1"); }
private static void SaveEstate(UsersTableAzure user) { EstateAgentAzure estate; estate = new EstateAgentAzure(); estate.Username = user.UserName; estate.UserID = Convert.ToString(user.UserID); Search.AddEstateAgent(estate, Guid.NewGuid()); }