public ActionResult changeStatusGameAccountTo_1(string id) { TB_GAME_ACCOUNT acc = entities.TB_GAME_ACCOUNT.Find(id); var message = "fail"; if (acc != null) { acc.CURRENT_STATUS = 1; if (entities.SaveChanges() > 0) { message = "success"; return(Json(message, JsonRequestBehavior.AllowGet)); } } return(Json(message, JsonRequestBehavior.AllowGet)); }
public ActionResult UpdateTB_GAME_ACCOUNT(TB_GAME_ACCOUNT entity) { if (entity == null) { return(Content("Null cmnr")); } if (ModelState.IsValid) { try { TB_GAME_ACCOUNT model = entities.TB_GAME_ACCOUNT.Find(entity.USERNAME); model.ORIGINAL_PRICE = entity.ORIGINAL_PRICE; model.CURRENT_STATUS = entity.CURRENT_STATUS; entities.SaveChanges(); } catch (Exception e) { return(Content(e.Message)); } return(RedirectToAction("getTBGameAccount")); } return(View(entity)); }