public ApiResponse <MonModel> UpdateMonThi(MonModel monModel) { string jsonObject = JsonConvert.SerializeObject(monModel); var list = CoreRepo.PostToGetApiResponse <MonModel>(Constance.Constance.UrlApi, "MonThi/updateMonThi/", jsonObject); if (list.Status == (int)HttpStatusCode.NotFound) { return(list); } return(list); }
public ActionResult Edit(MonModel mon) { try { if (ModelState.IsValid) { var result = _monRepo.UpdateMonThi(mon); if (result.CheckStatus()) { return(RedirectToAction("Index")); } } // TODO: Add insert logic here return(View()); } catch { return(View()); } }