public ActionResult Create(Kasir kasir) { if (ModelState.IsValid) { db.Kasir.Add(kasir); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kasir)); }
public ActionResult Create(Barang barang) { if (ModelState.IsValid) { db.Barang.Add(barang); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IDKasir = new SelectList(db.Kasir, "IDKasir", "NamaKasir", barang.IDKasir); return(View(barang)); }