public ActionResult Next(int?id, String jawabanDetail)
        {
            peserta_jawaban_detail pesertaid = new peserta_jawaban_detail()
            {
                soal_id         = id,
                jawaban_peserta = jawabanDetail
            };

            db.peserta_jawaban_detail.Add(pesertaid);
            db.SaveChanges();
            return(Redirect("/peserta_jawaban_detail/HalamanSoal"));
        }
Example #2
0
        public ActionResult Create([Bind(Include = "id,create_by,create_date,keterangan,status,update_by,update_date,jawaban_peserta,pesertatest_id,soal_id")] peserta_jawaban_detail peserta_jawaban_detail)
        {
            if (ModelState.IsValid)
            {
                db.peserta_jawaban_detail.Add(peserta_jawaban_detail);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            ViewBag.soal_id        = new SelectList(db.soal, "id", "create_by", peserta_jawaban_detail.soal_id);
            ViewBag.pesertatest_id = new SelectList(db.peserta_test, "id", "create_by", peserta_jawaban_detail.pesertatest_id);
            return(View(peserta_jawaban_detail));
        }
Example #3
0
        // GET: api/JawabanPeserta
        public int Get([FromUri] int idSoal, [FromUri] int idPeserta, [FromUri] String Jawaban)
        {
            Debug.WriteLine(idSoal);
            Debug.WriteLine(idPeserta);
            Debug.WriteLine(Jawaban);
            peserta_jawaban_detail isi = new peserta_jawaban_detail()
            {
                soal_id         = idSoal,
                pesertatest_id  = idPeserta,
                jawaban_peserta = Jawaban
            };

            db.peserta_jawaban_detail.Add(isi);
            return(db.SaveChanges());
        }