private async void Enviar_Clicked(object sender, EventArgs e) { try { var arq = arquivo; arq.ProgNr = _codTarefa.HasValue ? _codTarefa.Value.ToString() : "0"; arq.CodEmpresa = ((Cliente)PckCliente.SelectedItem)?.Id ?? 0; arq.CodRespDig = Session.Usuario.Usw_cod; arq.DesArq = TxtTexto.Text; arq.PcsArq_AnotNr = _codAnot.HasValue? _codAnot.Value.ToString() : "0"; arq.PcsArq_CodOcorrencia = 0; var result = await TarefasWS.EnviarArquivo(arq); if (result) { await DisplayAlert("Sucesso", "Arquivo enviado.", "Ok"); Session.Navigation.Navigation.RemovePage(this); } } catch (Exception exception) { await DisplayAlert("Erro", exception.Message, "Ok"); } }
public async static Task <List <Tipo> > GetTipo() { try { return(await TarefasWS.GetTipo()); } catch (Exception e) { throw; } }
public async static Task <string> Cadastrar(Tarefas t) { try { return(await TarefasWS.Cadastrar(t)); } catch (Exception ex) { throw ex; } }
public async static Task <string> IncluirAnotacao(Tarefas t) { try { return(await TarefasWS.IncluirAnotacao(t)); } catch (Exception ex) { throw ex; } }
public async static Task <List <Tarefas> > GetTarefas(string tipo, string codUsuario) { try { return(await TarefasWS.GetTarefas(tipo, codUsuario)); } catch (Exception ex) { throw ex; } }