public ActionResult Details(int id) { ViewBag.KaryawanList = new SelectList(PembeliRepo.GetAll()); PembeliViewModel model = PembeliRepo.GetById(id); return(PartialView(model)); }
public ActionResult Delete(int id) { ViewBag.KaryawanList = new SelectList(PembeliRepo.GetAll(), "Id", "Description"); PembeliViewModel model = PembeliRepo.GetById(id); return(PartialView(model)); }
public ActionResult DeleteConfirm(int id) { if (PembeliRepo.DeleteById(id)) { return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = false, message = PembeliRepo.Message }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Edit(PembeliViewModel model) { if (ModelState.IsValid) { if (PembeliRepo.Update(model)) { return(Json(new { success = true }, JsonRequestBehavior.AllowGet)); } else { return(Json(new { success = false, message = PembeliRepo.Message }, JsonRequestBehavior.AllowGet)); } } else { return(Json(new { success = false, message = "Invalid" }, JsonRequestBehavior.AllowGet)); } }
public ActionResult Edit(int id) { PembeliViewModel model = PembeliRepo.GetById(id); return(PartialView(model)); }
public ActionResult ListWithSelect() { return(PartialView(PembeliRepo.GetAll())); }
public ActionResult GetByNoReferensi(string noReferensi) { return(PartialView(PembeliRepo.GetByNoReferensi(noReferensi))); }
public ActionResult GetByNoMember(string noMember) { return(PartialView(PembeliRepo.GetByNoMember(noMember))); }