示例#1
0
        // 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"));
        }
示例#2
0
        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));
        }