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

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