public ActionResult Details(string id)
        {
            CreditServiceDetailView creditServiceDetailView = new CreditServiceDetailView();

            #region Access Check
            bool hasPermission = GetEmployee().IsGuaranteed("CreditService_Read");
            if (!hasPermission)
            {
                ModelState.AddModelError("", "AccessDenied");
                return(View(creditServiceDetailView));
            }
            #endregion

            CreditServiceView creditServiceView = this.GetCreditServiceView(id);

            creditServiceDetailView.CreditServiceView = creditServiceView;
            creditServiceDetailView.EmployeeView      = GetEmployee();

            return(View(creditServiceDetailView));
        }
示例#2
0
        public GetCreditServiceResponse GetCreditService(GetRequest request)
        {
            GetCreditServiceResponse response = new GetCreditServiceResponse();

            try
            {
                CreditService     creditService     = new CreditService();
                CreditServiceView creditServiceView = creditService.ConvertToCreditServiceView();

                creditService = _creditServiceRepository.FindBy(request.ID);
                if (creditService != null)
                {
                    creditServiceView = creditService.ConvertToCreditServiceView();
                }

                response.CreditServiceView = creditServiceView;
            }
            catch (Exception ex)
            {
            }

            return(response);
        }