public ActionResult ActionDelete(TOURIS_TV_USER userView) { TOURIS_TV_USER userRes = new TOURIS_TV_USER(); userRes = JsonConvert.DeserializeObject <TOURIS_TV_USER>(ParsingObject.JsonData(userView, "User", "DeleteObjUser")); return(View(userRes)); }
public ActionResult ActionDelete(TOURIS_TV_COUNTRY countryView) { ResultStatus rs = new ResultStatus(); try { rs = JsonConvert.DeserializeObject <ResultStatus>(ParsingObject.JsonData(countryView, "Country", "DeleteObjCountry")); if (rs.IsSuccess) { rs.SetSuccessStatus("Data has been deleted successfully"); TempData["msgSuccess"] = rs.MessageText; } else { rs.SetErrorStatus("Data failed to deleted"); TempData["msgError"] = rs.MessageText; } } catch (Exception ex) { ModelState.AddModelError("", ex.Message); rs.SetErrorStatus("Data failed to deleted"); TempData["msgError"] = rs.MessageText; } return(RedirectToAction("Index")); }
public ActionResult Index() { List <TOURIS_TV_USER> userRes = new List <TOURIS_TV_USER>(); userRes = JsonConvert.DeserializeObject <List <TOURIS_TV_USER> >(ParsingObject.JsonData(null, "User", "RetrieveObjUser")); return(View(userRes)); }
public ActionResult Index() { ViewBag.msgSuccess = TempData["msgSuccess"]; ViewBag.msgError = TempData["msgError"]; List <TOURIS_TV_COUNTRY> countryRes = new List <TOURIS_TV_COUNTRY>(); countryRes = JsonConvert.DeserializeObject <List <TOURIS_TV_COUNTRY> >(ParsingObject.JsonData(null, "Country", "RetrieveObjCountryList")); return(View(countryRes)); }
public ActionResult Edit(int id) { TOURIS_TV_COUNTRY countryView = new TOURIS_TV_COUNTRY(); TOURIS_TV_COUNTRY countryRes = new TOURIS_TV_COUNTRY(); countryView.ID = id; countryRes = JsonConvert.DeserializeObject <TOURIS_TV_COUNTRY>(ParsingObject.JsonData(countryView, "Country", "RetrieveObjCountry")); return(View(countryRes)); }