I am building a small system where I created a Formulario
where there is a Combobox
that lists the names of employees stored in the database and a DataGrid
that shows the services done by them (value, description and client) .
WhenselectingtheofficialintheCombobox,Iwantedtoshowtheservicesdonebyhim,soIcreated
SELECTfunc_nome,serv_desc,serv_cliente,serv_valorFROMfunc_servINNERJOINfunc_dadosONfunc_serv.func_id=func_dados.func_idWHEREfunc_serv.func_id=//codigodafuncionaria;
My question is, when I get the index of the selected combobox, how can I use it as a parameter for my sql query, replacing that commented part of the code.
I thought of creating multiple ifs, but if a new employee is created, I'll have to put in another if.
Please help me