private void btnRentaLEditar_Click(object sender, EventArgs e) { try { var row = dgvRenta.SelectedCells[0].OwningRow; var id = Convert.ToInt32(row.Cells[0].Value); var renta = _context.ProcesoRenta.SingleOrDefault(x => x.Id == id); var rentaEditar = new RentaCrear(); rentaEditar.RentaCrear_Load(sender, e, renta); rentaEditar.Show(); rentaEditar.TopMost = true; this.Dispose(); } catch (Exception ex) { } }
private void btnRentarVehiculo_Click(object sender, EventArgs e) { RentaCrear form = new RentaCrear(); form.ShowDialog(); }