Exemple #1
0
        public async Task AddAsync()
        {
            try
            {
                if (!Employees.Any(x => x.Value == true))
                {
                    _notSelected = true;
                    return;
                }

                var employeeIds = Employees.Where(x => x.Value).Select(x => x.Key.Id).ToList();

                await GroupService.AddEmployeesToGroupAsync(employeeIds, GroupId);

                await ToastService.ShowToastAsync("Employee added.", ToastType.Success);

                //await SynchronizationService.UpdateGroupDetails(ExceptPageId, GroupId);
                //await ModalDialogService.CloseAsync();
            }
            catch (Exception ex)
            {
                Logger.LogError(ex.Message);
                await ToastService.ShowToastAsync(ex.Message, ToastType.Error);

                //await ModalDialogService.CloseAsync();
            }
        }