public IHttpActionResult GetTrackHistory(string airWayBillNumberNumber) { airWayBillNumberNumber = Regex.Replace(airWayBillNumberNumber, "[^a-zA-Z0-9.]", ""); TrackingOrderViewModel Model = new TrackingOrderViewModel(); Model.Order = _repo.GetByAirWayBillNumberNumber(airWayBillNumberNumber); if (Model.Order != null) { var number = Model.Order.AirWayBillNumberNumber; Model.Order.AirWayBillNumberNumber = number.Substring(0, 3) + "-" + number.Substring(3, 5) + "-" + number.Substring(8, 2); Model.TrackingList = _trackRepo.GetByOrderId(Model.Order.OrderId.ToString()); } else { Model.ValidationMessage = new ValidationMessage() { ErrorMessage = "Not Found" }; } return(Ok(Model)); }
public IHttpActionResult GetTrackingByOrderId(string OrderId) { return(Ok(_repo.GetByOrderId(OrderId))); }