Exemplo n.º 1
0
        private async Task Submissions()
        {
            try
            {
                var code = await _inputBoxService.ShowInputBox("Submission Code", "Please enter the teacher code:",
                                                               () => GetProjectFile(true));

                if (string.IsNullOrWhiteSpace(code) != true)
                {
                    var result = await _gradeBookRepository.GetCodeProject(teacherCode : Guid.Parse(code));

                    if (result != null)
                    {
                        await _navigationService.ToPage("SubmissionsView", new NavigationParameter()
                        {
                            { "Project", result }
                        });
                    }
                    else
                    {
                        await _inputBoxService.ShowAlert("Could not find");
                    }
                }
                else
                {
                    await _inputBoxService.ShowAlert("Could not find");
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                await _inputBoxService.ShowAlert(e.ToString());
            }
        }
 public async Task <IActionResult> GetProject(Guid studentCode, Guid teacherCode)
 {
     return(Ok(await _repository.GetCodeProject(studentCode, teacherCode)));
 }