protected async override void OnAppearing() { base.OnAppearing(); string attachmentInfo = string.Empty; try { switch (_classname) { case "safety": attachmentInfo = ((Models.FlightSafetyReportModel)_viewobject).Attachments; Title = "Flight Safety"; break; case "ground": attachmentInfo = ((Models.GroundSafetyReport)_viewobject).Attachments; Title = "Ground Safety"; break; case "cabin": attachmentInfo = ((Models.CabibSafetyReport)_viewobject).Attachments; Title = "Cabin Safety"; break; case "Injury": attachmentInfo = ((Models.InjuryIllnessReport)_viewobject).Attachments; Title = "Injury Illness"; break; case "security": attachmentInfo = ((Models.SecurityModel)_viewobject).Attachments; Title = "Security"; break; case "fatigue": attachmentInfo = ((Models.FatigueReport)_viewobject).Attachments; Title = "Fatigue"; break; default: Title = char.ToUpper(_classname[0]) + _classname.Substring(1); break; } var allFilesExists = await _attachementView.CheckAttachments(attachmentInfo); if (!allFilesExists) { await DisplayAlert("Warning", SPUtility.ATTACHMENT_FILES_NOT_FOUND, "Ok"); } } catch (Exception ex) { await DisplayAlert("Error", ex.Message, "Ok"); } }
protected async override void OnAppearing() { base.OnAppearing(); try { var allFilesExists = await _attachementView.CheckAttachments(_flightcrew.Attachments); if (!allFilesExists) { await DisplayAlert("Warning", SPUtility.ATTACHMENT_FILES_NOT_FOUND, "Ok"); } } catch (Exception ex) { await DisplayAlert("Error", ex.Message, "Ok"); } }