public ActionResult Create(StudnetDTO dto) { IStudentBusiness buisnes = new StudentBusiness(); buisnes.Insert(dto); return(RedirectToAction("Index")); }
public ActionResult Create(Student student, String birthdate) { String[] tmp = birthdate.Split('-'); String bd = tmp[1] + "-" + tmp[0] + "-" + tmp[2]; student.Birthdate = Convert.ToDateTime(bd); if (ModelState.IsValid) { student.IsActive = true; StuBO.Insert(student); return(RedirectToAction("Index")); } ViewBag.ClassID = slFactory.MakeSelectList <Class>("ClassID", "ClassName"); return(View(student)); }