public ActionResult Edit(ClassroomteacherdetailVM poViewModel) { ViewBag.AC_MENU_ID = valMENU.PENGATURAN_CLASSROOMTEACHER_EDIT; oVAL = new Classroomteacher_Validation(poViewModel); oVAL.Validate_Edit(); //Add Error if exists for (int i = 0; i < oVAL.aValidationMSG.Count; i++) { ModelState.AddModelError(oVAL.aValidationMSG[i].VAL_ERRID, oVAL.aValidationMSG[i].VAL_ERRMSG); } //End for (int i = 0; i < oVAL.aValidationMSG.Count; i++) if (ModelState.IsValid) { oCRUD.Update(poViewModel); if (oCRUD.isERR) { TempData["ERRMSG"] = oCRUD.ERRMSG; return(RedirectToAction("ErrorSYS", "Error")); } //End if (!oCRUD.isERR) { TempData["CRUDSavedOrDelete"] = valFLAG.FLAG_TRUE; return(RedirectToAction("Details", new { id = oCRUD.ID })); } prepareLookup(); return(View(poViewModel)); }
public ActionResult Create() { //ViewBag.AC_MENU_ID = valMENU.MODULE_CREATE; ViewBag.AC_MENU_ID = valMENU.PENGATURAN_CLASSROOMTEACHER_CREATE; ViewBag.CRUD_type = hlpFlags_CRUDOption.CREATE; ClassroomteacherdetailVM oData = new ClassroomteacherdetailVM(); prepareLookup(); return(View(oData)); }