Example #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            using (SiteMapOrderHelper orderHelper = new SiteMapOrderHelper()) {
                var lst = orderHelper.CreateSiteMapList(txtMap.Text);
                orderHelper.UpdateSiteMap(SiteID, lst);
            }

            Response.Redirect(SiteData.CurrentScriptName);
        }
		protected void btnSave_Click(object sender, EventArgs e) {
			using (SiteMapOrderHelper orderHelper = new SiteMapOrderHelper()) {
				var lst = orderHelper.ParseChildPageData(txtSort.Text, guidContentID);
				orderHelper.UpdateSiteMap(SiteData.CurrentSiteID, lst);
			}

			Master.ShowSave();

			Response.Redirect(SiteData.CurrentScriptName + "?" + Request.QueryString.ToString() + Master.SavedSuffix);
		}
		public ActionResult PageChildSort(PageChildSortModel model) {
			if (model.SortChild) {
				model.SortChildren();

				return View(model);
			} else {
				using (SiteMapOrderHelper orderHelper = new SiteMapOrderHelper()) {
					var lst = orderHelper.ParseChildPageData(model.Sort, model.Root_ContentID);
					orderHelper.UpdateSiteMap(SiteData.CurrentSiteID, lst);
				}

				SetSaved();
				return RedirectToAction("PageChildSort", new { @id = model.Root_ContentID });
			}
		}
		protected ActionResult SiteMapResult(string viewName, bool? saved, List<SiteMapOrder> model) {
			using (SiteMapOrderHelper orderHelper = new SiteMapOrderHelper()) {
				orderHelper.UpdateSiteMap(this.SiteID, model);
			}

			SetSaved(saved);

			return RedirectToAction(viewName);
		}