示例#1
0
        // 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));
        }