public void UpdatePointExchangeStatus(UpdatePointExchangeStatusArgs args) { using (Entities db = new Entities()) { Point_Exchange pointExchange = db.Point_Exchange.FirstOrDefault(e => e.id == args.id); if (pointExchange != null) { pointExchange.status = args.status; db.SaveChanges(); } } }
public ActionResult UpdatePointExchangeStatus(int id) { UpdatePointExchangeStatusArgs args = RequestArgs <UpdatePointExchangeStatusArgs>(); if (args == null) { return(FailedResult("参数无效。")); } _pointManager.UpdatePointExchangeStatus(args); return(SuccessfulResult()); }