Developing a small C # project with Visual Studio, firebird and ibexpert. With the tables NOT RELATIONSHIP I run everything right. But I need to relate CLIENTE
1: N to BONUS
E SAIDA
.
I am not able to develop the following reasoning:
I have a table named: CLIENTE
with ID_CLIENTE
(Primary Key), ID_BONUS
(FOREIGN Key), ID_SAIDA
(FOREIGN Key), NOME
and Data
.
Table BONUS
with ID_BONUS
(Primary key), data
, time1 , hora2
, total
.
Table SAIDA
with ID_SAIDA
(Foreign Key), data
, hora1
, hora2
, total
.
A Form1 for CLIENTE
with DATAGRID and another Form2 for BONUS
E SAIDA
(2 DATAGRID).
Should I put textbox for the foreign keys in CLIENTE
?
And how can I call Form2, is the primary key of BONUS
and SAIDA
?
My code has no relationship: 1 button search on Form1 and a button that accesses Form2.
string mSQL = "Select * from CLIENTE Where ID_CLIENTE = " + id;