public AgendarConsultaController() { eventoBusiness = new EventoBusiness(); pacienteBusiness = new PacienteBusiness(); emailBusiness = new EmailBusiness(); medicacaoBusiness = new MedicacaoBusiness(); }
private void ReportePacientes_Load(object sender, EventArgs e) { _PacienteBP = new PacienteBusiness(DaoFactory.GetPacienteDao()); LoadCombosBusqueda(); MostrarPacientes(); }
private void frmEstudio_Load(object sender, EventArgs e) { _PacienteBP = new PacienteBusiness(DaoFactory.GetPacienteDao()); LoadList(); }
private void frmSeleccionAudifono_Load(object sender, EventArgs e) { _PacienteBP = new PacienteBusiness(DaoFactory.GetPacienteDao()); _EstudioBP = new EstudioBusiness(DaoFactory.GetEstudioDao()); _AudifonoBP = new AudifonoBusiness(DaoFactory.GetAudifonoDao()); _SeleccionBP = new SeleccionAudifonoBusiness(DaoFactory.GetSeleccionAudifonoDao()); LoadList(); }
private void frmPaciente_Load(object sender, EventArgs e) { CheckForIllegalCrossThreadCalls = false; _PacienteBP = new PacienteBusiness(DaoFactory.GetPacienteDao()); LoadCombos(); LoadCombosBusqueda(); LoadList(false); if (EnfocarReporte) { buttonUC1.Focus(); } }
public PacienteController(UnitOfWork uow) { _uow = uow; _business = new PacienteBusiness(uow); }
public PacienteController() { business = new PacienteBusiness(); }
public void Relatorio() { try { PacienteBusiness business = new PacienteBusiness(); List <Paciente> lista = business.ConsultarPaciente(); StringBuilder conteudo = new StringBuilder(); conteudo.Append("<h2>Relatório de paciente</h2>"); conteudo.Append("<p>TM Sistemas</p>"); conteudo.Append($"<p>Relatório gerado em: {DateTime.Now}</p>"); conteudo.Append("<br/>"); conteudo.Append("<br/>"); conteudo.Append("<table border='1' style='width: 100%'>"); conteudo.Append("<tr>"); conteudo.Append("<th>Nome</th>"); conteudo.Append("<th>CPF / CNPJ</th>"); conteudo.Append("<th>Endereço completo</th>"); conteudo.Append("<th>Celular</th>"); conteudo.Append("<th>Telefone</th>"); conteudo.Append("<th>Email</th>"); conteudo.Append("<th>Atendimento inicial</th>"); conteudo.Append("<th>Valor consulta</th>"); conteudo.Append("<th>Diagnostico</th>"); conteudo.Append("<th>Patologia</th>"); conteudo.Append("<th>Observação</th>"); conteudo.Append("</tr>"); foreach (Paciente paciente in lista) { conteudo.Append("<tr>"); conteudo.Append($"<td>{paciente.PaciNome}</td>"); conteudo.Append($"<td>{paciente.PaciCpfCnpj}</td>"); conteudo.Append($"<td>{paciente.PaciEndereco}</ td >"); conteudo.Append($"<td>{paciente.PaciCelular}</td>"); conteudo.Append($"<td>{paciente.PaciTelefone}</td>"); conteudo.Append($"<td>{paciente.PaciEmail}</td>"); conteudo.Append($"<td>{paciente.PaciDataInicioAtendimento.ToString("dd/MM/yyyy")}</td>"); conteudo.Append($"<td>{paciente.PaciValorAtendimento}</td>"); conteudo.Append($"<td>{paciente.PaciDiagnostico}</td>"); conteudo.Append($"<td>{paciente.PaciPatologia}</td>"); conteudo.Append($"<td>{paciente.PaciObservacao}</td>"); conteudo.Append("</tr>"); } conteudo.Append("</table>"); byte[] pdf = null; MemoryStream ms = new MemoryStream(); TextReader reader = new StringReader(conteudo.ToString()); Document doc = new Document(PageSize.A4.Rotate(), 50, 50, 50, 50); PdfWriter writer = PdfWriter.GetInstance(doc, ms); HTMLWorker html = new HTMLWorker(doc); doc.Open(); html.StartDocument(); html.Parse(reader); html.EndDocument(); html.Close(); doc.Close(); pdf = ms.ToArray(); Response.Clear(); Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", "attachment; filename=Pacientes.pdf"); Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.BinaryWrite(pdf); Response.End(); } catch (Exception e) { TempData["Mensagem"] = e.Message; } }
public PacientesController() { pacienteBusiness = new PacienteBusiness(); }