コード例 #1
0
 public AgendarConsultaController()
 {
     eventoBusiness    = new EventoBusiness();
     pacienteBusiness  = new PacienteBusiness();
     emailBusiness     = new EmailBusiness();
     medicacaoBusiness = new MedicacaoBusiness();
 }
コード例 #2
0
 private void ReportePacientes_Load(object sender, EventArgs e)
 {
     _PacienteBP = new PacienteBusiness(DaoFactory.GetPacienteDao());
     LoadCombosBusqueda();
     MostrarPacientes();
 }
コード例 #3
0
 private void frmEstudio_Load(object sender, EventArgs e)
 {
     _PacienteBP = new PacienteBusiness(DaoFactory.GetPacienteDao());
     LoadList();
 }
コード例 #4
0
 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();
 }
コード例 #5
0
        private void frmPaciente_Load(object sender, EventArgs e)
        {
            CheckForIllegalCrossThreadCalls = false;
            _PacienteBP = new PacienteBusiness(DaoFactory.GetPacienteDao());
            LoadCombos();
            LoadCombosBusqueda();
            LoadList(false);

            if (EnfocarReporte)
            {
                buttonUC1.Focus();
            }
        }
コード例 #6
0
 public PacienteController(UnitOfWork uow)
 {
     _uow      = uow;
     _business = new PacienteBusiness(uow);
 }
コード例 #7
0
 public PacienteController()
 {
     business = new PacienteBusiness();
 }
コード例 #8
0
        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;
            }
        }
コード例 #9
0
 public PacientesController()
 {
     pacienteBusiness = new PacienteBusiness();
 }