public ActionResult Single(int id) { var driveRecordBll = new ViewDriveRecordBll(); var driveRocord = driveRecordBll.QuerySingle(id); if (driveRocord == null) { return(RedirectToAction("Reports")); } var signPointBll = new ViewSignPointBll(); var signPoints = signPointBll.QueryList($"DriveRecordId={id}", null, null, "Sort").ToList(); ViewBag.Record = driveRocord; ViewBag.Signs = signPoints; return(View()); }
public JsonResult GetDriverRecord(int id) { var driveRecordBll = new ViewDriveRecordBll(); var driveRecord = driveRecordBll.QuerySingle(id); if (driveRecord == null) { return(Json(ErrorModel.InputError)); } var signPointBll = new ViewSignPointBll(); var signPoints = signPointBll.QueryList($"DriveRecordId={id}", null, null, "Sort").ToList(); return(Json(ErrorModel.GetDataSuccess(new { record = driveRecord, signs = signPoints }))); }