public ActionResult Add() { var UserId = User.Identity.GetUserId(); ViewBag.ListOutlet = new SelectList(EmployeeOutletDAL.GetDataByID(int.Parse(UserId)), "OutletID", "OutletName"); ViewBag.ListSupplier = new SelectList(SuppliersDAL.GetData(), "ID", "Name"); return(PartialView("Add")); }
public ActionResult Edit(int Id) { var UserId = User.Identity.GetUserId(); ViewBag.ListOutlet = new SelectList(EmployeeOutletDAL.GetDataByID(int.Parse(UserId)), "OutletID", "OutletName"); ViewBag.ListSupplier = new SelectList(SuppliersDAL.GetData(), "ID", "Name"); ListPurchaseOrderViewModel model = PurchaseOrderDAL.GetDataByIdPO(Id); return(PartialView("Edit", model)); }
// membuat fungsi load public ActionResult Load() { List <SuppliersViewModel> model = SuppliersDAL.GetData(); return(PartialView("_index", model)); }
// GET: Suppliers // membuat tampilan index public ActionResult Index() { List <SuppliersViewModel> model = SuppliersDAL.GetData(); return(View(model)); }