public void Save() { user = DataObject.Load <DataObjectUser>(UserProfile.Current.UserId, null, true); int iRptItemCount = 0; List <InterestTopic> interestTopics = rptTopics.DataSource as List <InterestTopic>; foreach (InterestTopic interestTopic in interestTopics) { CheckBoxList cblSubTopic = rptTopics.Items[iRptItemCount].FindControl(string.Format("ST{0}", interestTopic.ID)) as CheckBoxList; CheckBox cbxGrp1 = rptTopics.Items[iRptItemCount].FindControl(string.Format("GRP{0}", interestTopic.ID)) as CheckBox; if (cblSubTopic != null && cbxGrp1 != null) { PropertyInfo propertyInfo = typeof(DataObjectUser).GetProperty(interestTopic.DBField); propertyInfo.SetValue(user, GetComaSeparatetdValues(cblSubTopic.Items), null); PropertyInfo propertyInfo2 = typeof(DataObjectUser).GetProperty(interestTopic.DBField + "Show"); propertyInfo2.SetValue(user, cbxGrp1.Checked, null); /*if (!string.IsNullOrEmpty(GetComaSeparatetdValues(cblSubTopic.Items))) * { * _4screen.CSB.Extensions.Business.IncentivePointsManager.AddIncentivePointEvent(string.Format("PROFILE_{0}", interestTopic.DBField.ToUpper()), UserDataContext.GetUserDataContext()); * }*/ } iRptItemCount++; } user.Update(UserDataContext.GetUserDataContext()); }
public void LbtnOpenIDRemoveClick(object sender, EventArgs e) { user.OpenID = string.Empty; user.Update(UserDataContext.GetUserDataContext()); this.LitOpenIDMsg.Text = language.GetString("MessageOpenIdRemoved"); this.LitOpenIDCur.Text = ""; }
public void Save() { user = DataObject.Load <DataObjectUser>(UserProfile.Current.UserId, null, true); StringBuilder userInput = new StringBuilder(); user.Beruf = txtBeruf.Text; user.BerufShow = cbxGrp1.Checked; user.Lebensmoto = txtMotto.Text; user.LebensmotoShow = cbxGrp1.Checked; for (int i = 0; i < talentTextboxes.Count; i++) { PropertyInfo propertyInfo = typeof(DataObjectUser).GetProperty(profileDataGeneralItems[i].DBField); propertyInfo.SetValue(user, talentTextboxes[i].Text, null); PropertyInfo propertyInfo2 = typeof(DataObjectUser).GetProperty(profileDataGeneralItems[i].DBField + "Show"); propertyInfo2.SetValue(user, cbxGrp1.Checked, null); userInput.Append(talentTextboxes[i].Text); } user.Update(UserDataContext.GetUserDataContext()); if (user.State == ObjectState.Saved) { if (userInput.Length > 0) { _4screen.CSB.Extensions.Business.IncentivePointsManager.AddIncentivePointEvent("PROFILE_WHO_AM_I", UserDataContext.GetUserDataContext()); } } }
public void OnSaveClick(object sender, EventArgs e) { user.DisplayAds = this.SHOWADSCB.Checked; user.Update(UserDataContext.GetUserDataContext()); AdWordFilterJob adWordFilterJob = new AdWordFilterJob(); adWordFilterJob.ProcessDataObjectsForUser(UserProfile.Current.UserId); }
public void Save() { user.MsgFrom = GetComaSeparatetdValues(rblMsgFrom.Items); user.MsgFromShow = true; user.GetMail = GetComaSeparatetdValues(rblEmail.Items); user.GetMailShow = true; user.Update(UserDataContext.GetUserDataContext()); }
private static void SetProfileDefaults(Guid userId) { try { DataObjectUser user = DataObject.Load <DataObjectUser>(userId); user.DisplayAds = true; user.Update(UserDataContext.GetUserDataContext()); } catch { } }
private void SaveAdressData() { if (AdressShow) { UserDataContext udc = UserDataContext.GetUserDataContext(); if (udc.IsAuthenticated) { DataObjectUser user = DataObjectUser.Load <DataObjectUser>(udc.UserID, null, true); if (this.PnlSex.Visible) { if (this.Sex.SelectedItem.Value == "0") { user.Sex = ";0;"; } else if (this.Sex.SelectedItem.Value == "1") { user.Sex = ";1;"; } } if (this.PnlName.Visible) { user.Name = this.Name.Text; } if (this.PnlVorname.Visible) { user.Vorname = this.Vorname.Text; } if (this.PnlAddressStreet.Visible) { user.AddressStreet = this.AddressStreet.Text; } if (this.PnlAddressZip.Visible) { user.AddressZip = this.AddressZip.Text; } if (this.PnlAddressZip.Visible) { user.AddressCity = this.AddressCity.Text; } //this.EMail.Text = Membership.GetUser(udc.UserId).Email; if (this.PnlPhone.Visible) { user.Phone = this.Phone.Text; } if (this.PnlMobile.Visible) { user.Mobile = this.Mobile.Text; } user.Update(UserDataContext.GetUserDataContext()); } } }
protected void lbtnDelete_Click(object sender, EventArgs e) { UserProfile.Current.UserPictureURL = string.Format("{0}", Helper.GetObjectType("User").DefaultImageURL); UserProfile.Current.Save(); lbtnDelete.Visible = false; btnAddImage.Visible = true; user.Image = string.Empty; user.Update(UserDataContext.GetUserDataContext()); LoadAnswers(); }
public void LbtnInfoCardAddClick(object sender, EventArgs e) { string secXmlToken; secXmlToken = Request.Params["SecXmlToken"]; if (!string.IsNullOrEmpty(secXmlToken)) { Token token = new Token(secXmlToken); string ppid = token.Claims[ClaimTypes.PPID]; if (!string.IsNullOrEmpty(ppid)) { user.PPID = ppid; user.Update(UserDataContext.GetUserDataContext()); this.LitInfoCardMsg.Text = language.GetString("MessageInfoCardConfirmed"); this.LitInfoCardCur.Text = ppid.CropString(20); } } else { this.LitInfoCardMsg.Text = language.GetString("MessageInfoCardNorConfirmed"); } }
public void Save() { try { MembershipUser membershipUser = Membership.GetUser(UserProfile.Current.UserId); membershipUser.Email = TxtEmail.Text; Membership.UpdateUser(membershipUser); } catch { LitEmailMsg.Text = string.Format("<div style=\"margin-top:5px;\">{0}</div>", languageProfile.GetString("MessageEmailSave")); } user = DataObject.Load <DataObjectUser>(UserProfile.Current.UserId, null, true); user.Mobile = txtMobile.Text; user.MobileShow = cbxGrp1.Checked; user.Phone = txtPhone.Text; user.PhoneShow = cbxGrp1.Checked; user.MSN = txtMSN.Text; user.MSNShow = cbxGrp2.Checked; user.Yahoo = txtYahoo.Text; user.YahooShow = cbxGrp2.Checked; user.Skype = txtSkype.Text; user.SkypeShow = cbxGrp2.Checked; user.ICQ = txtICQ.Text; user.ICQShow = cbxGrp2.Checked; user.AIM = txtAIM.Text; user.AIMShow = cbxGrp2.Checked; user.Homepage = txtHomepage.Text; user.HomepageShow = cbxGrp3.Checked; user.Blog = txtBlog.Text; user.BlogShow = cbxGrp3.Checked; user.Update(UserDataContext.GetUserDataContext()); if (user.State == ObjectState.Saved) { string strValues = txtAIM.Text + txtBlog.Text + txtHomepage.Text + txtICQ.Text + txtMobile.Text + txtMSN.Text + txtPhone.Text + txtSkype.Text + txtYahoo.Text; if (!string.IsNullOrEmpty(strValues.Trim())) { _4screen.CSB.Extensions.Business.IncentivePointsManager.AddIncentivePointEvent("PROFILE_ADDRESSES", UserDataContext.GetUserDataContext()); } } }
protected void Page_Load(object sender, EventArgs e) { user = DataObject.Load <DataObjectUser>(UserProfile.Current.UserId, null, true); if (user.State != ObjectState.Added) { if (!string.IsNullOrEmpty(user.OpenID)) { this.LitOpenIDCur.Text = user.OpenID; } else { this.LitOpenIDCur.Text = language.GetString("MessageOpenIdNone"); } } if (!IsPostBack) { OpenIdClient openID = new OpenIdClient(); switch (openID.RequestedMode) { case RequestedMode.IdResolution: openID.Identity = UserProfile.Current.OpenID; if (openID.ValidateResponse()) { OpenIdUser openIDUser = openID.RetrieveUser(); user.OpenID = openIDUser.Identity; user.Update(UserDataContext.GetUserDataContext()); UserProfile.Current.OpenID = string.Empty; UserProfile.Current.Save(); this.LitOpenIDMsg.Text = language.GetString("MessageOpenIdConfirmed"); this.LitOpenIDCur.Text = user.OpenID; } else { this.LitOpenIDMsg.Text = language.GetString("MessageOpenIdNotConfirmed"); } break; case RequestedMode.CanceledByUser: this.LitOpenIDMsg.Text = language.GetString("MessageOpenIdCanceled"); break; } } }
public void Save() { user = DataObject.Load <DataObjectUser>(UserProfile.Current.UserId, null, true); user.Interesst1 = txtIntress1.Text; user.Interesst1Show = cbxGrp1.Checked; user.Interesst2 = txtIntress2.Text; user.Interesst2Show = cbxGrp1.Checked; user.Interesst3 = txtIntress3.Text; user.Interesst3Show = cbxGrp1.Checked; user.Interesst4 = txtIntress4.Text; user.Interesst4Show = cbxGrp1.Checked; user.Interesst5 = txtIntress5.Text; user.Interesst5Show = cbxGrp1.Checked; user.Interesst6 = txtIntress6.Text; user.Interesst6Show = cbxGrp1.Checked; user.Interesst7 = txtIntress7.Text; user.Interesst7Show = cbxGrp1.Checked; user.Interesst8 = txtIntress8.Text; user.Interesst8Show = cbxGrp1.Checked; user.Interesst9 = txtIntress9.Text; user.Interesst9Show = cbxGrp1.Checked; user.Interesst10 = txtIntress10.Text; user.Interesst10Show = cbxGrp1.Checked; user.Update(UserDataContext.GetUserDataContext()); if (user.State == ObjectState.Saved) { // nur wenn etwas geändert hat string strValues = txtIntress1.Text + txtIntress2.Text + txtIntress3.Text + txtIntress4.Text + txtIntress5.Text + txtIntress6.Text + txtIntress7.Text + txtIntress8.Text + txtIntress9.Text + txtIntress10.Text; if (!string.IsNullOrEmpty(strValues.Trim())) { _4screen.CSB.Extensions.Business.IncentivePointsManager.AddIncentivePointEvent("PROFILE_OTHERINTERESSTS", UserDataContext.GetUserDataContext()); } } }
public void Save() { user = DataObject.Load <DataObjectUser>(UserProfile.Current.UserId, null, true); user.Name = txtName.Text; user.NameShow = cbxName.Checked; user.Vorname = txtVorname.Text; user.VornameShow = cbxName.Checked; user.Sex = GetComaSeparatetdValues(rblGender.Items); user.SexShow = cbxGeb.Checked; if (datBirthday.SelectedDate != null) { user.Birthday = datBirthday.SelectedDate.Value; } else { user.Birthday = null; } user.BirthdayShow = cbxGeb.Checked; user.AddressStreet = txtStreet.Text; user.AddressStreetShow = cbxStr.Checked; user.AddressZip = txtZip.Text; user.AddressZipShow = cbxStr.Checked; user.AddressCity = txtCity.Text; user.AddressCityShow = cbxStr.Checked; user.AddressLand = GetComaSeparatetdValues(ddlLand.Items); user.AddressLandShow = cbxStr.Checked; user.Languages = GetComaSeparatetdValues(ddlLanguages.Items); user.RelationStatus = GetComaSeparatetdValues(DdlStatus.Items); user.RelationStatusShow = CbPersonalShow.Checked; user.AttractedTo = GetComaSeparatetdValues(DdlAttractedTo.Items); user.AttractedToShow = CbPersonalShow.Checked; user.EyeColor = GetComaSeparatetdValues(DdlEyeColor.Items); user.EyeColorShow = CbPersonalShow.Checked; user.HairColor = GetComaSeparatetdValues(DdlHairColor.Items); user.HairColorShow = CbPersonalShow.Checked; int height, weight = 0; if (int.TryParse(TxtBodyHeight.Text, out height)) { user.BodyHeight = height; } else { user.BodyHeight = 0; } user.BodyHeightShow = CbPersonalShow.Checked; if (int.TryParse(TxtBodyWeight.Text, out weight)) { user.BodyWeight = weight; } else { user.BodyWeight = 0; } user.BodyWeightShow = CbPersonalShow.Checked; if (txtPC.Text.Length > 0) { user.PrimaryColor = txtPC.Text; } if (txtSC.Text.Length > 0) { user.SecondaryColor = txtSC.Text; } if (cbxStr.Checked) { user.Zip = txtZip.Text; user.City = txtCity.Text; if (ddlLand.SelectedValue != "Andere") { user.CountryCode = GetComaSeparatetdValues(ddlLand.Items).Replace(";", string.Empty); } else { user.CountryCode = string.Empty; } } else { user.Zip = string.Empty; user.City = string.Empty; user.CountryCode = string.Empty; } user.Update(UserDataContext.GetUserDataContext()); UserDataContext udc = UserDataContext.GetUserDataContext(); if (!(string.IsNullOrEmpty(txtName.Text) && string.IsNullOrEmpty(txtVorname.Text))) { _4screen.CSB.Extensions.Business.IncentivePointsManager.AddIncentivePointEvent("PROFILE_USER_NAME", udc); } if (DdlStatus.SelectedIndex > 0 && datBirthday.SelectedDate != null) { _4screen.CSB.Extensions.Business.IncentivePointsManager.AddIncentivePointEvent("PROFILE_USER_BASICS", udc); } if (!(string.IsNullOrEmpty(txtStreet.Text) && string.IsNullOrEmpty(txtZip.Text) && string.IsNullOrEmpty(txtCity.Text))) { _4screen.CSB.Extensions.Business.IncentivePointsManager.AddIncentivePointEvent("PROFILE_USER_ADDRESS", udc); } LoadAnswers(); txtPC.Text = ""; txtSC.Text = ""; }