Beispiel #1
0
        public ActionResult Edit(long id)
        {
            MonitoringViewModel model = new MonitoringViewModel();            //.

            model = MonitoringRepo.ById(id);                                  //.

            ViewBag.idle_date   = model.idle_date.ToString("yyyy'-'MM'-'dd"); //.(BIAR PAS NGEDIT ADA TANGGAL LAMANYA)
            ViewBag.BiodataList = new SelectList(MonitoringRepo.ByNameBiodataforEdit(model.biodata_id), "id", "name");
            return(PartialView("_Edit", model));
        }
Beispiel #2
0
        public ActionResult Edit(long id)
        {
            AssignmentViewModel assignment = new AssignmentViewModel();

            assignment             = AssignmentRepo.ById(id);
            ViewBag.tanggalmulai   = assignment.start_date.ToString("yyyy'-'MM'-'dd");
            ViewBag.tanggalselesai = assignment.end_date.ToString("yyyy'-'MM'-'dd");
            ViewBag.BiodataList    = new SelectList(MonitoringRepo.ByNameBiodataforEdit(assignment.biodata_id), "id", "name");
            return(PartialView("_Edit", assignment));
        }