public JsonResult LoadLastMove(String strTankNumber) { var data = _sharedFunctions.LoadDispatchLastMove(strTankNumber, 1); if (data != null && data.Any()) { var result = data.FirstOrDefault(); return(Json(new { ChargeBlockLocationDS = result.ChargeBlockLocationDS, ChargeCodeAN = result.ChargeCodeAN, ChassisEquipmentAN = result.ChassisEquipmentAN, DispatchStartDt = result.DispatchStartDt, Driver = result.Driver, DriverID = result.DriverID, ProductDS = result.ProductDS, ToLocationDS = result.ToLocationDS, FittingDS = result.FittingDS, ShipmentAN = result.ShipmentAN, ContactNM = result.ContactNM, ContactID = result.ContactID }, JsonRequestBehavior.AllowGet)); } return(Json(string.Empty, JsonRequestBehavior.AllowGet)); }
public JsonResult LoadLastMove(int?equipmentId) { PopulateSecurityExtended(); if (equipmentId == null || equipmentId.Value == 0) { return(Json(string.Empty, JsonRequestBehavior.AllowGet)); } var data = _sharedFunctions.LoadDispatchLastMove(equipmentId.Value, SecurityExtended.LocationId.Value); if (data != null && data.Any()) { var result = data.FirstOrDefault(); return(Json(result, JsonRequestBehavior.AllowGet)); } return(Json(string.Empty, JsonRequestBehavior.AllowGet)); }