1 2 3 4 5 6 7 8
| Dim tmpTvaMont As Nullable(Of Decimal) = New Nullable(Of Decimal)
tmpTvaMont = Nothing
If Not agRow.Isag_tva_montNull Then tmpTvaMont = agRow.ag_tva_mont
If isNewRow Then
agentsTableAdapter.InsertAgent(agRow.ag_id, agRow.ag_id_genre, agRow.ag_id_nom, agRow.ag_id_prenom, agRow.ag_id_nom_jf, agRow.ag_naiss_date, agRow.ag_naiss_lieu, agRow.ag_naiss_pays, agRow.ag_deb_mandat, agRow.ag_fin_mandat, tmpTvaMont, agRow.ag_tva_mont, agRow.ag_naf, agRow.ag_siret, agRow.ag_rcp_ass, agRow.ag_rcp_imm, agRow.ag_rcp_cred, agRow.ag_rc_num, agRow.ag_rc_ville, agRow.ag_entr_nom, agRow.ag_entr_statut, agRow.ag_resp, agRow.ag_site_web, agRow.ag_email)
Else
agentsTableAdapter.UpdateAgentById(agRow.ag_id_genre, agRow.ag_id_nom, agRow.ag_id_prenom, agRow.ag_id_nom_jf, agRow.ag_naiss_date, agRow.ag_naiss_lieu, agRow.ag_naiss_pays, agRow.ag_deb_mandat, agRow.ag_fin_mandat, agRow.ag_tva_num, tmpTvaMont, agRow.ag_naf, agRow.ag_siret, agRow.ag_rcp_ass, agRow.ag_rcp_imm, agRow.ag_rcp_cred, agRow.ag_rc_num, agRow.ag_rc_ville, agRow.ag_entr_nom, agRow.ag_entr_statut, agRow.ag_resp, agRow.ag_site_web, agRow.ag_email, agRow.ag_id)
End If |
Partager