Exemplo n.º 1
0
        public ActionResult Edit(string id)
        {
            if (Session["Username"] == null)
            {
                return(RedirectToAction("Index", "Login"));
            }
            EditViewModel evm = new EditViewModel();

            student         = studentService.GetById(id);
            evm.RollNumber  = student.RollNumber;
            evm.Name        = student.Name;
            evm.CGPI        = student.CGPI;
            evm.Location    = student.Location;
            evm.DateOfBirth = student.DateOfBirth;

            return(View(evm));
        }