コード例 #1
0
        protected void populate_listview()
        {
            DataSet ds = client.SelectReportedReview();

            ListViewReview.DataSource = ds;
            ListViewReview.DataBind();
        }
コード例 #2
0
        protected void populate_listview()
        {
            string selectedValue = DropDownListSort.SelectedValue.ToString();

            DataSet ds;

            if (Session["userId"] == null)
            {
                ds = client.SelectAllByBranchIdFromReview(branch.Id, selectedValue);
            }
            else
            {
                ds = client.SelectByBranchIdFromReview(branch.Id, Guid.Parse(Session["userId"].ToString()), selectedValue);
            }
            ListViewReview.DataSource = ds;
            ListViewReview.DataBind();

            if (review.Id != -1)
            {
                btnAddReview.Text       = "Edit My Review";
                lblAddReview.Text       = "Edit My Review";
                tbRating.Text           = review.Rating.ToString();
                tbReviewTitle.Text      = review.Title;
                tbReviewContent.Text    = review.Comment;
                btnDeleteReview.Visible = true;
                currentReview.Visible   = true;
            }
        }