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); } }
private void frmMostrarHistorial_Load(object sender, EventArgs e) { cboPaciente.DataSource = HistoriaDAL.ObtenerClientes(); cboPaciente.DisplayMember = "Apellido"; cboPaciente.ValueMember = "Id"; txtObservacion.Text = ""; }
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); }
private void cboPaciente_SelectedIndexChanged(object sender, EventArgs e) { cboFecha.DataSource = HistoriaDAL.ObtenerFecha(((Cliente)cboPaciente.SelectedItem).Id); cboFecha.DisplayMember = "Fecha"; txtObservacion.Text = ""; }