/// <summary> /// 查询订单的两个点的坐标 /// </summary> /// <param name="i"></param> /// <returns></returns> public PointRoute QueryMapPoint(int i) { var query = (from t in HouseAppEntities.Order where t.OrderID == i select new PointRoute { OrderID = t.OrderID, PointX = t.PointX, PointY = t.PointY, PointX2 = t.PointX2, PointY2 = t.PointY2 }); PointRoute route = new PointRoute(); route = query.First(); return route; }
public string GetPointRoute(string userData) { JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); int OrderID = jsonSerializer.Deserialize<int>(userData); TakeOrderBusiness TakeBusiness = new TakeOrderBusiness(); WebService ws = new WebService(); PointRoute pointRoute = new PointRoute(); if (myHeader != null && ws.VerifyUser(myHeader.UserName, myHeader.Password)) { pointRoute = TakeBusiness.QueryMapPoint(OrderID); } else { return jsonSerializer.Serialize("loginfalse"); } return jsonSerializer.Serialize(pointRoute); }