public string ShipperToVehicle(string shipperName, string vehicleNo, long SID, int?Index) { ShipperToVehicleViewModel sv = new ShipperToVehicleViewModel(); sv.PageIndex = Index ?? 0; sv.SID = (SID); sv.ShipperName = shipperName; //sv.VehicleNo = vehicle; var request = new GetCRMVehicleByConditionRequest(); int pagesize = 17; request.PageIndex = sv.PageIndex; request.PageSize = pagesize; request.vehicleNo = vehicleNo; var response = new VehicleManagementService().GetAllVehicle(request); if (response.IsSuccess) { sv.Vehicle = response.Result.CRMVehicleCollection; sv.PageIndex = response.Result.PageIndex; sv.PageCount = response.Result.PageCount; } JavaScriptSerializer Serializer = new JavaScriptSerializer(); string js = Serializer.Serialize(response); return(js); }
//输入承运商名称,显示车辆列表 public string GetCRM_ShipperMappingVehicle(string name) { ShipperToVehicleViewModel sv = new ShipperToVehicleViewModel(); var request = new ShipperMappingVehicleRequest(); request.ShipperName = name; var response = new VehicleManagementService().GetCRM_ShipperMappingVehicle(request); if (response.IsSuccess) { sv.Vehicle = response.Result.CRMVehicleCollection; sv.PageIndex = response.Result.PageIndex; sv.PageCount = response.Result.PageCount; } JavaScriptSerializer Serializer = new JavaScriptSerializer(); string js = Serializer.Serialize(response); return(js); }
public ActionResult ShipperToVehicle(string id, int?type) { ShipperToVehicleViewModel sv = new ShipperToVehicleViewModel() { Shipper = ApplicationConfigHelper.GetShipperList(), Vehicle = ApplicationConfigHelper.GetVehicleList() }; int pagesize = 17; var response = new VehicleManagementService().GetAllVehicle(new GetCRMVehicleByConditionRequest() { PageSize = pagesize, PageIndex = sv.PageIndex, }); if (response.IsSuccess) { sv.Vehicle = response.Result.CRMVehicleCollection; sv.PageIndex = response.Result.PageIndex; sv.PageCount = response.Result.PageCount; } return(View(sv)); }