コード例 #1
0
 public ActionResult Add(Person p)
 {
     if (ModelState.IsValid)
     {
         p.Registred = DateTime.Now;
         Commands.AddEmpToDTB(p);
     }
     else
     {
         return(View("Create", p));
     }
     return(RedirectToAction("Index"));
 }