コード例 #1
0
        private void btnGuardarCambios_Click(object sender, EventArgs e)
        {
            FormRegistraryActualizarCliente from = new FormRegistraryActualizarCliente();

            from.cargarplanes();
            from.Show();
        }
コード例 #2
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            FormRegistraryActualizarCliente from = new FormRegistraryActualizarCliente();
            Cliente p = new Cliente();

            if (tabla.SelectedRows.Count > 0)
            {
                p.cedula          = tabla.CurrentRow.Cells[0].Value.ToString();
                p.nombre          = tabla.CurrentRow.Cells[1].Value.ToString();
                p.direccion       = tabla.CurrentRow.Cells[2].Value.ToString();
                p.telefono        = tabla.CurrentRow.Cells[3].Value.ToString();
                p.fechaNacimiento = DateTime.Parse(tabla.CurrentRow.Cells[4].Value.ToString());
                p.pecho           = double.Parse(tabla.CurrentRow.Cells[5].Value.ToString());
                p.cintura         = double.Parse(tabla.CurrentRow.Cells[6].Value.ToString());
                p.cadera          = double.Parse(tabla.CurrentRow.Cells[7].Value.ToString());
                p.idPlan          = tabla.CurrentRow.Cells[8].Value.ToString();
                from.cargarcliente(p);
                from.Show();
            }
            else
            {
                MessageBox.Show("debe seleccionar fila");
            }
        }