Exemplo n.º 1
0
        public List <clsPacNextLab> ObtenerHistoriaPaciente(clsPaciente paciente)
        {
            PacNextLabManager    manager = new PacNextLabManager();
            List <clsPacNextLab> lista   = manager.ObtenerDatosPacientesNextLab(paciente);

            return(lista);
        }
Exemplo n.º 2
0
        private static List <SqlParameter> crearLista(clsPaciente objPaciente)
        {
            List <SqlParameter> lstParametrosSQL = new List <SqlParameter>();
            SqlParameter        sqlParametro;

            foreach (PropertyInfo pi in objPaciente.GetType().GetProperties())
            {
                if (pi.CanRead)
                {
                    if (pi.Name.Substring(0, 1).CompareTo("_") != 0)
                    {
                        sqlParametro = new SqlParameter();
                        sqlParametro.ParameterName = "@" + pi.Name;
                        sqlParametro.Value         = pi.GetValue(objPaciente, null);
                        sqlParametro.Direction     = ParameterDirection.Input;

                        lstParametrosSQL.Add(sqlParametro);
                    }
                    else
                    {
                        continue;
                    }
                }
            }

            return(lstParametrosSQL);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["cdPaciente"] == null)
            {
                Response.Write("erro");
                return;
            }

            if (Request["cdPaciente"].ToString() == "")
            {
                Response.Write("erro");
                return;
            }

            string codigoPaciente = Request["cdPaciente"].ToString();


            clsPaciente classePaciente = new clsPaciente();

            if (!classePaciente.excluirPaciente(codigoPaciente))
            {
                Response.Write("erro");
                return;
            }
        }
        protected void grdTablaPacientes_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            try
            {
                int indice = Convert.ToInt32(e.CommandArgument);

                if (e.CommandName == "Modificar")
                {
                    txtIdUserMod.Text      = ((Label)grdTablaPacientes.Rows[indice].FindControl("lblIdPatients")).Text;
                    txtNombreMod.Text      = grdTablaPacientes.Rows[indice].Cells[1].Text;
                    txtApepatMod.Text      = grdTablaPacientes.Rows[indice].Cells[2].Text;
                    txtApematMod.Text      = grdTablaPacientes.Rows[indice].Cells[3].Text;
                    txtEdadMod.Text        = grdTablaPacientes.Rows[indice].Cells[5].Text;
                    txtSexoMod.Text        = grdTablaPacientes.Rows[indice].Cells[6].Text;
                    txtDiagnosticoMod.Text = grdTablaPacientes.Rows[indice].Cells[7].Text;
                    mpeModificar.Show();
                }
                else if (e.CommandName == "Desactivar")
                {
                    clsPaciente paciente   = new clsPaciente();
                    int         idPaciente = int.Parse(((Label)grdTablaPacientes.Rows[indice].FindControl("lblIdPatients")).Text);
                    String      mensaje    = paciente.desactivarPaciente(idPaciente);
                    lblDesactivar.Text = mensaje;

                    mpeDesactivar.Show();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 5
0
        public static bool eliminarPaciente(clsPaciente objPaciente)
        {
            List <SqlParameter> lstParametrosSQL = new List <SqlParameter>();
            SqlParameter        sqlParametro;

            lstParametrosSQL = crearLista(objPaciente);

            sqlParametro = new SqlParameter();
            sqlParametro.ParameterName = "@Accion";
            sqlParametro.Value         = 2;
            sqlParametro.Direction     = ParameterDirection.Input;

            lstParametrosSQL.Add(sqlParametro);

            sqlParametro = new SqlParameter();
            sqlParametro.ParameterName = "@IdGenerado";
            sqlParametro.Value         = 0;
            sqlParametro.Direction     = ParameterDirection.Output;

            lstParametrosSQL.Add(sqlParametro);

            int numResultado = clsGestorBD.ejecutarStoredProcedureInt("up_ManPaciente", lstParametrosSQL);

            if (numResultado != 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request["cdPaciente"] == null)
            {
                Response.Write("erro");
                return;
            }

            if (Request["cdPaciente"].ToString() == "")
            {
                Response.Write("erro");
                return;
            }

            string codigoPacienteSelecionada = Request["cdPaciente"].ToString();

            clsPaciente paciente = new clsPaciente();

            if (!paciente.confirmarEndereco(codigoPacienteSelecionada))
            {
                Response.Write("erro");
                return;
            }

            //Response.Write(paciente.nm_rua + ", " + paciente.nm_num + " " + paciente.nm_complemento + ", " + paciente.nm_cidade[0] + ", " + paciente.nm_estado[0]);
            Response.Write(paciente.nm_num + "/" + paciente.nm_rua + "/" + paciente.nm_complemento + "/" + paciente.nm_cidade[0] + "/" + paciente.nm_estado[0] + "/" + paciente.nm_bairro + "/" + paciente.cep + "/" + "Brazil");
        }
        /**
         * Se validan las variables de sesion enviadas desde el logueo de la aplicación.
         *
         * Se carga el Gridview con los datos de los pacientes ingresados en el sistema.
         */
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                String typeRol = Session["rol"].ToString();
                if (!typeRol.Equals("usuario"))
                {
                    Response.Redirect("../Login.aspx");
                }
                else
                {
                }
            }
            catch (Exception)
            {
                Response.Redirect("../Login.aspx");
                throw;
            }

            if (!IsPostBack)
            {
                try
                {
                    clsPaciente paciente = new clsPaciente();
                    grdTablaPacientes.DataSource = paciente.mostrarPacientes();
                    grdTablaPacientes.DataBind();
                }
                catch (Exception ex)
                {
                    throw ex;
                }
            }
        }
        /**
         * Evento click fantasma: Representa un boton oculto  que gatilla el updatepanel
         * para el gridview al insertar un nuevo paciente en la ventana modal de registro
         */
        protected void updateGrid_Click(object sender, EventArgs e)
        {
            clsPaciente paciente = new clsPaciente();

            grdTablaPacientes.DataSource = paciente.mostrarPacientes();
            grdTablaPacientes.DataBind();
        }
 public CitaNuevaRequest_Modif_Cita()
 {
     mdlUser        = new clsUsuario();
     mdlPaciente    = new clsPaciente();
     lstAdicionales = new List <clsAdicionales>();
     lstEstudios    = new List <clsEstudioNuevaCita>();
     intCitaID      = int.MinValue;
 }
