public ActionResult Detail(int id) { var response = _kpiService.GetKpiDetail(new GetKpiRequest { Id = id }); var viewModel = response.MapTo <DetailKpiViewModel>(); return(View(viewModel)); }
private bool ValidateAuthorizeKPI(int kpiId) { var response = new DSLNG.PEAR.Services.Responses.Kpi.GetKpiDetailResponse(); if (this.UserProfile().IsSuperAdmin) { return(true); } response = _kpiService.GetKpiDetail(new Services.Requests.Kpi.GetKpiRequest { Id = kpiId }); if (response.IsSuccess) { if (response.RoleGroup == this.UserProfile().RoleName) { return(true); } else { return(false); } } return(false); }