// GET: StudentVouchers/Add public ActionResult Add(String id) { StudentRegistrationsModel db = new StudentRegistrationsModel(); StudentVoucher studentVoucher = new StudentVoucher(); //voucher.GrantType = db.GrantTypes.ToList(); //parsing to the view //ViewBag.GrantType = Helpers.Helpers.GrantTypes(); ViewBag.grant_type_id = db.GrantTypes; // new SelectList(db.GrantTypes, "grant_type_id", "grant_name"); //ViewBag.grant_type_id = new SelectList(db.GrantTypes, "grant_type_id", "grant_name"); ViewBag.student_ID = (id != null) ? id : String.Empty; studentVoucher.grant_type_id = 0; return View(studentVoucher); }
public void TestAddVoucher() { var contact = new StudentVoucher(); }