public ActionResult GetAudioAndVideo(string name, int pageNumber = 1, int pageSize = 10) { ResourceBll resourceBll = new ResourceBll(); PagingObject paging = new PagingObject(pageNumber, pageSize); var list = resourceBll.GetAudioAndVideo(paging, name); SelectPageModel model = new SelectPageModel(); List <Dictionary <string, object> > listDic = new List <Dictionary <string, object> >(); foreach (var item in list) { var mediaType = CustomEnumHelper.Parse(typeof(MediaResourceTypeEnum), item.Ymr_MediaType); var option = new Dictionary <string, object>() { { "name", "(" + mediaType + ")" + item.Ymr_Name }, { "id", item.Ymr_Id } }; listDic.Add(option); } model.list = listDic; model.totalRow = paging.TotalCount; return(Json(new { Data = model })); }