Beispiel #1
0
        /// <inheritdoc />
        public async Task <IEnumerable <SisEmployee> > GetAllASync()
        {
            var          requestEndpoint = $"List/{SisObjectTypeCode}/";
            const string parameters      = "&LIMITCOUNT=0&LIMITFROM=-1&VIEW=LIJST_WERKNEMERS_EMAIL";
            var          response        = await _sisApiClient.GetAsync(requestEndpoint, parameters);

            var employeeList = new List <SisEmployee>();

            if (response.IsSuccessStatusCode)
            {
                employeeList = await response.Content.ReadAsJsonAsync <List <SisEmployee> >();
            }

            return(employeeList);
        }
        /// <inheritdoc />
        public async Task <SisAccount> GetByIdAsync(int id)
        {
            var          requestEndpoint = $"List/{SisObjectTypeCode}/";
            const string parameters      = "&LIMITCOUNT=0&LIMITFROM=-1&VIEW=LIJST_BEDRIJVEN";
            var          filter          = $"ID={id} AND PRODUKTMARKT_ID = 7 AND KLANT = true";
            var          response        = await _sisApiClient.GetAsync(requestEndpoint, parameters, filter);

            var accountList = new List <SisAccount>();

            if (response.IsSuccessStatusCode)
            {
                accountList = await response.Content.ReadAsJsonAsync <List <SisAccount> >();
            }

            return(accountList.FirstOrDefault());
        }
Beispiel #3
0
        /// <inheritdoc />
        public async Task <IReadOnlyCollection <SisWorklogType> > GetAllAsync()
        {
            var          requestEndpoint = $"List/{SisObjectTypeCode}/";
            const string parameters      = "&LIMITCOUNT=0&LIMITFROM=-1&VIEW=LIJST_UURSOORTEN";
            var          response        = await _sisApiClient.GetAsync(requestEndpoint, parameters);

            var worklogTypeList = new List <SisWorklogType>();

            if (response.IsSuccessStatusCode)
            {
                worklogTypeList = await response.Content.ReadAsJsonAsync <List <SisWorklogType> >();
            }

            return(worklogTypeList);
        }
        /// <inheritdoc />
        public async Task <IEnumerable <SisProject> > GetAllAsync()
        {
            var          requestEndpoint = $"List/{ProjectTypeCode}/";
            const string parameters      = "&LIMITCOUNT=0&LIMITFROM=-1&VIEW=LIJST_PROJECTEN";
            const string filter          = "PRODUKTMARKT_ID = 7";
            var          response        = await _sisApiClient.GetAsync(requestEndpoint, parameters, filter);

            var projectList = new List <SisProject>();

            if (response.IsSuccessStatusCode)
            {
                projectList = await response.Content.ReadAsJsonAsync <List <SisProject> >();
            }
            return(projectList);
        }