/// <summary> /// 编辑 /// </summary> /// <param name="ActivityDiscountVM"></param> /// <returns></returns> public ActionResult Edit(BusinessCommentVM _businessCommentVM) { var businessComment = _businessCommentService.GetById(_businessCommentVM.BusinessCommentId); if (businessComment != null) { _businessCommentVM.BusinessCommentId = businessComment.BusinessCommentId; _businessCommentVM.BusinessName = businessComment.BusinessInfo == null ? "" : businessComment.BusinessInfo.Name; _businessCommentVM.Contents = businessComment.Contents; _businessCommentVM.NickName = businessComment.User == null ? "" : businessComment.User.NickName; _businessCommentVM.Paging = new Paging <BusinessComment>(); _businessCommentVM.QueryName = ""; _businessCommentVM.BusinessInfoId = businessComment.BusinessInfoId; _businessCommentVM.LevelId = businessComment.LevelId.ToString(); _businessCommentVM.UserId = businessComment.UserId; _businessCommentVM.IsAnonymous = businessComment.IsAnonymous; _businessCommentVM.BusinessComment = businessComment; _businessCommentVM.Levels = _levelService.GetList(); } else { _businessCommentVM.Paging = new Paging <BusinessComment>(); _businessCommentVM.BusinessComment = businessComment; } return(View(_businessCommentVM)); }
public IActionResult Get([FromBody] CustomDataSourceRequest request) { try { var levels = _levelProvider.GetList(); DataSourceRequest req = GridUtilities.ConvertToKendoFromCustomRequest(request); var filter = levels.ToDataSourceResult(req); return(Ok(filter)); } catch (Exception) { throw; } }
public IEnumerable <Level> Get() { return(_service.GetList()); }