public ActionResult UpdateMemberShipSocialSort(long SiteID, MemberType SocialType, int newSortIndex) { List <MemberShipRegSocialSetModels> modelList = MemberShipRegSetDAO.GetSocialItems(SiteID); var targetModel = modelList.Single(p => p.SocialType == SocialType); modelList.Remove(targetModel); modelList.Insert(newSortIndex - 1, targetModel); for (int i = 0; i < modelList.Count; i++) { MemberShipRegSetDAO.UpdateSocialItemSort(SiteID, modelList[i].SocialType, (i + 1)); } return(Json("success")); }
public ActionResult GetMemberShipSocialSetItems(long SiteID) { List <MemberShipRegSocialSetModels> model = MemberShipRegSetDAO.GetSocialItems(SiteID); return(Json(model)); }