Exemplo n.º 10
0
 public CapturasViewModel()
 {
     Paciente     = new clsPaciente();
     Presupuesto  = new clsPresupuesto();
     Estudio      = new clsEstudio();
     TipoEstudios = new List <clsTipoEstudio>();
     Prioridades  = new List <clsPrioridad>();
 }
Exemplo n.º 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            clsPaciente clsPaciente = new clsPaciente();
            string      cdNecessidade = "", email_logado = "", ds_paciente = "", cep_paciente = "", nm_paciente = "", cidade_paciente = "", bairro_paciente = "", rua_paciente = "", num_paciente = "", complemento_paciente = "", uf_paciente = "", imgPaciente = "";

            try
            {
                email_logado         = Request["usuarioLogado"].ToString();
                ds_paciente          = Request["descricao"].ToString();
                cep_paciente         = Request["CEP"].ToString();
                nm_paciente          = Request["nome"].ToString();
                cidade_paciente      = Request["cidade"].ToString();
                bairro_paciente      = Request["bairro"].ToString();
                rua_paciente         = Request["rua"].ToString();
                num_paciente         = Request["numero"].ToString();
                uf_paciente          = Request["uf"].ToString();
                cdNecessidade        = Request["cdNecessidade"].ToString();
                complemento_paciente = Request["complemento"].ToString();
                imgPaciente          = Request["imagemPaciente"].ToString();
            }
            catch {
                Response.Write("false");
                return;
            }



            //try
            //{
            //    complemento_paciente = Request["complemento"].ToString();
            //}
            //catch { complemento_paciente = ""; }


            if (!clsPaciente.adicionarPaciente(email_logado, nm_paciente, ds_paciente, cep_paciente, cidade_paciente, bairro_paciente, rua_paciente, num_paciente, uf_paciente, complemento_paciente, imgPaciente))
            {
                Response.Write("false");
            }

            if (!clsPaciente.listarCodigoPaciente())
            {
                Response.Write("false");
            }


            string[] necessidades = cdNecessidade.Split(';');


            for (int i = 0; i < necessidades.Length; i++)
            {
                if (!clsPaciente.editarNecessidadesPaciente(necessidades[i], clsPaciente.ultimoCodigoPaciente))
                {
                    Response.Write("false");
                }
            }

            Response.Write("true");
        }
