public ActionResult ViewDetail() { //当前登录用户 ViewBag.Title = "驾驶证详情";; MpUserID = new Guid("E8325C13-9C76-4B70-911E-57395A2F4D69"); MpUser mpUser = _mpUserService.GetById(MpUserID); if (mpUser == null || mpUser.IsAuth != 1) { return(Json(new { message = "您没有权限,请先申请成为业务员!" })); } DrivingLicense drivingLicense = new DrivingLicense(); if (!string.IsNullOrWhiteSpace(RQuery["Id"])) { drivingLicense = _drivingLicenseService.GetById(new Guid(RQuery["Id"])); } //VehicleLicense vehicleLicense = _vehicleLicenseService.GetUnique("from VehicleLicense where Id = '" +id + "'"); if (drivingLicense != null && drivingLicense.MpUserId != Guid.Empty && drivingLicense.MpUserId != MpUserID) { return(Json(new { message = "您没有权限,请先申请成为业务员!" })); } return(View(drivingLicense)); }
public ActionResult DrivingLicenseEdit() { if (!base.HasPermission("DrivingLicense", PermissionOperate.add) && !base.HasPermission("DrivingLicense", PermissionOperate.edit)) { return(base.ShowNotPermissionTip("")); } string id = RQuery["Id"]; DrivingLicense drivingLicense = string.IsNullOrWhiteSpace(id) ? null : _drivingLicenseService.GetById(new Guid(id)); return(AdminView(drivingLicense)); }