Exemplo n.º 1
0
        /// <summary>
        /// 查询明细
        /// </summary>
        /// <param name="requestModel"></param>
        /// <returns></returns>
        public BusinessBaseViewModel <QueryDetailSystemRoleResponseModel> QueryDetail(QueryDetailSystemRoleRequestModel requestModel)
        {
            var res = new BusinessBaseViewModel <QueryDetailSystemRoleResponseModel>()
            {
                Status = ResponseStatus.Fail
            };

            var entity = _systemRoleRepository.FirstOrDefault(x => x.Id == requestModel.Id);

            if (!entity.IsNull())
            {
                res.BusinessData = entity.MapTo <QueryDetailSystemRoleResponseModel>();
            }


            res.Status = ResponseStatus.Success;
            return(res);
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="requestModel"></param>
        /// <returns></returns>
        public ActionResult Edit(QueryDetailSystemRoleRequestModel requestModel)
        {
            var systemRole = _systemRoleService.QueryDetail(requestModel);

            return(View(systemRole.BusinessData));
        }