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