public ActionResult Edit(PromisedVM poViewModel) { ViewBag.AC_MENU_ID = valMENU.AKADEMIK_PROMISED_EDIT; oVAL = new Promised_Validation(poViewModel.DETAIL); 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.DETAIL); 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 })); } return(View(poViewModel)); }
public ActionResult Create() { ViewBag.AC_MENU_ID = valMENU.AKADEMIK_PROMISED_CREATE; ViewBag.CRUD_type = hlpFlags_CRUDOption.CREATE; PromisedVM oData = new PromisedVM(); oData.DETAIL = new PromiseddetailVM(); return(View(oData)); }
public ActionResult Index() { ViewBag.AC_MENU_ID = valMENU.AKADEMIK_PROMISED_INDEX; //var oData = oDS.getDatalist(); //return View(); var oData = new PromisedVM(); return(View(oData)); }
public ActionResult Delete(int?id = null) { ViewBag.AC_MENU_ID = valMENU.AKADEMIK_PROMISED_DELETE; ViewBag.CRUD_type = hlpFlags_CRUDOption.DELETE; PromisedVM oData = new PromisedVM(); oData.DETAIL = oDS.getData(id); if (oData == null) { return(HttpNotFound()); } return(View(oData)); }
public ActionResult Details(int?id = null) { ViewBag.AC_MENU_ID = valMENU.AKADEMIK_PROMISED_DETAILS; ViewBag.CRUD_type = hlpFlags_CRUDOption.VIEW; ViewBag.CRUDSavedOrDelete = TempData["CRUDSavedOrDelete"]; PromisedVM oData = new PromisedVM(); oData.DETAIL = oDS.getData(id); if (oData == null) { return(HttpNotFound()); } return(View(oData)); }
public ActionResult Index(PromisedVM poViewModel) { ViewBag.AC_MENU_ID = valMENU.AKADEMIK_PROMISED_INDEX; oVAL = new Promised_Validation(poViewModel); oVAL.Validate_Filter(); //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) { poViewModel.LIST = oDS.getDatalist(poViewModel); } //End if (ModelState.IsValid) return(View(poViewModel)); }