示例#1
0
        public ActionResult Edit(int id)
        {
            KlantenRepository kr = new KlantenRepository();

            ViewBag.ProvincieList = new SelectList(kr.GetProvincieList(), "Id", "ProvincieName");
            ViewBag.ObserveerList = new SelectList(kr.GetObserveerList(), "Id", "ObserverenName");
            ViewBag.WeghaalList   = new SelectList(kr.GetWeghaalList(), "Id", "WeghaalName");

            return(View(kr.GetKlantByIdEdit(id)));
        }
示例#2
0
        public ActionResult Create()

        {
            Klanten           klant = new Klanten();
            KlantenRepository kr    = new KlantenRepository();

            //Viewbags for the dropdownlists
            ViewBag.ProvincieList = new SelectList(kr.GetProvincieList(), "Id", "ProvincieName");
            ViewBag.ObserveerList = new SelectList(kr.GetObserveerList(), "Id", "ObserverenName");
            ViewBag.WeghaalList   = new SelectList(kr.GetWeghaalList(), "Id", "WeghaalName");

            return(View(klant));
        }