// // GET: /j_Order_xfzShow/ public ActionResult logistics(string orderNo) { j_OrderPost orderPost = j_OrderPost.GetInfoByOrderNo(orderNo); if (orderPost == null) { return(View("Error", new ErrorPage { Title = "", Message = "无物流信息" })); } BasePostCode PostCode = BasePostCode.GetEntityByID(orderPost.CodeID); return(Redirect("https://m.kuaidi100.com/index_all.html?type=" + orderPost.PostName + "&postid=" + orderPost.PostNo + "&callbackurl=" + Request.Url)); }
public ContentResult ToSendOrder(j_OrderPost orderPost) { if (string.IsNullOrWhiteSpace(orderPost.OrderNo) || string.IsNullOrWhiteSpace(orderPost.PostNo) || orderPost.CodeID == 0) { return(Content("您还没有填完哦")); } string msg = string.Empty; BasePostCode postCode = BasePostCode.GetEntityByID(orderPost.CodeID); if (postCode == null) { return(Content("该快递没有收录")); } orderPost.PostName = postCode.PostName;//快递名 j_OrderPost old = j_OrderPost.GetInfoByOrderNo(orderPost.OrderNo); orderPost.Dat = DateTime.Now; if (old != null && !string.IsNullOrWhiteSpace(old.PostNo)) { orderPost.ID = old.ID; int rtn = 0; rtn = orderPost.UpdateByID(); msg = rtn > 0 ? "ok" : "保存失败"; } else { msg = j_OrderPost.SendOrder(orderPost, CurrentUser.UserName); } if (msg == "ok") { return(Content("ok")); } else { return(Content(msg)); } }