示例#1
0
        /// <summary>
        /// requests password change
        /// </summary>
        /// <param name="changePasswordRequest"></param>
        /// <returns></returns>
        public async Task ChangePassword(ChangePasswordRequest changePasswordRequest)
        {
            _loggingService.LogDebug(new
            {
                action = nameof(ChangePassword)
            });

            await _apiService.PostAsync("Account/ChangePassword", changePasswordRequest);
        }
示例#2
0
        /// <summary>
        /// sends employee data towards the server
        /// if it is already in the database, it updates
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public async Task AddOrEditEmployee(EmployeeDto dto)
        {
            _loggingService.LogDebug(new
            {
                action = nameof(AddOrEditEmployee),
                dto    = dto.ToString()
            });

            await _apiService.PostAsync("Employee/AddOrEditEmployee", dto);
        }
示例#3
0
        /// <summary>
        /// creates a new item
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public async Task <bool> AddNewInventoryItem(ItemDto dto)
        {
            _loggingService.LogDebug(new
            {
                action = nameof(AddNewInventoryItem),
                dto    = dto.ToString()
            });

            return(await _apiService.PostAsync("Item/AddNewItem", dto));
        }
示例#4
0
        /// <summary>
        /// requests the change of departemnt on the ids
        /// </summary>
        /// <param name="itemIds"></param>
        /// <param name="departmentId"></param>
        /// <param name="priority"></param>
        /// <returns></returns>
        public async Task <List <ItemDto> > ChangeDepartment(List <int> itemIds, int departmentId, bool priority)
        {
            _loggingService.LogDebug(new
            {
                action = nameof(ChangeDepartment),
                itemIds,
                departmentId,
                priority
            });

            var operations = itemIds.Select(itemId => new OperationDto
            {
                ItemId        = itemId,
                OperationType = OperationType.ChangeDepartment,
                PayLoadId     = departmentId,
                Priority      = priority
            }).ToList();

            return(await _apiService.PostAsync <List <OperationDto>, List <ItemDto> >("Operation/QueueOperations", operations));
        }