Exemplo n.º 12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            clsPaciente paciente = new clsPaciente();

            #region validação

            if (Request["cdServico"] == "" || Request["cdServico"] == null)
            {
                Response.Write("false");
                return;
            }
            #endregion

            string cdServico = Request["cdServico"];

            if (!paciente.infoServicoAtual(cdServico))
            {
                Response.Write("false");
                return;
            }

            string infoServico = "";

            infoServico += "<div class='areaDadosBuscandoCuidadores'>";
            infoServico += "<div class='areaImagemCuidador'></div>";

            try
            {
                infoServico += "<div class='invi' style='display: none'>" + paciente.base64String[0] + "</div>";
            }
            catch {
                Response.Write("erro");
                return;
            }

            infoServico += "<div class='areaDadosCuidador'>";
            infoServico += "<h3>" + paciente.nm_cuidador + "</h3>";
            string duracao        = paciente.duracao;
            string duracaoMinutos = duracao[4].ToString() + duracao[5].ToString();
            string duracaoHoras   = duracao[0].ToString() + duracao[1].ToString();
            double horaFinal      = double.Parse(duracaoHoras) + (double.Parse(duracaoMinutos) / 60);
            double valorTotal     = horaFinal * double.Parse(paciente.vl_trabalho);
            infoServico += "<h4>" + paciente.nm_rua + " " + paciente.nm_num + " - " + paciente.nm_bairro + " " + paciente.dt_inicio_servico + " - " + paciente.dt_semana + " | " + paciente.hr_inicio_servico + " - " + paciente.hr_fim_servico + " | " + valorTotal.ToString("C") + "</h4>";
            infoServico += "</div>";
            infoServico += "</div>";
            infoServico += "<h3 class='tituloBuscandoCuidadores'>Localização do Cuidador</h3>";
            infoServico += "<div class='areaLocalizacaoCuidador'>";
            infoServico += "<div id='map'></div>";
            infoServico += "<span id='informacoesEndereco' style='display:none;'>" + paciente.nm_rua + ' ' + paciente.nm_num + ' ' + paciente.nm_bairro + ' ' + paciente.nm_cidade[0] + ' ' + paciente.nm_estado[0] + "</span>";
            infoServico += "</div>";
            infoServico += "<h3 class='tituloBuscandoCuidadores' style='width: 311px; margin-left: 22px;font-size:15px;color:#222;'>Estimativa de 30 minutos até sua chegada</h3>";
            infoServico += "<button class='btnCancelar' type='button'>Cencelar</button>";

            Response.Write(infoServico);
        }
Exemplo n.º 13
0
 public PacienteRequest()
 {
     mdlUser       = new clsUsuario();
     mdlPaciente   = new clsPaciente();
     mdlDireccion  = new clsDireccion();
     intPacienteID = int.MinValue;
     intSitioID    = int.MinValue;
     busqueda      = string.Empty;
     lstIdent      = new List <tbl_REL_IdentificacionPaciente>();
     lstVarAdic    = new List <tbl_DET_PacienteDinamico>();
 }
