protected void Page_Load(object sender, EventArgs e) { try { IsUser(); if (!IsPostBack) { _blluser = new BllUser(); Dtouser = new DtoUser(); Dtouser = _blluser.GetUserGeneralInfo(UserId); TxtFname.Attributes.Add("value", Dtouser.FirstName); TxtLname.Attributes.Add("value", Dtouser.Lastname); TxtEmail.Attributes.Add("value", Dtouser.Email); if (Dtouser.ImageUrl != "") { Dtouser.ImageUrl = "/Uploads/" + Dtouser.ImageUrl + ".jpg"; } else { Dtouser.ImageUrl = "/Images/nopic.png"; } if (Dtouser.CoverPhoto != "") { Dtouser.CoverPhoto = "/Uploads/" + Dtouser.CoverPhoto + ".jpg"; } else { Dtouser.CoverPhoto = ""; } //GriduserWebsie.DataSource = bllwebsite.GetUserWebsite(UserID); //GriduserWebsie.DataBind(); } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
protected void Page_Load(object sender, EventArgs e) { try { IsUser(); if (!IsPostBack) { _blluser = new BllUser(); _dtouser = new DtoUser(); _dtouser = _blluser.GetUserGeneralInfo(GetUserId()); SetFileds(_dtouser); } TxtFname.Attributes.Add("onblur", "blurfunction('fnamespan','" + TxtFname.ClientID + "')"); TxtLname.Attributes.Add("onblur", "blurfunction('lnamespan','" + TxtLname.ClientID + "')"); } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
protected void btnsave_Click(object sender, EventArgs e) { try { UserId = GetUserId(); _blluser = new BllUser(); var flag = _blluser.UpdateUser(SetDto()); if (flag == -1) { _blluser = new BllUser(); Dtouser = new DtoUser(); Dtouser = _blluser.GetUserGeneralInfo(UserId); Dtouser.ImageUrl = "/Uploads/" + Dtouser.ImageUrl + ".jpg"; Dtouser.CoverPhoto = "/Uploads/" + Dtouser.CoverPhoto + ".jpg"; var cs = Page.ClientScript; // Check to see if the startup script is already registered. if (!cs.IsStartupScriptRegistered(GetType(), "ClosePopupScript")) { var cstext1 = "ClosePopup()"; Page.ClientScript.RegisterStartupScript(GetType(), "closed", "<script type='text/javascript'>document.getElementById('profileimg').src=" + Dtouser.ImageUrl + "; document.getElementById('proheader').style.background-image= url('.." + Dtouser.CoverPhoto + "'); </script>"); } LblEmailExsits.Visible = true; } else { Response.Redirect("Profile.aspx"); } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }
protected void Page_Load(object sender, EventArgs e) { try { IsUser(); if (!IsPostBack) { ViewState["CurrentUserProfileID"] = 0; if (Request.QueryString["Id"] != null) { ViewState["CurrentUserProfileID"] = Convert.ToInt64(Request.QueryString["Id"]); if (Convert.ToInt64(ViewState["CurrentUserProfileID"]) == 0) { ViewState["CurrentUserProfileID"] = UserId; } } else if (UserId > 0) { ViewState["CurrentUserProfileID"] = UserId; } Dtouser = new DtoUser(); _blluser = new BllUser(); Dtouser = _blluser.GetUserGeneralInfo(Convert.ToInt64(ViewState["CurrentUserProfileID"])); if (Dtouser.ImageUrl != "") { Dtouser.ImageUrl = "/Uploads/" + Dtouser.ImageUrl + ".jpg"; } else if (Dtouser.CoverPhoto != "") { Dtouser.CoverPhoto = "/Uploads/" + Dtouser.CoverPhoto + ".jpg"; } if (Imageurl != null) { } else { Ima = "../Images/no_photo.jpg"; } _blltag = new BllTag(); _bllemotion = new BllEmotions(); Lsttag = _blltag.GetTagByUser(Convert.ToInt64(ViewState["CurrentUserProfileID"])); Lstemotions = _bllemotion.spGetEmotionByUser(Convert.ToInt64(ViewState["CurrentUserProfileID"])); if (Lsttag != null && Lsttag.Count > 0) { foreach (DtoTag t in Lsttag) { Tagstring += t.TagId + ","; } hdntagstring.Value = Tagstring; } if (Lstemotions != null && Lstemotions.Count > 0) { foreach (DtoEmotions E in Lstemotions) { Emostring += E.Emotionid + ","; } hdnemostring.Value = Emostring; } } else { Response.Redirect("../Default.aspx"); } } catch (Exception ex) { ex.ToExceptionless().Submit(); } }