public ActionResult Mark(FormCollection collection, string id) { int tradeid = 0; int flag = 0; int.TryParse(collection["flag"], out flag); if (int.TryParse(id, out tradeid)) { var req = new SaveMemoRequest { Id = tradeid, Flag = flag, Memo = collection["remark"] }; var r = YunClient.Instance.Execute(req, Token); return(Json(new { result = r.Result, error = r.ErrMsg })); } return(Json(new { result = false, error = "订单不存在" })); }
public ActionResult Mark(FormCollection collection, string id) { int tradeid = 0; int flag = 0; int.TryParse(collection["flag"], out flag); if (int.TryParse(id, out tradeid)) { var req = new SaveMemoRequest { Id = tradeid, Flag = flag, Memo = collection["remark"] }; var r = YunClient.Instance.Execute(req, Member.Token); return Json(new { result = r.Result, error = r.ErrMsg }); } return Json(new { result = false, error = "订单不存在" }); }
public ActionResult Mark(FormCollection collection, int id) { var req = new SaveMemoRequest { Id = id, Flag = collection["radio-flag"].TryTo(0), Memo = collection["remark"], SlaveFlag = collection["slaveflag"].TryTo(0) }; var r = YunClient.Instance.Execute(req, Token); return Json(new {result = r.Result, error = r.ErrMsg}); }