public ActionResult UpdateMemberShipPageSet(long SiteID, string PageSN, bool IsOpen) { bool Result = MemberShipPageSetDAO.UpdatePageSet(SiteID, PageSN, IsOpen); if (Result) { return(Json("success")); } else { return(Json("fail")); } }
public ActionResult UpdateMemberShipPageSort(long SiteID, string PageSN, string Type, int newSortIndex) { IEnumerable <MemberShipPageSetModel> model = MemberShipPageSetDAO.GetItems(SiteID, Type); var targetModel = model.Single(p => p.PageSN == PageSN); var modelList = model.ToList(); modelList.Remove(targetModel); modelList.Insert(newSortIndex - 1, targetModel); for (int i = 0; i < modelList.Count; i++) { MemberShipPageSetDAO.UpdatePageSetSort(SiteID, modelList[i].PageSN, (i + 1)); } return(Json("success")); }
public ActionResult GetMemberShipPageSetItems(long SiteID) { IEnumerable <MemberShipPageSetModel> model = MemberShipPageSetDAO.GetItems(SiteID); return(Json(model)); }