Esempio n. 1
0
        private void btnCargar_Click_1(object sender, EventArgs e)
        {
            Historias pHistorias = new Historias();

            if (!HistoriaDAL.ExisteHistoria(dtpFecha1.Text, Convert.ToInt32(cboCliente.SelectedValue)))
            {
                if (validar())
                {
                    pHistorias.Fecha       = dtpFecha1.Text;
                    pHistorias.Observacion = textBox1.Text;
                    pHistorias.idPaciente  = Convert.ToInt32(cboCliente.SelectedValue);


                    int resultado = HistoriaDAL.AgregarHistoria(pHistorias);

                    if (resultado > 0)
                    {
                        MessageBox.Show("Hitoria Guardada Correctamente", "Datos Guardados", MessageBoxButtons.OK,
                                        MessageBoxIcon.Information);
                    }
                    else
                    {
                        MessageBox.Show("No se pudo Guardar", "Error al Guardar", MessageBoxButtons.OK,
                                        MessageBoxIcon.Exclamation);
                    }
                }
            }
            else
            {
                MessageBox.Show("Ya se Cargo Historia para  esa Fecha sobre el Paciente Seleccionado", "Error al Guardar", MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation);
            }
        }
Esempio n. 2
0
 private void frmMostrarHistorial_Load(object sender, EventArgs e)
 {
     cboPaciente.DataSource    = HistoriaDAL.ObtenerClientes();
     cboPaciente.DisplayMember = "Apellido";
     cboPaciente.ValueMember   = "Id";
     txtObservacion.Text       = "";
 }
Esempio n. 3
0
        public OutGetRegistrosHistorial getHistorialRegistros(InGetRegistrosHistorial Input)
        {
            var response = new OutGetRegistrosHistorial();

            try
            {
                var dal = new  HistoriaDAL();
                response = dal.GetRegistrosHistorial(Input);
            }
            catch (Exception ex)
            {
                response.State   = false;
                response.Message = ex.Message;
            }

            return(response);
        }
Esempio n. 4
0
 private void cboPaciente_SelectedIndexChanged(object sender, EventArgs e)
 {
     cboFecha.DataSource    = HistoriaDAL.ObtenerFecha(((Cliente)cboPaciente.SelectedItem).Id);
     cboFecha.DisplayMember = "Fecha";
     txtObservacion.Text    = "";
 }