public ActionResult Update(int id) { ViewBag.Technology = new SelectList(TechnologyRepo.All(null), "id", "name"); ViewBag.Trainer = new SelectList(TrainerRepo.All(null), "id", "name"); ViewBag.BootcampType = new SelectList(BootcampTypeRepo.All(), "id", "name"); ViewBag.Room = new SelectList(RoomRepo.All(), "id", "name"); return(PartialView("_Update", BatchRepo.Get(id))); }
public ActionResult Create() { ViewBag.Technology = new SelectList(TechnologyRepo.All(null), "id", "name"); ViewBag.Trainer = new SelectList(TrainerRepo.All(null), "id", "name"); ViewBag.BootcampType = new SelectList(BootcampTypeRepo.All(), "id", "name"); ViewBag.Room = new SelectList(RoomRepo.All(), "id", "name"); return(PartialView("_Create")); }
// Create public ActionResult Create() { ViewBag.roomList = new SelectList(RoomRepo.All(), "id", "name"); ViewBag.BootcampTypeList = new SelectList(BootcampTypeRepo.All(), "id", "name"); ViewBag.technologyList = new SelectList(TechnologyRepo.All(), "id", "name"); ViewBag.TerainerList = new SelectList(TrainerRepo.ByTechnology(0), "id", "name"); // Mencari Berdasarkan Technologi return(PartialView("_Create")); }
// Edit public ActionResult Edit(long id) { BatchViewModel model = new BatchViewModel(); model = BatchRepo.ById(id); ViewBag.tanggalmulai = model.periodFrom?.ToString("yyyy'-'MM'-'dd"); ViewBag.tanggalselesai = model.periodTo?.ToString("yyyy'-'MM'-'dd"); ViewBag.roomList = new SelectList(RoomRepo.All(), "id", "name"); ViewBag.BootcampTypeList = new SelectList(BootcampTypeRepo.All(), "id", "name"); ViewBag.technologyList = new SelectList(TechnologyRepo.All(), "id", "name"); ViewBag.TerainerList = new SelectList(TrainerRepo.ByTechnology(model.technologyId), "id", "name"); // Mencari Berdasarkan Technologi return(PartialView("_Edit", model)); }
public ActionResult List(string search) { return(PartialView("_List", TechnologyRepo.All(search))); }
// GET: Technology public ActionResult Index(string search) { return(View(TechnologyRepo.All(search))); }
public ActionResult List() { return(PartialView("_List", TechnologyRepo.All())); }