Esempio n. 1
0
        private ShiftChangeRequestListsDTO GetShiftChangeRequestList()
        {
            ShiftChangeRequestListsDTO er = new ShiftChangeRequestListsDTO();

            if (ClaimsHelper.IsInRole(System.Web.HttpContext.Current, Constants.RoleBusinessLocationManager))
            {
                //Get a summary of the employes currently linked to the Employee
                using (HttpClientWrapper httpClient = new HttpClientWrapper(Session))
                {
                    Task <String> response = httpClient.GetStringAsync("api/ManagerShiftActionAPI/GetShiftChangeRequests");
                    er = Task.Factory.StartNew(() => JsonConvert.DeserializeObject <ShiftChangeRequestListsDTO>(response.Result)).Result;
                }
            }
            return(er);
        }
Esempio n. 2
0
        private IEnumerable <EmployerRequestDTO> GetEmployerRequestList()
        {
            IEnumerable <EmployerRequestDTO> er = new List <EmployerRequestDTO>();

            if (ClaimsHelper.IsInRole(System.Web.HttpContext.Current, Constants.RoleBusinessLocationManager))
            {
                //Get a summary of the employes currently linked to the Employee
                using (HttpClientWrapper httpClient = new HttpClientWrapper(Session))
                {
                    Task <String> response = httpClient.GetStringAsync("api/RequestAPI");
                    er = Task.Factory.StartNew(() => JsonConvert.DeserializeObject <IEnumerable <EmployerRequestDTO> >(response.Result)).Result;
                }
            }
            return(er);
        }
Esempio n. 3
0
        public ActionResult ExternalUserProfile(Guid externalshiftRequestID, Guid ExternalShiftBroadCastID)
        {
            UserProfilesDTO up = new UserProfilesDTO();

            if (ClaimsHelper.IsInRole(System.Web.HttpContext.Current, Constants.RoleBusinessLocationManager))
            {
                //Get a summary of the employes currently linked to the Employee
                using (HttpClientWrapper httpClient = new HttpClientWrapper(Session))
                {
                    var response = httpClient.GetAsync("api/ManagerShiftActionAPI/ExternalUserProfile?ID=" + externalshiftRequestID).Result;
                    up = JsonConvert.DeserializeObject <UserProfilesDTO>(response.Content.ReadAsStringAsync().Result);
                    up.ExternalShiftBroadCastID = ExternalShiftBroadCastID;
                    up.ExternalshfitRequestID   = externalshiftRequestID;
                    // er = Task.Factory.StartNew(() => JsonConvert.DeserializeObject<ExternalShiftRequestListsDTO>(response.Result)).Result;
                }
            }

            return(PartialView(up));
        }