Beispiel #1
0
        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();
            }
        }