Example #1
0
        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());
        }
Example #2
0
        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
            })));
        }