public void limpiarComponentes() { txtNombreCliente.Text = ""; txtDNI.Text = ""; txtCorreo.Text = ""; txtTelef.Text = ""; rbFemenino.Checked = false; rbMasculino.Checked = false; txtAseguradora.Text = ""; txtNumAseguradora.Text = ""; cboSedes.SelectedIndex = -1; txtNombreEmergencia.Text = ""; txtTelefonoEmergencia.Text = ""; dgvContactos.RowCount = 0; dgvBebes.RowCount = 0; udNumPartos.Value = 0; udNumEmbarazos.Value = 0; txtObservaciones.Text = ""; txtDNIPareja.Text = ""; txtNombrePareja.Text = ""; rbFemeninoPareja.Checked = false; rbMasculino.Checked = false; dgvGestaciones.RowCount = 0; cliente = new Service.cliente(); apoderado = new Service.apoderado(); gestante = new Service.gestante(); gestacion = new Service.gestacion(); contacto = new Service.contactoEmergencia(); bebe = new Service.bebe(); contactos = new BindingList <Service.contactoEmergencia>(); bebes = new BindingList <Service.bebe>(); gestacion = new Service.gestacion(); condiciones = new BindingList <Service.condicionMedica>(); }
public frmGestionarGestacion(Service.gestacion gestacion) { InitializeComponent(); Formateador f = new Formateador(); f.iniFormFreddyGestionar(this, "Gestionar bebé", pnlCtn, btnNuevo, btnBuscar, btnGuardar, btnModificar, btnCancelar, true); }
private void btnSeleccionarGestacion_Click(object sender, EventArgs e) { //si dgv no está vacío gestacion = gestaciones[dgvGestaciones.CurrentRow.Index]; //la idea es que se modifique frmGestionarGestacion formGestionarGestacion = new frmGestionarGestacion(gestacion); if (formGestionarGestacion.ShowDialog() == DialogResult.OK) { } }
private void btnAgregarGestacion_Click(object sender, EventArgs e) { frmGestionarGestacion formGestionarGestacion = new frmGestionarGestacion((int)udNumEmbarazos.Value); if (formGestionarGestacion.ShowDialog() == DialogResult.OK) { gestacion = formGestionarGestacion.Gestacion; gestaciones.Add(gestacion); Object[] filaGestacion = new Object[2]; filaGestacion[0] = gestacion.clinica; filaGestacion[1] = gestacion.fecha_probable_parto.ToShortDateString(); dgvGestaciones.Rows.Add(filaGestacion); } }
private void btnSeleccionarGestacion_Click(object sender, EventArgs e) { if (gestaciones != null && dgvGestaciones.RowCount != 0) { gestacion = gestaciones[dgvGestaciones.CurrentRow.Index]; frmGestionarGestacion formGestionarGestacion = new frmGestionarGestacion(gestacion, (int)udNumEmbarazos.Value); if (formGestionarGestacion.ShowDialog() == DialogResult.OK) { gestacion = formGestionarGestacion.Gestacion; gestaciones[dgvGestaciones.CurrentRow.Index] = gestacion; //actualizar la fila dgvGestaciones.Rows[dgvGestaciones.CurrentRow.Index].Cells[0].Value = gestacion.clinica; dgvGestaciones.Rows[dgvGestaciones.CurrentRow.Index].Cells[1].Value = gestacion.fecha_probable_parto.ToShortDateString(); } } }
public frmGestionarGestacion(Service.gestacion gestacion, int maxEmb) { InitializeComponent(); Formateador f = new Formateador(); f.iniFormFreddyGestionar(this, "Gestionar Gestacion", pnlCtn, btnNuevo, btnBuscar, btnGuardar, btnModificar, btnCancelar, true); btnBuscar.Visible = false; btnNuevo.Visible = false; dtpFPP.Value = gestacion.fecha_probable_parto; txtClinica.Text = gestacion.clinica; txtMedico.Text = gestacion.medico; udNumeroEmb.Maximum = maxEmb; udNumeroEmb.Value = gestacion.numEmbar; gestSeleccionada = gestacion; estadoComponentes(Estado.Buscar); }