public string BackTakedOrder(string userData) { JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); TakeOrder takeorder = jsonSerializer.Deserialize<TakeOrder>(userData); TakeOrderBusiness TakeBusiness = new TakeOrderBusiness(); WebService ws = new WebService(); string result; int state; if (myHeader != null && ws.VerifyUser(myHeader.UserName, myHeader.Password)) { state = TakeBusiness.BackOrder(takeorder.OrderID); if (state != -1) { result = "0";//下单成功 } else { result = "1"; } } else { return jsonSerializer.Serialize("loginfalse"); } return jsonSerializer.Serialize(result); }
public string SearchMapPoint(string userData) { JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); string state = jsonSerializer.Deserialize<string>(userData); List<PointShow> pointshow = new List<PointShow>(); TakeOrderBusiness TakeBusiness = new TakeOrderBusiness(); WebService ws = new WebService(); if (myHeader != null && ws.VerifyUser(myHeader.UserName, myHeader.Password)) { if (state == "0") { pointshow = TakeBusiness.QueryMapPoint1(0); } return jsonSerializer.Serialize(pointshow); } else { return jsonSerializer.Serialize("loginfalse"); } }
public string SearchUnCompleteTakedOrder(string userData) { JavaScriptSerializer jsonSerializer = new JavaScriptSerializer(); string state = jsonSerializer.Deserialize<string>(userData); int id = Convert.ToInt32(state); List<UnCompleteTakedOrder> unorder = new List<UnCompleteTakedOrder>(); TakeOrderBusiness TakeBusiness = new TakeOrderBusiness(); WebService ws = new WebService(); if (myHeader != null && ws.VerifyUser(myHeader.UserName, myHeader.Password)) { unorder = TakeBusiness.QueryUncompleteTakedOrder(id); return jsonSerializer.Serialize(unorder); } else { return jsonSerializer.Serialize("loginfalse"); } }
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); }