private async void OpenAddSkillActionSheet()
        {
            var cfg = new ActionSheetConfig()
                      .SetTitle("Select Action");

            try
            {
                _skillCache = await _skillsService.GetAllSkillsAsync();
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                await _userDialogs.AlertAsync(ex.Message, "Error");
            }

            foreach (var skill in _skillCache)
            {
                cfg.Add(skill.Name, async() => await AddSkillToEmployee(skill.ID));
            }

            cfg.SetCancel("Cancel");

            _userDialogs.ActionSheet(cfg);
        }
Example #2
0
        public async Task <IActionResult> Get()
        {
            var skillsDtos = await _skillsService.GetAllSkillsAsync();

            return(new OkObjectResult(skillsDtos));
        }