Exemple #1
0
        //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));
        }
Exemple #2
0
        public List <BarangModel> GetAll()
        {
            BarangRepo         barangRepo = new BarangRepo();
            List <BarangModel> result     = barangRepo.GetAll();

            return(result);
        }
Exemple #3
0
 //
 // GET: /Barang/
 public ActionResult Index()
 {
     return(View(BarangRepo.GetAll()));
 }
Exemple #4
0
 public ActionResult Tampil()
 {
     return(Json(BarangRepo.GetAll(), JsonRequestBehavior.AllowGet));
 }
Exemple #5
0
 public List <Barang> GetAll()
 {
     return(BarangRepo.GetAll());
 }
 public ActionResult ListWithSelectSupplier(int IdSupplier)
 {
     return(PartialView(BarangRepo.GetAll(IdSupplier)));
 }
 public ActionResult ListWithSelect()
 {
     return(PartialView(BarangRepo.GetAll()));
 }