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 GetList() { var json = JqueryDataTableAjaxHelper.GetPageListJson( Request, (pageIndex, pageSize) => { var recordBll = new ViewDriveRecordBll(); int totalCount; var data = recordBll.QueryPageList(pageIndex, pageSize, "AttendTime", true, out totalCount); return(new KeyValuePair <int, object>(totalCount, data)); } ); return(Json(json)); }
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 }))); }