I have a html
table that is created dynamically by the user. I need to get all the data inserted by it into the table and generate a List so I can save it later to a database.
Project data follows:
public class Procedimento
{
string cnes;
string cbo;
string profissional;
string procedimento;
int idade;
int quant;
}
Table code:
<table id="tabelaProducao">
<tbody>
<tr>
<th style="text-align:center;">CNES</th>
<th style="text-align:center;">CBO</th>
<th style="text-align:center;">Profissional</th>
<th style="text-align:center;">Procedimento</th>
<th style="text-align:center;">Idade</th>
<th style="text-align:center;">Quant</th>
</tr>
<tr>
<td>7559267</td>
<td>352210</td>
<td>RENATA CARVALHO DA SILVA</td>
<td>0101050062</td>
<td>0</td>
<td>18</td>
</tr>
<tr>
<td>7559267</td>
<td>352210</td>
<td>JOSE SILVANIR DA ROCHA</td>
<td>0101050062</td>
<td>0</td>
<td>18</td>
</tr>
</tbody>
</table>
I think using Json should work, but I still do not know how to do it.
Data will be received via POST
and Controller
will read this data and save to the database.