/// <summary> /// モデルを取得 /// </summary> /// <returns></returns> public KptListModel GetModel(int boardId, Kpt.KptType type) { var _kptListModel = new KptListModel(); var list = tableUtils.GetKptList(boardId, type); switch (type) { case Kpt.KptType.Keep: _kptListModel.InputTitle = "Keep"; _kptListModel.InputNextType = Kpt.KptType.Problem; break; case Kpt.KptType.Problem: _kptListModel.InputTitle = "Problem"; _kptListModel.InputNextType = Kpt.KptType.Try; break; case Kpt.KptType.Try: _kptListModel.InputTitle = "Try"; _kptListModel.InputNextType = Kpt.KptType.Try; break; default: break; } // ViewModel作成 _kptListModel.KptList = list; _kptListModel.InputType = type; return(_kptListModel); }
public ActionResult KptResultList(int boardId, string type) { ViewBag.Title = string.Format("{0} 一覧画面", type.ToUpper()); var model = new KptListModel(); var kptType = (KptType)Enum.Parse(typeof(KptType), type, true); model.KptList = tableUtils.GetKptList(boardId, kptType); model.BoardId = boardId; return(View("Index", model)); }