public ActionResult DetailEval(int id) { ViewEvaluatesGroup group = new ViewEvaluatesGroup(); ViewEvaluates eval = new ViewEvaluates(); using (EvaluatesServiceClient c = new EvaluatesServiceClient()) { eval = c.GetEvaluatesById(id); group.entity = eval; } if (eval != null) { ViewYogaUser user = clientUser.GetById(eval.Evaluateid); if (user != null) { group.FromUser = user.NickName; } ViewCenters center = client.GetById(eval.ToUid.Value); if (center != null) { group.CetnerName = center.CenterName; } } return(View(group)); }
public JsonResult Detailslistuser(string sContent) { try { list = client.GetByContent(sContent); SearchInstationInfo entity = new SearchInstationInfo(); List <SearchInstationInfo> listinfo = new List <SearchInstationInfo>(); string strUserType = ""; foreach (var item in list) { entity = new SearchInstationInfo(); ViewYogaUser userEntity = userclient.GetById(item.Uid.Value); strUserType += userEntity.UserType + ","; if (userEntity != null) { if (string.IsNullOrEmpty(userEntity.NickName)) { entity.NickName = modelsclient.GetYogisModelsById(item.Uid.Value).RealName; } else { entity.NickName = userEntity.NickName; } entity.UId = item.Uid.Value; } listinfo.Add(entity); } // ViewBag.sType = strUserType.Distinct();//判断是习练者/导师/全部 return(Json(new { code = strUserType.Distinct(), listinfo = listinfo }, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { return(Json(new { code = 1 })); } }