Example #1
0
        /// <summary>
        /// Render the list of bookmarks into the placeholder
        /// </summary>
        /// <param name="message">message to be display after rerender the list of bookmarks</param>
        /// <param name="err">indicate if message is an error message or not</param>
        public void Refresh(string message, bool err)
        {
            bookmarks = BookmarkRepo.GetBookmarks(UserId, "DESC");
            Render();
            string e      = err ? "true" : "false";
            string script = $"<script>displayAlert('{message}',{e});</script>";

            Page.ClientScript.RegisterStartupScript(Page.GetType(), "Javascript", script);
        }
Example #2
0
        /// <summary>
        /// Handle filter bookmarks event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnFilter_Click(object sender, EventArgs e)
        {
            string        orderBy = sortOpt.SelectedValue.Equals("New") ? "DESC" : "ASC";
            List <string> filters = new List <string>();

            if (cbReview.Checked)
            {
                filters.Add("'review'");
            }
            if (cbPublic.Checked)
            {
                filters.Add("'public'");
            }
            bookmarks = BookmarkRepo.GetBookmarks(UserId, orderBy);
            Render();
        }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     this.Master.BookmarkPageBtn.CssClass = "user_right_navlink active";
     bookmarks = BookmarkRepo.GetBookmarks(UserId, "DESC");
     Render();
 }