Пример #1
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            var filasSelec = dgvPacientes.SelectedRows;

            if (filasSelec.Count == 0 || filasSelec.Count > 1)
            {
                MessageBox.Show("Debe Seleccionar una fila", "Sistema", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            foreach (DataGridViewRow f in filasSelec)
            {
                var documento      = f.Cells[0].Value.ToString();
                var nombreApellido = f.Cells[1].Value.ToString() + " " + f.Cells[2].Value.ToString();
                var matri          = long.Parse(f.Cells[7].Value.ToString());
                var elec           = MessageBox.Show($"Esta seguro que desea modificar el Paciente {nombreApellido}", "Sistema", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
                if (elec == DialogResult.No)
                {
                    return;
                }
                var mod_pac = new AgregarPaciente(documento);
                mod_pac.ShowDialog();
                ActualizarGrilla(matri);
            }
        }
Пример #2
0
        private void AgregarModificarPacientes(object sender, EventArgs e)
        {
            var a_mpacientes = new AgregarPaciente();

            a_mpacientes.ShowDialog();
        }