public ActionResult ActivateCard(string cardId, string pwd) { CardUse cardUse = new CardUse(MyUserId); CardUse.ActivateResult x = cardUse.ActivateCard(cardId, pwd); return(Json(new { x }, JsonRequestBehavior.AllowGet)); }
public ActionResult CardActive(CardViewModel model) { if (!ModelState.IsValid) { return(Json(CardUse.ActivateResult.ActivateFailed, JsonRequestBehavior.AllowGet)); } CardUse cu = new CardUse(MyUserId); var r = cu.ActivateCard(model.CardId, model.Pwd); return(Json(r, JsonRequestBehavior.AllowGet)); }