示例#1
0
        // UPDATE (load base view)
        // GET: /Student/Edit/5
        public ActionResult Edit(int id)
        {
            ViewBag.Title = "Edit Student detail";
            StudentDBHandle dbhandle = new StudentDBHandle();

            return(View(dbhandle.ReadStudent().Find(smodel => smodel.Id == id)));
        }
示例#2
0
        // READ ALL
        // GET: /Student/
        public ActionResult Index()
        {
            ViewBag.Title = "Create <new Student> | edit | view detail | delete <Student>";
            StudentDBHandle dbhandle = new StudentDBHandle();

            ModelState.Clear();
            return(View(dbhandle.ReadStudent()));
        }