public ActionResult PayLoad([Bind(Prefix = "ID")] String FlightUniqueID = "") { if (!exLogic.User.hasAccess("PAYLOAD.MAP")) { return(RedirectToAction("NoAccess", "Home")); } int ProcessingModel = Util.getDBInt("Select ISNULL(ProcessingModel,1) From PayLoadFlight where FlightUniqueID='" + FlightUniqueID + "'"); if (ProcessingModel == 1) { return(RedirectToAction("PayLoadIndoor", new { ID = FlightUniqueID })); } ViewBag.Title = "Payload Data"; String SQL = "SELECT \n" + " [RFID], \n" + " [RSSI], \n" + " [ReadTime], \n" + " [ReadCount], \n" + " CASE WHEN [GridLat] = 0 THEN [Latitude] ELSE [GridLat] END as [Latitude], \n" + " CASE WHEN [GridLng] = 0 THEN [Longitude] ELSE [GridLng] END as [Longitude],\n" + " [RowNumber] as [Row], \n" + " [ColumnNumber] as [Col],\n" + " Count(*) Over() as _TotalRecords,\n" + " Concat([RFID],',',FlightUniqueID) as _PKey\n" + "FROM \n" + " [PayLoadMapData] \n" + "WHERE\n" + " FlightUniqueID='" + FlightUniqueID + "'"; qView nView = new qView(SQL); nView.addMenu("Detail", Url.Action("Detail", "Payload", new { ID = "_Pkey" })); ViewBag.FlightUniqueID = FlightUniqueID; if (Request.IsAjaxRequest()) { Response.ContentType = "text/javascript"; return(PartialView("qViewData", nView)); } else { //get yard information for FlightUniqueID GeoGrid theYard = new GeoGrid(FlightUniqueID); ViewBag.Yard = theYard.getYard(); return(View(nView)); }//if(IsAjaxRequest) }
public JsonResult getYard([Bind(Prefix = "ID")] int YardID = 0) { GeoGrid theYard = new GeoGrid(0); return(Json(theYard.getYard(YardID), JsonRequestBehavior.AllowGet)); }