コード例 #1
0
        public ActionResult StudentInfo(StudentModels model)
        {
            if (ModelState.IsValid)
            {
                model.StudentName = model.State;
            }

            return View(model);
        }
コード例 #2
0
 public StudentViewModel()
 {
     Student = new StudentModels(); ;
     Grades = new Grades();
     States = new StatesDictionary();
 }
コード例 #3
0
 public StudentViewModel(StudentModels student)
 {
     Student = student;
     Grades = new Grades();
     States = new StatesDictionary();
 }
コード例 #4
0
 //public string StudentName { get; set; }
 //public int Grade { get; set; }
 //
 // GET: /Student/
 public ActionResult Index()
 {
     StudentModels stdm = new StudentModels();
     StudentViewModel stdvm = new StudentViewModel(stdm);
     return View(stdvm);
 }