Exemplo n.º 14
0
 public void ObtenerDesdeBuscador(Int32 CodPaciente)
 {
     Paciente            = AdmClin.CargaPaciente(CodPaciente);
     txtEspecie.Text     = Paciente.Especie;
     txtNombre.Text      = Paciente.Nombre;
     txtRaza.Text        = Paciente.Raza;
     txtPropietario.Text = Paciente.Propietario;
     txtDireccion.Text   = Paciente.Direccion;
     txtEdad.Text        = CalcularDiferenciaEntreFechas(Paciente.FechaNacimiento, DateTime.Now);
     txtSexo.Text        = Paciente.Sexo;
 }
Exemplo n.º 15
0
 public PacienteResponse()
 {
     Success       = false;
     Mensaje       = string.Empty;
     intPacienteID = int.MinValue;
     mdlPaciente   = new clsPaciente();
     mdlDireccion  = new clsDireccion();
     lstCadenas    = new List <string>();
     lstIden       = new List <tbl_REL_IdentificacionPaciente>();
     lstVarAdi     = new List <clsVarAcicionales>();
     lstPacientes  = new List <clsPaciente>();
 }
Exemplo n.º 16
0
 public bool UpdatePaciente(clsPaciente Paciente)
 {
     try
     {
         return(MClin.UpdatePaciente(Paciente));
     }
     catch (Exception ex)
     {
         DevComponents.DotNetBar.MessageBoxEx.Show("Se encontró el siguiente problema: " + ex.Message, "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return(false);
     }
 }
        /**
         * Evento Click el cual Modifica Los datos de una cuenta de usuario y los guarda en la base de datos.
         */
        public void btnOkModificar_Click(object sender, EventArgs e)
        {
            try
            {
                clsPaciente paciente = new clsPaciente();

                paciente.modificarPaciente(int.Parse(txtIdUserMod.Text), txtNombreMod.Text, txtApepatMod.Text, txtApematMod.Text, int.Parse(txtEdadMod.Text), txtSexoMod.Text, txtDiagnosticoMod.Text);
                mpeModificar.Hide();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 18
0
        /**
         * Evento click para guardar un paciente en la base de datos
         */
        protected void btnSavePaciente_Click(object sender, EventArgs e)
        {
            clsPaciente paciente = new clsPaciente();

            String   nomPaciente         = txtNombrePaciente.Text;
            String   apepatPaciente      = txtApepatPaciente.Text;
            String   apematPaciente      = txtApematPaciente.Text;
            String   edadPaciente        = txtEdadPaciente.Text;
            String   numFicha            = txtNumFicha.Text;
            String   diagnosticoPaciente = txtDiagnostico.Text;
            DateTime fecha = DateTime.Now;
            String   sexo  = "";

            if (rbMasculino.Checked)
            {
                sexo = "M";
            }
            if (rbFemenino.Checked)
            {
                sexo = "F";
            }

            String rut = paciente.validarRut(txtRutPaciente.Text);

            // Validamos el rut
            if (rut.Equals("Rut invalido"))
            {
                lblRutInvalido.Text = rut;
            }
            else
            {
                lblRutInvalido.Text = "";
            }

            // Verificamos si los campos no vienen vacios
            if (nomPaciente == "" || apepatPaciente == "" || apematPaciente == "" || edadPaciente == "" || numFicha == "" || diagnosticoPaciente == "" || rut.Equals("Rut invalido"))
            {
                lblResultado.Text = "Complete los campos requeridos(*)";
                modalAddPaciente.Show();
            }
            else
            {
                //Guardamos al paciente en la base de datos
                paciente.guardarPaciente(nomPaciente, apepatPaciente, apematPaciente, Convert.ToInt32(rut),
                                         Convert.ToInt32(edadPaciente), sexo, diagnosticoPaciente, Convert.ToInt32(numFicha), fecha, idUser());
                modalAddPaciente.Hide();
                limpiar();
                updateGrid_Click(updateGrid, new EventArgs()); // Actualizamos el gridTable con los pacientes registrados despues de guardar
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             clsPaciente paciente = new clsPaciente();
             grdTablaPacientes.DataSource = paciente.mostrarPacientes();
             grdTablaPacientes.DataBind();
         }
         catch (Exception ex)
         {
             throw ex;
         }
     }
 }
Exemplo n.º 20
0
 private void fillPaciente(clsPaciente mdlPaciente)
 {
     try
     {
         txtNombreDet.Text          = mdlPaciente.vchNombre;
         txtApellidosDet.Text       = mdlPaciente.vchApellidos;
         txtFecNacDet.Text          = mdlPaciente.datFechaNac.ToString("dd/MM/yyyy");
         ddlGeneroDet.SelectedValue = mdlPaciente.intGeneroID.ToString();
         txtNumContactDet.Text      = mdlPaciente.vchNumeroContacto;
         txtEmailDet.Text           = mdlPaciente.vchEmail;
         Session["intDetPaciente"]  = mdlPaciente.intDETPacienteID > 0 ? mdlPaciente.intDETPacienteID : 0;
     }
     catch (Exception eFI)
     {
         Log.EscribeLog("Existe un error en fillPaciente: " + eFI.Message, 3, Usuario.vchUsuario);
     }
 }
Exemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            clsPaciente clsPaciente = new clsPaciente();
            string      cd_paciente = Request["cd"].ToString();

            if (clsPaciente.buscarDadosPaciente(cd_paciente))
            {
                string resposta = clsPaciente.nm_paciente[0] + "|" + clsPaciente.nm_tipo_necessidade_paciente + "|" + clsPaciente.ds_paciente + "|";
                resposta += clsPaciente.cep + "|" + clsPaciente.nm_cidade[0] + "|" + clsPaciente.nm_bairro + "|" + clsPaciente.nm_rua + "|";
                resposta += clsPaciente.nm_num + "|" + clsPaciente.nm_estado[0] + "|" + clsPaciente.nm_complemento + "|" + clsPaciente.base64String[0] + "|" + clsPaciente.cdTipoNecessidade[0];
                Response.Write(resposta);
            }
            else
            {
                Response.Write("false");
            }
        }
Exemplo n.º 22
0
        public int agregar_paciente(clsPaciente pac)
        {
            try
            {
                object[] paciente = new object[5];
                paciente[0] = pac.Afiliacion;
                paciente[1] = pac.Ape_pat;
                paciente[2] = pac.Ape_mat;
                paciente[3] = pac.Nombre;
                paciente[4] = pac.Num_tel;

                return(Convert.ToInt32(SqlHelper.ExecuteScalar(SqlHelper.connString, "agr_pac_RMN", paciente)));
            }
            catch (Exception)
            {
                return(0);
            }
        }
Exemplo n.º 23
0
        public int agregar_paciente(clsPaciente pac)
        {
            try
            {
                object[] paciente = new object[5];
                paciente[0] = pac.Afiliacion;
                paciente[1] = pac.Ape_pat;
                paciente[2] = pac.Ape_mat;
                paciente[3] = pac.Nombre;
                paciente[4] = pac.Num_tel;

                return Convert.ToInt32(SqlHelper.ExecuteScalar(SqlHelper.connString, "agr_pac_RMN", paciente));
            }
            catch (Exception)
            {
                return 0;
            }
        }
Exemplo n.º 24
0
        private void PostConstructor()
        {
            txtNombre.Enabled = false;
            txtNombre.Text    = string.Empty;

            txtPropietario.Enabled = false;
            txtPropietario.Text    = string.Empty;

            txtEdad.Text = string.Empty;

            txtRaza.Enabled = false;
            txtRaza.Text    = string.Empty;

            txtDireccion.Enabled = false;
            txtDireccion.Text    = string.Empty;

            cmbEspecie.Enabled = false;
            cmbEspecie.Items.Clear();
            cmbSexo.Enabled = false;
            cmbSexo.Items.Clear();
            dtiFechaNacimiento.Enabled = false;
            dtiFechaNacimiento.Value   = DateTimePicker.MinimumDateTime;

            //Inicializacion Administradores
            AdmClinica = new clsAdmClinica();


            Paciente = null;

            dtiFechaNacimiento.MaxDate = DateTime.Now;

            btnNuevo.Enabled     = true;
            btnModificar.Enabled = false;
            btnGuardar.Enabled   = false;
            btnEliminar.Enabled  = false;
            btnCancelar.Enabled  = false;

            CargarData();

            if (dgvDetalle.RowCount > 0)
            {
                btnModificar.Enabled = true;
            }
        }
Exemplo n.º 25
0
        private void buscarCriterios(object sender, EventArgs e)
        {
            try
            {
                clsPaciente objPaciente = new clsPaciente();
                objPaciente.Paterno = txtPaternoBuscar.Text;
                objPaciente.Materno = txtMaternoBuscar.Text;
                objPaciente.Nombres = txtNombresBuscar.Text;
                objPaciente.NumeroHistoriaClinica = txtNumeroHistoriaClinicaBuscar.Text;
                objPaciente.IdTipoDocumento       = ((clsTipoDocumento)cboTipoDocumentoBuscar.SelectedItem).IdTipoDocumento;
                objPaciente.NumeroDocumento       = txtNumeroDocumentoBuscar.Text;

                dtPacientes = ctrPaciente.seleccionarPacientesCriterios(objPaciente);
                cargarGrilla();
            }
            catch
            {
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            clsPaciente classePaciente = new clsPaciente();

            if (!classePaciente.listarNecessidades())
            {
                Response.Write("erro");
            }

            string listaNecessidade = "";

            for (int i = 0; i < classePaciente.cdTipoNecessidade.Count; i++)
            {
                listaNecessidade += "<option id='opt" + classePaciente.nmTipoNecessidade[i] + "'value='" + classePaciente.cdTipoNecessidade[i] + "'>" + classePaciente.nmTipoNecessidade[i] + "</option> -->";
            }


            Response.Write(listaNecessidade);
        }
Exemplo n.º 27
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            if (dgvDetalle.Rows.Count > 0)
            {
                if (dgvDetalle.CurrentRow != null)
                {
                    Int32 IDPaciente = Convert.ToInt32(dgvDetalle.CurrentRow.Cells[0].Value.ToString());
                    Paciente = AdmClinica.CargaPaciente(IDPaciente);
                    if (Paciente.Estado != -1)
                    {
                        CargarEspecies();
                        CargarSexo();

                        txtNombre.Text           = Paciente.Nombre;
                        txtPropietario.Text      = Paciente.Propietario;
                        txtRaza.Text             = Paciente.Raza;
                        dtiFechaNacimiento.Value = Paciente.FechaNacimiento;
                        txtDireccion.Text        = Paciente.Direccion;
                        cmbEspecie.SelectedItem  = Paciente.Especie;
                        cmbSexo.SelectedItem     = Paciente.Sexo;

                        txtNombre.Enabled = true;

                        txtPropietario.Enabled = true;


                        txtRaza.Enabled = true;

                        txtDireccion.Enabled = true;

                        cmbEspecie.Enabled         = true;
                        cmbSexo.Enabled            = true;
                        dtiFechaNacimiento.Enabled = true;

                        btnNuevo.Enabled    = false;
                        btnGuardar.Enabled  = true;
                        btnEliminar.Enabled = true;
                        btnCancelar.Enabled = true;
                    }
                }
            }
        }
Exemplo n.º 28
0
        public bool InsertPaciente(clsPaciente Paciente)
        {
            try
            {
                return(MClin.InsertPaciente(Paciente));
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains("Duplicate entry"))
                {
                    DevComponents.DotNetBar.MessageBoxEx.Show("Se encontró el siguiente problema: N°- de Documento Repetido", "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }

                else
                {
                    DevComponents.DotNetBar.MessageBoxEx.Show("Se encontró el siguiente problema: " + ex.Message, "Advertencia", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
                return(false);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            #region Verificação
            if (Request["usuarioLogado"] != null)
            {
                if (Request["usuarioLogado"].ToString() == "")
                {
                    Response.Write("usuarioIncorreto");
                    return;
                }
            }
            else
            {
                Response.Write("usuarioIncorreto");
                return;
            }
            #endregion

            clsPaciente paciente = new clsPaciente();

            string usuarioLogado = Request["usuarioLogado"].ToString();

            if (!paciente.buscarPacientes(usuarioLogado))
            {
                return;
            }

            string listaPacientes = "";

            for (int i = 0; i < paciente.cd_paciente.Count; i++)
            {
                listaPacientes += "<div class='areaPaciente " + paciente.cd_paciente[i] + "'>";
                listaPacientes += "<div class='areaImagemPaciente' style='margin-left: 5px;'></div>";
                listaPacientes += "<h3 class='nomePaciente'>" + paciente.nm_paciente[i] + "</h3>";
                listaPacientes += "<span class='enderecoPaciente'>" + paciente.nm_cidade[i] + " - " + paciente.nm_estado[i] + "</span>";
                listaPacientes += "<div class='invi' style='display: none'>" + paciente.base64String[i] + "</div>";
                listaPacientes += "</div>";
            }

            Response.Write(listaPacientes);
        }
Exemplo n.º 30
0
        public bool InsertPaciente(clsPaciente Paciente)
        {
            try
            {
                con.conectarBD();

                cmd             = new MySqlCommand("GuardaPaciente", con.conector);
                cmd.CommandType = CommandType.StoredProcedure;
                MySqlParameter oParam;
                oParam           = cmd.Parameters.AddWithValue("_nombre", Paciente.Nombre);
                oParam           = cmd.Parameters.AddWithValue("_fechaNacimiento", Paciente.FechaNacimiento);
                oParam           = cmd.Parameters.AddWithValue("_propietario", Paciente.Propietario);
                oParam           = cmd.Parameters.AddWithValue("_especie", Paciente.Especie);
                oParam           = cmd.Parameters.AddWithValue("_raza", Paciente.Raza);
                oParam           = cmd.Parameters.AddWithValue("_sexo", Paciente.Sexo);
                oParam           = cmd.Parameters.AddWithValue("_direccion", Paciente.Direccion);
                oParam           = cmd.Parameters.AddWithValue("_usuario", Paciente.UsuarioID);
                oParam           = cmd.Parameters.AddWithValue("_fechaRegistro", Paciente.FechaRegistro);
                oParam           = cmd.Parameters.AddWithValue("_estado", Paciente.Estado);
                oParam           = cmd.Parameters.AddWithValue("newid", 0);
                oParam.Direction = ParameterDirection.Output;
                int x = cmd.ExecuteNonQuery();

                Paciente.ID = Convert.ToInt32(cmd.Parameters["newid"].Value);

                if (x != 0)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch (MySqlException ex)
            {
                throw ex;
            }
            finally { con.conector.Dispose(); cmd.Dispose(); con.desconectarBD(); }
        }
Exemplo n.º 31
0
 private void btnBuscar_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(txtNumero.Text))
     {
         HistoriaCab = AdmClin.CargaHistoriaCabecera(txtNumero.Text);
         if (HistoriaCab != null)
         {
             Paciente            = AdmClin.CargaPaciente(HistoriaCab.PacienteID);
             txtEspecie.Text     = Paciente.Especie;
             txtNombre.Text      = Paciente.Nombre;
             txtRaza.Text        = Paciente.Raza;
             txtPropietario.Text = Paciente.Propietario;
             txtDireccion.Text   = Paciente.Direccion;
             txtEdad.Text        = CalcularDiferenciaEntreFechas(Paciente.FechaNacimiento, DateTime.Now);
             txtSexo.Text        = Paciente.Sexo;
             CargarOcurrencias();
         }
         else
         {
             MessageBox.Show("NO SE ENCONTRO NINGUNA HISTORIA CON EL NUMERO INGRESADO", "SGE SYSTEM'S", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
 }
Exemplo n.º 32
0
 public void modificar_paciente(clsPaciente paci)
 {
     throw new NotImplementedException();
 }
 public Boolean GuardarPaciente(clsPaciente Paciente)
 {
     clsPacienteDAO dal = new clsPacienteDAO();
     return dal.RegistrarPaciente(Paciente);
 }