// GET: Authors/Create public ActionResult Create() { LibraryClient lc = new LibraryClient(); ViewBag.listEmploymentStatus = lc.GetEmplyeeStatusIdNameMVCModel().Select(x => new SelectListItem { Value = x.NAME, Text = x.NAME }); return(View("Create")); }
public ActionResult Edit(int id) { LibraryClient lc = new LibraryClient(); Author author = new Author(); ViewBag.listEmploymentStatus = lc.GetEmplyeeStatusIdNameMVCModel().Select(x => new SelectListItem { Value = x.NAME, Text = x.NAME }); author = lc.GetAuthor(id); return(View("Edit", author)); }