Exemple #1
0
        public List <List <Object[]> > getSelectedResults(int id, int year, int quarter)
        {
            List <List <Object[]> > returnData = new List <List <object[]> >();
            bool rights = authRepo.getAdminRights() || authRepo.getTeamLeadRights(id);
            bool b      = authRepo.getAccountRights(id);

            Debug.WriteLine("SummaryAuth " + b + " " + authRepo.getAdminRights() + " " + authRepo.getTeamLeadRights(id));
            if (rights)
            {
                returnData = repo.getSelectedResults(id, year, quarter);
            }
            else if (b)
            {
                returnData = repo.getSelectedResults(id, year, quarter);
            }
            return(returnData);
        }
Exemple #2
0
        public HttpResponseMessage getSelectedResults(int id, int year, int quarter)
        {
            List <List <Object[]> > returnData = new List <List <object[]> >();
            bool rights = authRepo.getAdminRights() || authRepo.getTeamLeadRights(id);
            bool b      = authRepo.getAccountRights(id);

            Debug.WriteLine("SummaryAuth " + b + " " + authRepo.getAdminRights() + " " + authRepo.getTeamLeadRights(id));
            if (authRepo.isAuthorized(id))
            {
                returnData = repo.getSelectedResults(id, year, quarter);
                return(Request.CreateResponse(HttpStatusCode.OK, returnData));
            }
            else
            {
                return(Request.CreateResponse(HttpStatusCode.Forbidden));
            }
        }