Skip to content

Instantly share code, notes, and snippets.

@BrunoCaimar
Created May 13, 2010 20:59
Show Gist options
  • Save BrunoCaimar/400448 to your computer and use it in GitHub Desktop.
Save BrunoCaimar/400448 to your computer and use it in GitHub Desktop.
Private Sub InsertTabClasse(ByVal instance As TabClasse)
Dim novoCodigo = If(Me.TabClasse.Count > 0,
Me.GetCodigoSemClientID(Me.TabClasse.Max(Function(f) f.CodClasse), TamanhoChave.TresDecimais),
1)
instance.CodClasse = novoCodigo
Me.ExecuteDynamicInsert(instance)
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment