public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var board = _br.GetSingle(id.Value); if (board == null) { return(HttpNotFound()); } return(View(VMConverters.ModelToViewModel(board))); }
public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } //Board board = await db.Board.FindAsync(id); Board board = _br.GetSingle(id.Value); if (board == null) { return(HttpNotFound()); } return(View(VMConverters.ModelToViewModel(board))); }
public ActionResult Delete(int?boardid, int?id) { if (boardid == null || id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var list = _lr.GetSingle(id.Value); if (list == null) { return(HttpNotFound()); } ViewBag.BoardId = boardid.Value; var boardname = _lr.GetListBoardName(boardid.Value); return(View(VMConverters.ModelToViewModel(list, boardname))); }
public async Task <ActionResult> Details(int?boardid, int?listid, int?id) { if (boardid == null || listid == null || id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var card = _cr.GetSingle(id.Value); if (card == null) { return(HttpNotFound()); } var listname = _cr.GetCardListName(listid.Value); ViewBag.BoardId = boardid.Value; ViewBag.ListId = listid.Value; return(View(VMConverters.ModelToViewModel(card, listname))); }
public ActionResult Edit(int?boardid, int?id) { if (boardid == null || id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } //List list = db.List.Find(id); var list = _lr.GetSingle(id.Value); if (list == null) { return(HttpNotFound()); } //ViewBag.BoardId = new SelectList(db.Board, "BoardId", "Name", list.BoardId); ViewBag.BoardId = list.BoardId; var boardname = _lr.GetListBoardName(boardid.Value); return(View(VMConverters.ModelToViewModel(list, boardname))); }