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 ActionResult UpdateEvalComm2(int id) { ViewEvaluates eval = new ViewEvaluates(); int isshow = 0; using (EvaluatesServiceClient c = new EvaluatesServiceClient()) { eval = c.GetEvaluatesById(id); if (isshow == eval.iShow) { isshow = 1; } eval.iShow = isshow; c.Update(eval); } return(RedirectToAction("DetailEval", new { id = id })); }