public JsonResult GetDataSets(int setlistId) { var setlist = _setlistRepository.Get(setlistId); var vm = new { Name = setlist.Name, SetSongList = GetSetSongList(setlist), SpareList = GetSpareList(setlist), MemberArrayList = _bandRepository.GetMemberNameArrayList(setlist.Band.Id), GenreArrayList = _bandRepository.GetGenreArrayList(), TempoArrayList = _songRepository.GetTempoArrayList(), SetNumberList = setlist.SetSongs.Select(x => x.SetNumber).Distinct().ToArray(), TableColumnList = _common.GetTableColumnList(_currentUser.Id, Constants.UserTable.SetId, setlist.Band.Id) }; return Json(vm, JsonRequestBehavior.AllowGet); }
public JsonResult GetData() { var bandId = Convert.ToInt32(Session["BandId"]); var vm = new { SetlistList = GetSetlistList(), TableColumnList = _common.GetTableColumnList(_currentUser.Id, Constants.UserTable.SetlistId, bandId) }; return Json(vm, JsonRequestBehavior.AllowGet); }