private void AtualizarStatus() { AgendamentoManager agendamentoManager = new AgendamentoManager(); Agendamento agendamentoAtualizado = agendamentoManager.getAgendamento(AtualizarAgendamento); switch (statusAtualizarAgendamento) { case 1: agendamentoAtualizado.Status = EStatusDeAgendamento.Normal; break; case 2: agendamentoAtualizado.Status = EStatusDeAgendamento.Cancelado; break; case 3: agendamentoAtualizado.Status = EStatusDeAgendamento.Faltado; break; case 4: agendamentoAtualizado.Status = EStatusDeAgendamento.Realizado; break; } agendamentoManager.setStatus(agendamentoAtualizado); GetAgendamentos(); }
private void salvarAgendamento() { if (isValid) { AgendamentoManager agendamentoManager = new AgendamentoManager(); agendamentoManager.AdicionarAgendamento(NovoAgendamento); } GetAgendamentos(); }
public void GetAgendamentos() { if (!String.IsNullOrEmpty(NameOrProtocol)) { if (isProtocol(NameOrProtocol)) { SearchEntity.Paciente.Protocolo = NameOrProtocol; } else { SearchEntity.Paciente.Nome = NameOrProtocol; } } AgendamentoManager agendamentoManager = new AgendamentoManager(); ListaDeAgendamento = agendamentoManager.GetAgendamentos(SearchEntity); }