//public ActionResult SaveDeleteBarang(BarangModel terserah) //{ // Session["ID"] = "1"; // BarangRepo barangRepo = new BarangRepo(); // terserah.CreatedBy = this.Session["ID"].ToString(); // terserah.CreatedDate = DateTime.Now; // terserah.UpdatedDate = DateTime.Now; // if (barangRepo.SaveEdit(terserah)) // { // return Json(new { status = "Berhasil" }, JsonRequestBehavior.AllowGet); // } // else // { // return Json(new { status = "Gagal" }, JsonRequestBehavior.AllowGet); // } // return View(); //} public ActionResult GetAll() { BarangRepo barangRepo = new BarangRepo(); List <BarangModel> barangModel = barangRepo.GetAll(); return(Json(barangModel, JsonRequestBehavior.AllowGet)); }
public List <BarangModel> GetAll() { BarangRepo barangRepo = new BarangRepo(); List <BarangModel> result = barangRepo.GetAll(); return(result); }
// // GET: /Barang/ public ActionResult Index() { return(View(BarangRepo.GetAll())); }
public ActionResult Tampil() { return(Json(BarangRepo.GetAll(), JsonRequestBehavior.AllowGet)); }
public List <Barang> GetAll() { return(BarangRepo.GetAll()); }
public ActionResult ListWithSelectSupplier(int IdSupplier) { return(PartialView(BarangRepo.GetAll(IdSupplier))); }
public ActionResult ListWithSelect() { return(PartialView(BarangRepo.GetAll())); }