private async void Guardar_Clicked(object sender, EventArgs e) { if (stream != null || dato.Id > 0) { ActualizarActivityIndicator(true); if (dato.Id == 0) { dato = await ServicioWebApi.AddTarea(dato); } if (stream != null) { var servicioStorage = new ServicioStorage(); dato.ArchivoURL = await servicioStorage.UploadTarea(dato.Id, stream); } await ServicioWebApi.UpdateTarea(dato); ActualizarActivityIndicator(false); await DisplayAlert("Información", "Dato registrado con éxito", "OK"); await Navigation.PopAsync(); } else { await DisplayAlert("Información", "Debes agregar un archivo primero", "OK"); } }
private void Ver_Clicked(object sender, EventArgs e) { if (dato.Id > 0) { var servicioStorage = new ServicioStorage(); Device.OpenUri(new Uri(servicioStorage.GetFullDownloadTareaURL(dato.Id))); //var stream = await servicioStorage.DownloadTarea(dato.Id); } }
private void VerRespuesta_Clicked(object sender, EventArgs e) { var servicioStorage = new ServicioStorage(); Device.OpenUri(new Uri(servicioStorage.GetFullDownloadTareaAlumnoURL(dato.IdTarea, dato.IdAlumno))); }
private void VerTarea_Clicked(object sender, EventArgs e) { var servicioStorage = new ServicioStorage(); Device.OpenUri(new Uri(servicioStorage.GetFullDownloadTareaURL(dato.IdTarea))); }