예제 #1
0
        protected void lstvw_Replies_ItemDataBound(object sender, System.Web.UI.WebControls.ListViewItemEventArgs e)
        {
            Ourspace_Utilities.View util = new Ourspace_Utilities.View();
            Label PostIDLabel = (Label)e.Item.FindControl("PostIDLabel");

            Label SubjectLabel = (Label)e.Item.FindControl("SubjectLabel");
            Label lblDate = (Label)e.Item.FindControl("lblDate");
            //DateTime postDate = DateTime.Parse( FormatDate(postDate));
            // lblDate.Text = util.GetDaysAgo(postDate);
            SubjectLabel.Text = util.GetThreadName(int.Parse(PostIDLabel.Text));
        }
예제 #2
0
        protected void lstvwRecentActitity_ItemDataBound(object sender, ListViewItemEventArgs e)
        {
            Label TypeLabel = (Label)e.Item.FindControl("TypeLabel");
            Label PostIdLabel = (Label)e.Item.FindControl("PostIdLabel");
            Ourspace_Utilities.View util = new Ourspace_Utilities.View();
            if (TypeLabel.Text == "Reply")
            {
                TypeLabel.Text = Localization.GetString("Replied.Text", LocalResourceFile);
               // TypeLabel.Text = "replying to";
                Label ThreadNameLabel = (Label)e.Item.FindControl("ThreadNameLabel");
                ThreadNameLabel.Text = util.GetThreadName(int.Parse(PostIdLabel.Text));
                ThreadNameLabel.Visible = true;
            }
            else if (TypeLabel.Text == "Thumbs up" || TypeLabel.Text == "Thumbs down")
            {
                if(TypeLabel.Text == "Thumbs up")
                    TypeLabel.Text = Localization.GetString("Thumbsup.Text", LocalResourceFile);
                else
                    TypeLabel.Text = Localization.GetString("Thumbsdown.Text", LocalResourceFile);
               // TypeLabel.Text = "rating";
                Label ThreadNameLabel = (Label)e.Item.FindControl("ThreadNameLabel");
                ThreadNameLabel.Text = util.GetThreadName(int.Parse(PostIdLabel.Text));
                ThreadNameLabel.Visible = true;
            }

            //TypeLabel.Text = util.GetThreadName(int.Parse(PostIdLabel.Text));
        }