예제 #1
0
        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);
        }
예제 #2
0
 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;
 }